[postgis-users] trouble with a postgis table in qgis

TECHER David davidtecher at yahoo.fr
Sat Jan 13 14:15:17 PST 2007


Hi Kirk

Perhaps it is a stupid idea but did you try by inversing longitude and 
latitude in your commands?

I mean
SELECT AddGeometryColumn( 'public', 'sites', 'the_point_lonlat', 4269, 
'POINT', 2 );

UPDATE sites SET the_point_lonlat = PointFromText('POINT(' || latitude 
|| ' ' || longitude || ')',4269)

SELECT AddGeometryColumn( 'public', 'sites', 'the_point_meter', 32661, 
'POINT', 2 );

UPDATE sites SET the_point_meter = transform(PointFromText('POINT(' || 
latitude || ' ' || longitude || ')',4269),32661);

Kirk Wythers a écrit :
> Greetings all, 
>
> I am trying to figure out why when I view a postgis table in qigs the 
> long/lat geometry column projects properly with the north end of 
> Minnesota pointing north, but the wgs84 meters geometry column 
> projects oddly... on its side with the north end of Minnesota pointing 
> to the right... west). I have included my commands that created the 
> geometry columns, and I have attached two png files of the resultant 
> maps. Any ideas of where I made the mistake would be most helpful.
> Thanks,
>
> Kirk
>
> SELECT AddGeometryColumn( 'public', 'sites', 'the_point_lonlat', 4269, 
> 'POINT', 2 );
>
> UPDATE sites SET the_point_lonlat = PointFromText('POINT(' || 
> longitude || ' ' || latitude || ')',4269)
>
> SELECT AddGeometryColumn( 'public', 'sites', 'the_point_meter', 32661, 
> 'POINT', 2 );
>
> UPDATE sites SET the_point_meter = transform(PointFromText('POINT(' || 
> longitude || ' ' || latitude || ')',4269),32661);
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070113/49e26f6e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 22063 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070113/49e26f6e/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 22329 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070113/49e26f6e/attachment-0001.png>


More information about the postgis-users mailing list