<html>
<head>
</head>
<body style="font-size: 12pt; font-style: normal; margin-right: 4px; margin-top: 4px; margin-left: 4px; font-family: Comic Sans MS; margin-bottom: 1px; line-height: normal; font-weight: normal; font-variant: normal">
<p style="margin-bottom: 0; margin-top: 0">
<font face="Comic Sans MS" size="3">Dang LAT/LON LON/LAT differences.</font> </p>
<br>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Comic Sans MS" size="3">This works now, notice that the LAT/LON was switched around to LON/LAT.:</font> </p>
<br>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3">-- PostGIS likes LON/LAT (NOT LAT/LON)</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3">-- DROP VIEW public.plots;</font><font face="Comic Sans MS" size="3"></font> </p>
<br>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3">CREATE VIEW plots AS</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> select rxtime,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> ltrim(split_part(part1, ':', 1), '>') as cmd_type,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> split_part(part1, ':', 2) as esn,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> part2 as time_idx,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> part3 as lat,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> part4 as lon,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> ST_Transform(ST_SetSRID(ST_MakePoint(part4::numeric, part3::numeric),4326), 200068) as geom,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> part5 as speed,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> part6 as event,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> rtrim(part7, ';') as good</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> from</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> (select rxtime,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> split_part(cmd, ',', 1) as part1, </font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> split_part(cmd, ',', 2) as part2,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> split_part(cmd, ',', 3) as part3,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> split_part(cmd, ',', 4) as part4,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> split_part(cmd, ',', 5) as part5,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> split_part(cmd, ',', 6) as part6,</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> split_part(cmd, ',', 7) as part7</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> from </font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> cmdstpinfo</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> where cmd </font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Courier New" size="3"> like '>Plot:%') AS first_pass;</font><font face="Comic Sans MS" size="3"></font> </p>
<br> <br>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Comic Sans MS" size="3">bobb</font> </p>
<br>
<p style="margin-bottom: 0; margin-top: 0">
<br>
<br>
>>> "Bob Basques" <Bob.Basques@ci.stpaul.mn.us> wrote:<br> </p>
<table bgcolor="#f3f3f3" style="font-size: 1em; margin-right: 0; margin-top: 0; margin-left: 15px; margin-bottom: 0" border="0">
<tr>
<td>
<div style="border-left: solid 1px #050505; padding-left: 7px">
<p style="margin-bottom: 0; margin-top: 0">
<font face="Comic Sans MS" size="3">Yeah, that was my latest fix, I don't have user rights (yet) to run against the Spatial_ref_sys table, so waiting for someone else to run it.</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<br>
</p>
<p style="margin-bottom: 0; margin-top: 0">
<font face="Comic Sans MS" size="3">bobb</font> </p>
<p style="margin-bottom: 0; margin-top: 0">
<br>
</p>
<p style="margin-bottom: 0; margin-top: 0">
<br>
<br>
>>> Mike Toews <mwtoews@gmail.com> wrote:<br> </p>
<table bgcolor="#f3f3f3" style="font-size: 1em; margin-right: 0; margin-top: 0; margin-left: 15px; margin-bottom: 0" border="0">
<tr>
<td>
<div style="border-left: solid 1px #050505; padding-left: 7px">
<p style="margin-bottom: 0; margin-top: 0">
On 7 March 2012 06:10, Bob Basques <Bob.Basques@ci.stpaul.mn.us> wrote:<br>> ...<br>> ST_AsText(ST_Transform(ST_SetSRID(ST_MakePoint(part3::numeric,<br>> part4::numeric),4326)), 200068) as geom_city<br>> ...<br>> ERROR: function st_transform(geometry) does not exist<br>> LINE 4: ST_AsText(ST_Transform(ST_SetSRID(ST_MakePoint(pa...<br><br>It looks like "4326)), 200068)" should be "4326), 200068))"<br><br>-Mike<br>_______________________________________________<br>postgis-users mailing list<br>postgis-users@postgis.refractions.net<br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</p>
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>