[postgis-users] identfying a nearest point

Stephen Woodbridge woodbri at swoodbridge.com
Fri Apr 24 10:03:08 PDT 2009


Supunmali Ahangama wrote:
> 
> Stephen Woodbridge wrote:
>>
>> What is the response to the following queries:
>>
>> select full_postgis_version();
>> select astext(the_geom) from customer_location where
>>  > gid=1;
>> select astext(the_geom) from vertices_tmp limit 1;
>>
>> -Steve
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>>
> 
> Hi Steve,
> 
> select full_postgis_version(); is not working. But,

Sorry, that should have been:

select postgis_full_version();

> select postgis_version();
> "1.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1"
> 
> 
> select astext(the_geom) from customer_location where gid=1;
> "POINT(-96.7396491708658 32.9772528902849)"

This data is in lat,long degrees

> select astext(the_geom) from vertices_tmp limit 1;
> "POINT(2512160.45149086 7040141.09734678)"

This data is in some projection in meters or feet.

This is your problem. You are using data in two separate projections. 
You need to make sure you use data in a consistent projection or that 
you take the appropriate steps to project the one set of data into the 
other projection before you try to use them.

-Steve



More information about the postgis-users mailing list