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