<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE>@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-AU vLink=purple link=blue bgColor=#ffffff>
<DIV><FONT face=Arial>Mike,</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Had to do this one, once. </FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>The algorithm I used started w/ the first 3 points,
determined how "close" they were to being in a straight line (area of
triangle) , and if they were too nearly in a line, kicked out the center
point -- Then I tested points # 1,2, & 4 and so on. Crude, perhaps,
but effective...</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>It worked well for the data I was "thinning out," namely
GPS points taken at 5 hits / second on a vehicle moving 5-15
miles/hr.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Depending on the extents involved, you might
have to put a limit on how long a segment could be - If your track is more or
less a straight line anyway, kick out more points. If it wanders around on
a roughly square piece of water, then being able to view the effects of
different removal methods would be handy. If you are working inside of a
harbor or port, then curvature of the earth, great circle nav, and other
complications probably don't apply, but maybe out on the open ocean, they will
probably have some effect.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Ken</FONT></DIV>
<DIV><FONT face=Arial>Ken S. Elvehjem</FONT></DIV>
<DIV><FONT face=Arial>ELVEHJEM TECHNICAL SUPPORT</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=Mike.Sexton@ga.gov.au
href="mailto:Mike.Sexton@ga.gov.au">Mike.Sexton@ga.gov.au</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=shapelib@lists.maptools.org
href="mailto:shapelib@lists.maptools.org">shapelib@lists.maptools.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, November 12, 2006 8:07
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Shapelib] Shapefile
decimation</DIV>
<DIV><BR></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi,</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have another
query.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Last time I asked about making
shapefiles from ASCII X,Y files. I followed up on the suggestion of modifying
shpadd.c to read from an input file and a friend modified the code and in
virtually no time produced a very good result</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">In fact too
good.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The files are very large. I would
like to decimate the shapefiles. I have scanned the web looking for a program
that might achieve this. I found the program fshape and to my utter amazement
got it too work. I need to play with the parameters a bit (my first attempt
was a bit severe). But since the various shapes in the shapefiles are ships
tracks, it would probably be just as valid to accept only every
10<SUP>th</SUP> point (or even less). I could go back to the original
datafiles and decimate them (although they were in a myriad of formats and I
kept altering my script to pull out the bits I need). This is not an
attractive option when the 2000 odd shapefiles are in a standard format
already.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I was wondering if a shapefile
decimator existed?</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Otherwise I might have to go back
to my friend</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Mike
Sexton</SPAN></FONT></P></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Shapelib mailing
list<BR>Shapelib@lists.maptools.org<BR>http://lists.maptools.org/mailman/listinfo/shapelib<BR></BLOCKQUOTE></BODY></HTML>