Bob,

Yeah, sorry, didn't spot the aliasing of part3 and part4 but you got it anyway.

Can PostgreSQL/PostGIS let you now create a function based index over the computed geometry column?

S
On Tue, 06 Mar 2012 10:28:55 +1100, Bob Basques <bob.basq...@ci.stpaul.mn.us> wrote:

Ha, success!!!


Coll, Thanks Simon  (A LOT !!)


select rxtime,

       ltrim(split_part(part1, ':', 1), '>') as cmd_type,

       split_part(part1, ':', 2) as esn,

       part2 as time_idx,

       part3 as lat,

       part4 as lon,

       ST_SetSRID(ST_MakePoint(part3::numeric, part4::numeric),4326) as geom,

       part5 as speed,

       part6 as event,

       rtrim(part7, ';') as good

  from

      (select rxtime,

              split_part(cmd, ',', 1) as part1,

              split_part(cmd, ',', 2) as part2,

              split_part(cmd, ',', 3) as part3,

              split_part(cmd, ',', 4) as part4,

              split_part(cmd, ',', 5) as part5,

              split_part(cmd, ',', 6) as part6,

              split_part(cmd, ',', 7) as part7

         from

              cmdstpinfo

        where cmd

         like '>Plot:%') AS first_pass;




--
Holder of "2011 Oracle Spatial Excellence Award for Education and Research."
SpatialDB Advice and Design, Solutions Architecture and Programming,
Oracle Database 10g Administrator Certified Associate; Oracle Database 10g SQL Certified Professional
Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE, Manifold GIS, FME, Radius Topology and Studio Specialist.
39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia.
Website: www.spatialdbadvisor.com
Email: si...@spatialdbadvisor.com
Voice: +61 362 396397
Mobile: +61 418 396391
Skype: sggreener
Longitude: 147.20515 (147° 12' 18" E)
Latitude: -43.01530 (43° 00' 55" S)
GeoHash: r22em9r98wg
NAC:W80CK 7SWP3
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to