[postgis-users] Finding linestrings with longitude/latitude coords

Gerrit Hartbrod ghartbrod at gmx.de
Thu Oct 9 04:35:22 PDT 2003


Hello everyone,

I had developed a program with postgresql.
This programm generates from GDF data files a
geographic database (streets, points of interest, administrative areas,etc)
With coordinates given by a GPS reciever i can
find the suitable street (in the near of the GPS point)
in the database.
The problem is that postgresql is too slow for larger maps.

So, I think, I use postgis to improve the speed of the
streetsearch.

I stored the streets as linestrings and create a spatial
index.
All coords are stored in longitude and latitude (WGS-84).
My problem is that: How can I find the nearest linestring from
a given coordinate (GPS point) or all linestrings inside a 
searchbox/radius?
I see the examples for the bounding box in the postgis manual
but how can I do it with lat/long coords?
If there any chance to do it without a coordinate transformation?

Thanks



Gerrit Hartbrod
ghartbrod at gmx.de




More information about the postgis-users mailing list