I think it's the projection. Google uses EPSG:900913 so try that. hth charles
On Apr 30, 2010, at 2:01 PM, ots wrote: > > Hi, > i used upgis_lineshift function, it works but not as well as needed. I > prepared map, where you can see result. The problem is, that it is not > perpendicular and when used in different directions with same distance > function parameter, the distance is different. Point 1,2 is original and 3,4 > result of function, point 5,6 original and 7,8 result. > > http://maps.google.com/maps/api/staticmap?center=na%20zborenci,Praha&zoom=18&size=1024x1024&maptype=roadmap& > markers=color:red|label:1|50.07698059082031,14.416675567626953&markers=color:red|label:2|50.07749938964844,14.41646957397461 > &markers=color:red|label:3|50.0770728490573,14.4169079217053&markers=color:red|label:4|50.0775916478854,14.4167019280529 > &markers=color:blue|label:5|50.07719802856445,14.417106628417969&markers=color:blue|label:6|50.077693939208984,14.418004989624023 > &markers=color:blue|label:7|50.0769791612592,14.417227446888&markers=color:blue|color:blue|label:8|50.0774750719037,14.418125808094&sensor=false > > I used query like > > select ST_AsText(upgis_lineshift( > ST_GeomFromText('LINESTRING(14.416675567626953 50.07698059082031, > 14.41646957397461 50.07749938964844)', 4326) > , 0.00025)) > > Do you know, where is problem? I guess, it is connected with projection but > no idea how to correct it. May be, concerning angles the method works well > and when looking on the result placed on geoid, it is ok. But I do not > understand, why the distance is too much different. > > Thanks, Ota > > > > Charles Galpin-2 wrote: >> >> Check out the upgis_lineshift function on >> >> http://trac.osgeo.org/postgis/wiki/UsersWikiplpgsqlfunctions >> >> The resulting line will have endpoints that you want. >> >> hth >> charles >> >> On Apr 29, 2010, at 7:10 PM, ots wrote: >> >>> >>> Hello, >>> I have oriented line. The line is given as two points (WGS84). I need to >>> calculate coordinates(also WGS84) of next two points on one side (left or >>> right) of the line in the given distance so all 4 points make together >>> rectangle. >>> Is there some function that can help me? I was searching but no idea. >>>
_______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
