<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-1223</id>
	<title>Nabble - PostGIS - User</title>
	<updated>2009-11-23T22:44:06Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/PostGIS---User-f1223.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/PostGIS---User-f1223.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26491153</id>
	<title>Re: identifying blank geometry fields</title>
	<published>2009-11-23T22:44:06Z</published>
	<updated>2009-11-23T22:44:06Z</updated>
	<author>
		<name>Nicklas Avén</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;&lt;/title&gt;
	
&lt;meta name=&quot;GENERATOR&quot; content=&quot;MSHTML 8.00.6001.18852&quot;&gt;&lt;/meta&gt;
	
&lt;meta name=&quot;SKYPE_FRAMEID&quot; content=&quot;HBROAMAKDT&quot;&gt;&lt;/meta&gt;
	
&lt;meta id=&quot;skype_v3_tb_marker_id&quot; name=&quot;SKYPE_PARSING_HAS_FINISHED&quot; content=&quot;metacontent&quot;&gt;&lt;/meta&gt;
&lt;/head&gt;

&lt;body&gt;
	
&lt;div align=&quot;left&quot;&gt;Hallo &lt;/div&gt;
	
&lt;div align=&quot;left&quot;&gt;&amp;nbsp;&lt;/div&gt;
	
&lt;div align=&quot;left&quot;&gt;At least in pgAdmin the cells is showed as empty cells if the geometries is above some size. But they are there.&lt;/div&gt;
	
&lt;div align=&quot;left&quot;&gt;An easy way to confirm they are there is to use som function on them. If it is polygons for instance you can run st_area or st_length for lines. &lt;/div&gt;
	
&lt;div align=&quot;left&quot;&gt;&amp;nbsp;&lt;/div&gt;
	
&lt;div align=&quot;left&quot;&gt;Hope that helps&lt;/div&gt;
	
&lt;div align=&quot;left&quot;&gt;/Nicklas&lt;br /&gt;
		&lt;br /&gt;
		2009-11-24 Bob Hume wrote:&lt;br /&gt;
		&lt;br /&gt;
		&gt;&lt;/div&gt;
	
&lt;div&gt;select count(*) from dum where the_geom is null&amp;nbsp; gives a result of 0 &lt;br /&gt;
		&gt;&lt;br /&gt;
		&gt; select count(the_geom) from dum gives a result is 1676, which is the total number of rows in the table &lt;br /&gt;
		&gt;&lt;br /&gt;
		&gt; This is consistent with my previous description.&amp;nbsp; The apparently blank the_geom fields apparently have some data, but the data doesn't display.&amp;nbsp; This seems odd, and makes it difficult (impossible for me, so far) to identify the blank fields. &lt;br /&gt;
		&gt;&lt;br /&gt;
		&gt;&lt;br /&gt;
		&gt; (Sorry this seems to be a duplicate.&amp;nbsp;&amp;nbsp; I couldn't figure out how to reply to a message in a thread and assumed the mail program would figure it out.&amp;nbsp; It didn't.&amp;nbsp; Just for the heck of it I clicked on the name of the person I was replying to with the idea that I'd send a message directly to him, and a mail window opened to send a message to the list.&amp;nbsp; Who knew?&amp;nbsp; I searched, and couldn't find any information explaining this.)&lt;br /&gt;
		&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26491153&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/identifying-blank-geometry-fields-tp26484271p26491153.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26490812</id>
	<title>Re: identifying blank geometry fields</title>
	<published>2009-11-23T21:49:56Z</published>
	<updated>2009-11-23T21:49:56Z</updated>
	<author>
		<name>Bob Hume</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
&lt;div class=&quot;moz-text-flowed&quot; style=&quot;font-family: -moz-fixed; font-size: 13px;&quot; lang=&quot;x-western&quot;&gt;select
count(*) from dum where the_geom is null&amp;nbsp; gives a result of 0
&lt;br&gt;
&lt;br&gt;
select count(the_geom) from dum gives a result is 1676, which is the
total number of rows in the table
&lt;br&gt;
&lt;br&gt;
This is consistent with my previous description.&amp;nbsp; The apparently blank
the_geom fields apparently have some data, but the data doesn't
display.&amp;nbsp; This seems odd, and makes it difficult (impossible for me, so
far) to identify the blank fields.
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
(Sorry this seems to be a duplicate.&amp;nbsp;&amp;nbsp; I couldn't figure out how to
reply to a message in a thread and assumed the mail program would
figure it out.&amp;nbsp; It didn't.&amp;nbsp; Just for the heck of it I clicked on the
name of the person I was replying to with the idea that I'd send a
message directly to him, and a mail window opened to send a message to
the list.&amp;nbsp; Who knew?&amp;nbsp; I searched, and couldn't find any information
explaining this.)&lt;br&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26490812&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/identifying-blank-geometry-fields-tp26484271p26490812.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26490796</id>
	<title>Re: identifying blank geometry fields</title>
	<published>2009-11-23T21:46:51Z</published>
	<updated>2009-11-23T21:46:51Z</updated>
	<author>
		<name>Stephen Woodbridge</name>
	</author>
	<content type="html">Bob Hume wrote:
&lt;br&gt;&amp;gt; select count(*) from dum where the_geom is null &amp;nbsp;gives a result of 0
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; select count(the_geom) from dum gives a result is 1676, which is the 
&lt;br&gt;&amp;gt; total number of rows in the table
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This is consistent with my previous description. &amp;nbsp;The apparently blank 
&lt;br&gt;&amp;gt; the_geom fields apparently have some data, but the data doesn't 
&lt;br&gt;&amp;gt; display. &amp;nbsp;This seems odd, and makes it difficult (impossible for me, so 
&lt;br&gt;&amp;gt; far) to identify the blank fields.
&lt;br&gt;&lt;br&gt;Have you run:
&lt;br&gt;&lt;br&gt;select count(*) from dum where not isvalid(the_geom);
&lt;br&gt;&lt;br&gt;-Steve
&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26490796&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/identifying-blank-geometry-fields-tp26490704p26490796.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26490704</id>
	<title>identifying blank geometry fields</title>
	<published>2009-11-23T21:34:53Z</published>
	<updated>2009-11-23T21:34:53Z</updated>
	<author>
		<name>Bob Hume</name>
	</author>
	<content type="html">select count(*) from dum where the_geom is null &amp;nbsp;gives a result of 0
&lt;br&gt;&lt;br&gt;select count(the_geom) from dum gives a result is 1676, which is the 
&lt;br&gt;total number of rows in the table
&lt;br&gt;&lt;br&gt;This is consistent with my previous description. &amp;nbsp;The apparently blank 
&lt;br&gt;the_geom fields apparently have some data, but the data doesn't 
&lt;br&gt;display. &amp;nbsp;This seems odd, and makes it difficult (impossible for me, so 
&lt;br&gt;far) to identify the blank fields.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26490704&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/identifying-blank-geometry-fields-tp26490704p26490704.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26490593</id>
	<title>Re: loading many similar shapefiles</title>
	<published>2009-11-23T21:14:02Z</published>
	<updated>2009-11-23T21:14:02Z</updated>
	<author>
		<name>Paul Ramsey-3</name>
	</author>
	<content type="html">Just use a temp table and interleave the load steps with psql -c
&lt;br&gt;&amp;quot;insert into realtable select a,b,c from tmptable&amp;quot;
&lt;br&gt;&lt;br&gt;P
&lt;br&gt;&lt;br&gt;On Mon, Nov 23, 2009 at 8:27 PM, P Kishor &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26490593&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;punk.kish@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I have many shapefiles that are conceptually identical in structure,
&lt;br&gt;&amp;gt; except a couple of columns in each file are named differently. These
&lt;br&gt;&amp;gt; columns are unimportant.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; How can I load all these files in the same table without the offending columns?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; # generate the create table and insert commands
&lt;br&gt;&amp;gt; shp2pgsql -s 4269 -c file1 table &amp;gt; load.sql
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; # generate the insert commands for subsequent files
&lt;br&gt;&amp;gt; shp2pgsql -s 4269 -a file2 table &amp;gt;&amp;gt; load.sql
&lt;br&gt;&amp;gt; shp2pgsql -s 4269 -a file3 table &amp;gt;&amp;gt; load.sql
&lt;br&gt;&amp;gt; ..
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The above commands generate INSERT statements like so --
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; INSERT INTO &amp;quot;table&amp;quot; (
&lt;br&gt;&amp;gt;  &amp;quot;area&amp;quot;,
&lt;br&gt;&amp;gt;  &amp;quot;perimeter&amp;quot;,
&lt;br&gt;&amp;gt;  &amp;quot;file1_&amp;quot;,
&lt;br&gt;&amp;gt;  &amp;quot;file1_i&amp;quot;,
&lt;br&gt;&amp;gt;   the_geom
&lt;br&gt;&amp;gt; ) VALUES (
&lt;br&gt;&amp;gt;  '2.29080994500086E-04',
&lt;br&gt;&amp;gt;  '6.34477469815224E-02',
&lt;br&gt;&amp;gt;  '0106000020AD100000010000000103000020AD100000010000000D000000A4552DE928EA55C0C6F99B5088443E404582A966D6E955C050C8CEDBD8443E40187D0569C6E955C02B508BC1C3443E403DEFC682C2E955C0BB4560AC6F443E40EB8D5A61FAE955C0A6D24F38BB413E402907B30930EA55C0503750E09D403E40C28A53AD85EA55C0A8716F7EC3403E403D997FF44DEB55C058FFE7305F423E402C4833164DEB55C00F4240BE84423E40DAAD65321CEB55C0AFCF9CF529433E40D48041D2A7EA55C046274BADF7433E40FB58C16F43EA55C045F295404A443E40A4552DE928EA55C0C6F99B5088443E40'
&lt;br&gt;&amp;gt; );
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I don't want file1_ and file1_i and their corresponding values. Is
&lt;br&gt;&amp;gt; there a way to specify which columns to load?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Puneet Kishor
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26490593&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26490593&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/loading-many-similar-shapefiles-tp26490333p26490593.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26490333</id>
	<title>loading many similar shapefiles</title>
	<published>2009-11-23T20:27:31Z</published>
	<updated>2009-11-23T20:27:31Z</updated>
	<author>
		<name>P Kishor-3</name>
	</author>
	<content type="html">I have many shapefiles that are conceptually identical in structure,
&lt;br&gt;except a couple of columns in each file are named differently. These
&lt;br&gt;columns are unimportant.
&lt;br&gt;&lt;br&gt;How can I load all these files in the same table without the offending columns?
&lt;br&gt;&lt;br&gt;# generate the create table and insert commands
&lt;br&gt;shp2pgsql -s 4269 -c file1 table &amp;gt; load.sql
&lt;br&gt;&lt;br&gt;# generate the insert commands for subsequent files
&lt;br&gt;shp2pgsql -s 4269 -a file2 table &amp;gt;&amp;gt; load.sql
&lt;br&gt;shp2pgsql -s 4269 -a file3 table &amp;gt;&amp;gt; load.sql
&lt;br&gt;..
&lt;br&gt;&lt;br&gt;The above commands generate INSERT statements like so --
&lt;br&gt;&lt;br&gt;INSERT INTO &amp;quot;table&amp;quot; (
&lt;br&gt;&amp;nbsp; &amp;quot;area&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;quot;perimeter&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;quot;file1_&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;quot;file1_i&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp;the_geom
&lt;br&gt;) VALUES (
&lt;br&gt;&amp;nbsp; '2.29080994500086E-04',
&lt;br&gt;&amp;nbsp; '6.34477469815224E-02',
&lt;br&gt;&amp;nbsp;'0106000020AD100000010000000103000020AD100000010000000D000000A4552DE928EA55C0C6F99B5088443E404582A966D6E955C050C8CEDBD8443E40187D0569C6E955C02B508BC1C3443E403DEFC682C2E955C0BB4560AC6F443E40EB8D5A61FAE955C0A6D24F38BB413E402907B30930EA55C0503750E09D403E40C28A53AD85EA55C0A8716F7EC3403E403D997FF44DEB55C058FFE7305F423E402C4833164DEB55C00F4240BE84423E40DAAD65321CEB55C0AFCF9CF529433E40D48041D2A7EA55C046274BADF7433E40FB58C16F43EA55C045F295404A443E40A4552DE928EA55C0C6F99B5088443E40'
&lt;br&gt;);
&lt;br&gt;&lt;br&gt;&lt;br&gt;I don't want file1_ and file1_i and their corresponding values. Is
&lt;br&gt;there a way to specify which columns to load?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Puneet Kishor
&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26490333&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/loading-many-similar-shapefiles-tp26490333p26490333.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26490170</id>
	<title>Re: Using a rectangular selection</title>
	<published>2009-11-23T20:00:41Z</published>
	<updated>2009-11-23T20:00:41Z</updated>
	<author>
		<name>Brian Modra</name>
	</author>
	<content type="html">2009/11/23 Henri De Feraudy &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26490170&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;feraudyh@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;   I'm working in planar coordinates. I have a Postgis database and
&lt;br&gt;&amp;gt; for starters I want to limit my attention to all geometries that intersect a given rectangle (the &amp;quot;selection&amp;quot;).
&lt;br&gt;&amp;gt; I can imagine that one could enumerate all geometries and ask in each case if they
&lt;br&gt;&amp;gt; intersect the rectangle, but that doesnt seem very efficient, so what do you suggest?
&lt;br&gt;&lt;br&gt;Use ST_Intersects
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I only need general guidance so I can look at the various parts of the doc.
&lt;br&gt;&amp;gt; Later I'll be wanting to clip the geometies with this selection.
&lt;br&gt;&amp;gt; Still later I'll want to consider polygonal selections.
&lt;br&gt;&amp;gt; By the way I'm accessing the PostGis database via LibPQ and have written my application
&lt;br&gt;&amp;gt; in Qt.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanking you in advance
&lt;br&gt;&amp;gt; Henri
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26490170&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--
&lt;br&gt;Brian Modra   Land line: +27 23 5411 462
&lt;br&gt;Mobile: +27 79 69 77 082
&lt;br&gt;5 Jan Louw Str, Prince Albert, 6930
&lt;br&gt;Postal: P.O. Box 2, Prince Albert 6930
&lt;br&gt;South Africa
&lt;br&gt;&lt;a href=&quot;http://www.zwartberg.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.zwartberg.com/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26490170&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Using-a-rectangular-selection-tp26486109p26490170.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26487571</id>
	<title>Re: C++ and Postgis</title>
	<published>2009-11-23T14:53:41Z</published>
	<updated>2009-11-23T14:53:41Z</updated>
	<author>
		<name>Pedro Doria Meunier</name>
	</author>
	<content type="html">Paul,
&lt;br&gt;&lt;br&gt;I could just *kiss* you mate! :D
&lt;br&gt;(Right now I'm feeling pretty ashamed for not thinking of it right away 
&lt;br&gt;... :] guess it's been too many hours coding... )
&lt;br&gt;&lt;br&gt;All the best,
&lt;br&gt;Pedro.
&lt;br&gt;&lt;br&gt;&lt;br&gt;On 11/23/2009 10:45 PM, Paul Ramsey wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; If it's just points, do it all on the server side, skip encoding formats
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; select st_x(pt) as x, st_y(pt) as y from mytable where myclause();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; P.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Mon, Nov 23, 2009 at 2:43 PM, Pedro Doria Meunier
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487571&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pdoria@...&lt;/a&gt;&amp;gt; &amp;nbsp;wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; Thank you Paul and John for your ideas. :)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Actually what I'm trying to do is to decode simple POINT geoms...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This is what I've done in PHP (using the astext() approach)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; // extract the geometry
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; $geometry = str_replace(&amp;quot;POINT(&amp;quot;,&amp;quot;&amp;quot;, $loc);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; $geometry = str_replace(&amp;quot;)&amp;quot;,&amp;quot;&amp;quot;,$geometry);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; $coordinate = explode(&amp;quot; &amp;quot;,$geometry);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; $lon=$coordinate[0];
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; $lat=$coordinate[1];
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Now this was for the web interface... ( the user can wait another 100ms or
&lt;br&gt;&amp;gt;&amp;gt; so ... :] )
&lt;br&gt;&amp;gt;&amp;gt; As far as a server solution is concerned this *is* a time-consuming
&lt;br&gt;&amp;gt;&amp;gt; procedure... especially so when you've got *thousands* of connections per
&lt;br&gt;&amp;gt;&amp;gt; minute...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Furthermore, I'm developing the &amp;quot;beast&amp;quot; in Qt4 and - *ahem* - had never
&lt;br&gt;&amp;gt;&amp;gt; needed to use libpq so I'm a bit lost here... :)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Could someone be so kind as to point to a code example (outside using
&lt;br&gt;&amp;gt;&amp;gt; astext() method) ? :]
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; P.S. @John - found this to be interesting as I could store it in QByteArray
&lt;br&gt;&amp;gt;&amp;gt; and go from there... ;) -- the real question here is: how to interpret the
&lt;br&gt;&amp;gt;&amp;gt; byte array?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; BR,
&lt;br&gt;&amp;gt;&amp;gt; Pedro.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On 11/23/2009 09:50 PM, Paul Ramsey wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; That depends entirely on what you're planning to do with them once you
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; get them. You'll probably want to serialize them into a known form so
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; you can use them on the client side. ST_AsText() is one, very heavy,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; option. Mapserver, to take an example, uses
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; encode(ST_AsBinary(ST_Force2D(geom)), 'hex'), so what goes over the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; wire is hex strings, but those are easy to turn into binary arrays, in
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; WKB format, suitable for reading by a number of C++ libraries (like
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; OGR or GEOG or etc).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Best,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; P.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Mon, Nov 23, 2009 at 1:19 PM, Pedro Doria Meunier
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487571&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pdoria@...&lt;/a&gt;&amp;gt; &amp;nbsp; &amp;nbsp;wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi All,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; First off sorry for cross-posting. I'm hoping for a bigger audience... :]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; As for my question:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; How does one deal with Postgis geom fields in C++ ?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Google hasn't offered much help so far.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I know I can make a &amp;quot;SELECT astext(my_geom) FROM my_table&amp;quot; and after
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; parsing
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the resulting text.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This seems a bit awkward and time-consuming...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Is there a better way to deal with it?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Already thankful for any ideas,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; BR,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Pedro.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487571&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487571&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487571&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487571&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;
&lt;/div&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487571&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C%2B%2B-and-Postgis-tp26486046p26487571.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26487478</id>
	<title>Re: C++ and Postgis</title>
	<published>2009-11-23T14:45:01Z</published>
	<updated>2009-11-23T14:45:01Z</updated>
	<author>
		<name>Paul Ramsey-4</name>
	</author>
	<content type="html">If it's just points, do it all on the server side, skip encoding formats
&lt;br&gt;&lt;br&gt;select st_x(pt) as x, st_y(pt) as y from mytable where myclause();
&lt;br&gt;&lt;br&gt;P.
&lt;br&gt;&lt;br&gt;On Mon, Nov 23, 2009 at 2:43 PM, Pedro Doria Meunier
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487478&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pdoria@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thank you Paul and John for your ideas. :)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Actually what I'm trying to do is to decode simple POINT geoms...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is what I've done in PHP (using the astext() approach)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;      // extract the geometry
&lt;br&gt;&amp;gt;      $geometry = str_replace(&amp;quot;POINT(&amp;quot;,&amp;quot;&amp;quot;, $loc);
&lt;br&gt;&amp;gt;      $geometry = str_replace(&amp;quot;)&amp;quot;,&amp;quot;&amp;quot;,$geometry);
&lt;br&gt;&amp;gt;      $coordinate = explode(&amp;quot; &amp;quot;,$geometry);
&lt;br&gt;&amp;gt;      $lon=$coordinate[0];
&lt;br&gt;&amp;gt;      $lat=$coordinate[1];
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Now this was for the web interface... ( the user can wait another 100ms or
&lt;br&gt;&amp;gt; so ... :] )
&lt;br&gt;&amp;gt; As far as a server solution is concerned this *is* a time-consuming
&lt;br&gt;&amp;gt; procedure... especially so when you've got *thousands* of connections per
&lt;br&gt;&amp;gt; minute...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Furthermore, I'm developing the &amp;quot;beast&amp;quot; in Qt4 and - *ahem* - had never
&lt;br&gt;&amp;gt; needed to use libpq so I'm a bit lost here... :)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Could someone be so kind as to point to a code example (outside using
&lt;br&gt;&amp;gt; astext() method) ? :]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; P.S. @John - found this to be interesting as I could store it in QByteArray
&lt;br&gt;&amp;gt; and go from there... ;) -- the real question here is: how to interpret the
&lt;br&gt;&amp;gt; byte array?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; BR,
&lt;br&gt;&amp;gt; Pedro.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 11/23/2009 09:50 PM, Paul Ramsey wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; That depends entirely on what you're planning to do with them once you
&lt;br&gt;&amp;gt;&amp;gt; get them. You'll probably want to serialize them into a known form so
&lt;br&gt;&amp;gt;&amp;gt; you can use them on the client side. ST_AsText() is one, very heavy,
&lt;br&gt;&amp;gt;&amp;gt; option. Mapserver, to take an example, uses
&lt;br&gt;&amp;gt;&amp;gt; encode(ST_AsBinary(ST_Force2D(geom)), 'hex'), so what goes over the
&lt;br&gt;&amp;gt;&amp;gt; wire is hex strings, but those are easy to turn into binary arrays, in
&lt;br&gt;&amp;gt;&amp;gt; WKB format, suitable for reading by a number of C++ libraries (like
&lt;br&gt;&amp;gt;&amp;gt; OGR or GEOG or etc).
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Best,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; P.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Mon, Nov 23, 2009 at 1:19 PM, Pedro Doria Meunier
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487478&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pdoria@...&lt;/a&gt;&amp;gt;  wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hi All,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; First off sorry for cross-posting. I'm hoping for a bigger audience... :]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; As for my question:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; How does one deal with Postgis geom fields in C++ ?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Google hasn't offered much help so far.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I know I can make a &amp;quot;SELECT astext(my_geom) FROM my_table&amp;quot; and after
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; parsing
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the resulting text.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; This seems a bit awkward and time-consuming...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Is there a better way to deal with it?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Already thankful for any ideas,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; BR,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Pedro.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487478&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487478&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487478&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487478&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C%2B%2B-and-Postgis-tp26486046p26487478.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26487456</id>
	<title>Re: C++ and Postgis</title>
	<published>2009-11-23T14:43:07Z</published>
	<updated>2009-11-23T14:43:07Z</updated>
	<author>
		<name>Pedro Doria Meunier</name>
	</author>
	<content type="html">Thank you Paul and John for your ideas. :)
&lt;br&gt;&lt;br&gt;Actually what I'm trying to do is to decode simple POINT geoms...
&lt;br&gt;&lt;br&gt;This is what I've done in PHP (using the astext() approach)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// extract the geometry
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$geometry = str_replace(&amp;quot;POINT(&amp;quot;,&amp;quot;&amp;quot;, $loc);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$geometry = str_replace(&amp;quot;)&amp;quot;,&amp;quot;&amp;quot;,$geometry);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$coordinate = explode(&amp;quot; &amp;quot;,$geometry);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$lon=$coordinate[0];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$lat=$coordinate[1];
&lt;br&gt;&lt;br&gt;Now this was for the web interface... ( the user can wait another 100ms 
&lt;br&gt;or so ... :] )
&lt;br&gt;As far as a server solution is concerned this *is* a time-consuming 
&lt;br&gt;procedure... especially so when you've got *thousands* of connections 
&lt;br&gt;per minute...
&lt;br&gt;&lt;br&gt;Furthermore, I'm developing the &amp;quot;beast&amp;quot; in Qt4 and - *ahem* - had never 
&lt;br&gt;needed to use libpq so I'm a bit lost here... :)
&lt;br&gt;&lt;br&gt;Could someone be so kind as to point to a code example (outside using 
&lt;br&gt;astext() method) ? :]
&lt;br&gt;&lt;br&gt;P.S. @John - found this to be interesting as I could store it in 
&lt;br&gt;QByteArray and go from there... ;) -- the real question here is: how to 
&lt;br&gt;interpret the byte array?
&lt;br&gt;&lt;br&gt;BR,
&lt;br&gt;Pedro.
&lt;br&gt;&lt;br&gt;&lt;br&gt;On 11/23/2009 09:50 PM, Paul Ramsey wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; That depends entirely on what you're planning to do with them once you
&lt;br&gt;&amp;gt; get them. You'll probably want to serialize them into a known form so
&lt;br&gt;&amp;gt; you can use them on the client side. ST_AsText() is one, very heavy,
&lt;br&gt;&amp;gt; option. Mapserver, to take an example, uses
&lt;br&gt;&amp;gt; encode(ST_AsBinary(ST_Force2D(geom)), 'hex'), so what goes over the
&lt;br&gt;&amp;gt; wire is hex strings, but those are easy to turn into binary arrays, in
&lt;br&gt;&amp;gt; WKB format, suitable for reading by a number of C++ libraries (like
&lt;br&gt;&amp;gt; OGR or GEOG or etc).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Best,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; P.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Mon, Nov 23, 2009 at 1:19 PM, Pedro Doria Meunier
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487456&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pdoria@...&lt;/a&gt;&amp;gt; &amp;nbsp;wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; Hi All,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; First off sorry for cross-posting. I'm hoping for a bigger audience... :]
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; As for my question:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; How does one deal with Postgis geom fields in C++ ?
&lt;br&gt;&amp;gt;&amp;gt; Google hasn't offered much help so far.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I know I can make a &amp;quot;SELECT astext(my_geom) FROM my_table&amp;quot; and after parsing
&lt;br&gt;&amp;gt;&amp;gt; the resulting text.
&lt;br&gt;&amp;gt;&amp;gt; This seems a bit awkward and time-consuming...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Is there a better way to deal with it?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Already thankful for any ideas,
&lt;br&gt;&amp;gt;&amp;gt; BR,
&lt;br&gt;&amp;gt;&amp;gt; Pedro.
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487456&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487456&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;
&lt;/div&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487456&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C%2B%2B-and-Postgis-tp26486046p26487456.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26487416</id>
	<title>Re: Corner coordinates from Geometry</title>
	<published>2009-11-23T14:39:50Z</published>
	<updated>2009-11-23T14:39:50Z</updated>
	<author>
		<name>Simon Greener-3</name>
	</author>
	<content type="html">Robert,
&lt;br&gt;&lt;br&gt;What do you mean by &amp;quot;corner coordinates&amp;quot;?
&lt;br&gt;&lt;br&gt;Do you mean the 4 corners of the MBR of each MULTIPOLYGON or do you mean that each MULTIPOLYGON is some sort of a collection of rectangular polygons and you want the corners of each of the rectangles?
&lt;br&gt;&lt;br&gt;regards
&lt;br&gt;SImon
&lt;br&gt;On Tue, 24 Nov 2009 05:53:33 +1100, Robert Hicks &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487416&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;robhyx@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Hi all, I have a table full of MULTIPOLYGON features and I am looking
&lt;br&gt;&amp;gt; for a way to parse the geometry from a given row and get back the
&lt;br&gt;&amp;gt; corner coordinates in decimal degrees. Is there a stored procedure for
&lt;br&gt;&amp;gt; this?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;SpatialDB Advice and Design, Solutions Architecture and Programming,
&lt;br&gt;Oracle Database 10g Administrator Certified Associate; Oracle Database 10g SQL Certified Professional
&lt;br&gt;Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE, Manifold GIS, FME, Radius Topology and Studio Specialist.
&lt;br&gt;39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia.
&lt;br&gt;Website: www.spatialdbadvisor.com
&lt;br&gt;&amp;nbsp; &amp;nbsp;Email: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487416&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;simon@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;Voice: +61 362 396397
&lt;br&gt;Mobile: +61 418 396391
&lt;br&gt;Skype: sggreener
&lt;br&gt;Longitude: 147.20515 (147° 12' 18&amp;quot; E)
&lt;br&gt;Latitude: -43.01530 (43° 00' 55&amp;quot; S)
&lt;br&gt;GeoHash: r22em9r98wg
&lt;br&gt;NAC:W80CK 7SWP3
&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487416&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Corner-coordinates-from-Geometry-tp26483855p26487416.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26486679</id>
	<title>Re: ST_* versus no ST_*</title>
	<published>2009-11-23T13:55:13Z</published>
	<updated>2009-11-23T13:55:13Z</updated>
	<author>
		<name>Paul Ramsey-4</name>
	</author>
	<content type="html">Use the ST_* variants, in case we ever decide to delete the non-ST_ versions.
&lt;br&gt;&lt;br&gt;P
&lt;br&gt;&lt;br&gt;On Mon, Nov 23, 2009 at 1:27 PM, Brian Peschel &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486679&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;brianp@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Probably an obvious thing, but.....
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Why would I use an ST_ fucntion versus a non ST_ function?  For example (in
&lt;br&gt;&amp;gt; Postgis 1.3.3, I haven't had a chance to upgrade yet) there is a AsGeom()
&lt;br&gt;&amp;gt; and a ST_AsGeom() function.  Both seem to return the same results.  Which
&lt;br&gt;&amp;gt; one should I use?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt; - Brian
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486679&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486679&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/ST_*-versus-no-ST_*-tp26486190p26486679.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26486607</id>
	<title>Re: C++ and Postgis</title>
	<published>2009-11-23T13:50:39Z</published>
	<updated>2009-11-23T13:50:39Z</updated>
	<author>
		<name>Paul Ramsey-4</name>
	</author>
	<content type="html">That depends entirely on what you're planning to do with them once you
&lt;br&gt;get them. You'll probably want to serialize them into a known form so
&lt;br&gt;you can use them on the client side. ST_AsText() is one, very heavy,
&lt;br&gt;option. Mapserver, to take an example, uses
&lt;br&gt;encode(ST_AsBinary(ST_Force2D(geom)), 'hex'), so what goes over the
&lt;br&gt;wire is hex strings, but those are easy to turn into binary arrays, in
&lt;br&gt;WKB format, suitable for reading by a number of C++ libraries (like
&lt;br&gt;OGR or GEOG or etc).
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;&lt;br&gt;P.
&lt;br&gt;&lt;br&gt;On Mon, Nov 23, 2009 at 1:19 PM, Pedro Doria Meunier
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486607&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pdoria@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi All,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; First off sorry for cross-posting. I'm hoping for a bigger audience... :]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; As for my question:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; How does one deal with Postgis geom fields in C++ ?
&lt;br&gt;&amp;gt; Google hasn't offered much help so far.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I know I can make a &amp;quot;SELECT astext(my_geom) FROM my_table&amp;quot; and after parsing
&lt;br&gt;&amp;gt; the resulting text.
&lt;br&gt;&amp;gt; This seems a bit awkward and time-consuming...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is there a better way to deal with it?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Already thankful for any ideas,
&lt;br&gt;&amp;gt; BR,
&lt;br&gt;&amp;gt; Pedro.
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486607&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486607&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C%2B%2B-and-Postgis-tp26486046p26486607.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26486190</id>
	<title>ST_* versus no ST_*</title>
	<published>2009-11-23T13:27:15Z</published>
	<updated>2009-11-23T13:27:15Z</updated>
	<author>
		<name>Brian Peschel</name>
	</author>
	<content type="html">Probably an obvious thing, but.....
&lt;br&gt;&lt;br&gt;Why would I use an ST_ fucntion versus a non ST_ function? &amp;nbsp;For example 
&lt;br&gt;(in Postgis 1.3.3, I haven't had a chance to upgrade yet) there is a 
&lt;br&gt;AsGeom() and a ST_AsGeom() function. &amp;nbsp;Both seem to return the same 
&lt;br&gt;results. &amp;nbsp;Which one should I use?
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;- Brian
&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486190&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/ST_*-versus-no-ST_*-tp26486190p26486190.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26486182</id>
	<title>Re: C++ and Postgis</title>
	<published>2009-11-23T13:26:54Z</published>
	<updated>2009-11-23T13:26:54Z</updated>
	<author>
		<name>Henri De Feraudy</name>
	</author>
	<content type="html">&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;font: inherit;&quot;&gt;&lt;DIV&gt;Well Pedro, your suggestion is what I'm doing.&lt;/DIV&gt;
&lt;DIV&gt;I'm using LibPQ.&lt;/DIV&gt;
&lt;DIV&gt;So I'm interested too.&lt;/DIV&gt;
&lt;DIV&gt;Henri&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR&gt;&lt;BR&gt;--- On &lt;B&gt;Mon, 11/23/09, Pedro Doria Meunier &lt;I&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486182&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pdoria@...&lt;/a&gt;&amp;gt;&lt;/I&gt;&lt;/B&gt; wrote:&lt;BR&gt;&lt;/DIV&gt;
&lt;BLOCKQUOTE style=&quot;BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px&quot;&gt;&lt;BR&gt;From: Pedro Doria Meunier &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486182&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pdoria@...&lt;/a&gt;&amp;gt;&lt;BR&gt;Subject: [postgis-users] C++ and Postgis&lt;BR&gt;To: &quot;PostGIS Users Discussion&quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486182&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;&amp;gt;&lt;BR&gt;Cc: &quot;Postgresql Mailing List&quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486182&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;&amp;gt;&lt;BR&gt;Date: Monday, November 23, 2009, 10:19 PM&lt;BR&gt;&lt;BR&gt;
&lt;DIV class=plainMail&gt;Hi All,&lt;BR&gt;&lt;BR&gt;First off sorry for cross-posting. I'm hoping for a bigger audience... :]&lt;BR&gt;&lt;BR&gt;As for my question:&lt;BR&gt;&lt;BR&gt;How does one deal with Postgis geom fields in C++ ?&lt;BR&gt;Google hasn't offered much help so far.&lt;BR&gt;&lt;BR&gt;I know I can make a &quot;SELECT astext(my_geom) FROM my_table&quot; and after parsing the resulting text.&lt;BR&gt;This seems a bit awkward and time-consuming...&lt;BR&gt;&lt;BR&gt;Is there a better way to deal with it?&lt;BR&gt;&lt;BR&gt;Already thankful for any ideas,&lt;BR&gt;BR,&lt;BR&gt;Pedro.&lt;BR&gt;_______________________________________________&lt;BR&gt;postgis-users mailing list&lt;BR&gt;&lt;A href=&quot;http://us.mc1108.mail.yahoo.com/mc/compose?to=postgis-users@postgis.refractions.net&quot; ymailto=&quot;mailto:postgis-users@postgis.refractions.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/A&gt;&lt;BR&gt;&lt;A href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=_blank rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/A&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486182&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C%2B%2B-and-Postgis-tp26486046p26486182.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26486109</id>
	<title>Using a rectangular selection</title>
	<published>2009-11-23T13:23:02Z</published>
	<updated>2009-11-23T13:23:02Z</updated>
	<author>
		<name>Henri De Feraudy</name>
	</author>
	<content type="html">&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;font: inherit;&quot;&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; I'm working in planar coordinates. I have a Postgis database and &lt;/DIV&gt;
&lt;DIV&gt;for starters&amp;nbsp;I want to limit my attention to all geometries that intersect a given rectangle (the &quot;selection&quot;).&lt;/DIV&gt;
&lt;DIV&gt;I can imagine that one could enumerate all geometries and ask in each case if they &lt;/DIV&gt;
&lt;DIV&gt;intersect the rectangle, but that doesnt seem very efficient, so what do you suggest?&lt;/DIV&gt;
&lt;DIV&gt;I only need general guidance so I can look at the various parts of the doc.&lt;/DIV&gt;
&lt;DIV&gt;Later I'll be wanting to clip the geometies with this selection.&lt;/DIV&gt;
&lt;DIV&gt;Still later I'll want to consider polygonal selections.&lt;/DIV&gt;
&lt;DIV&gt;By the way I'm accessing the PostGis database via LibPQ and have written my application &lt;/DIV&gt;
&lt;DIV&gt;in Qt.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanking you in advance&lt;/DIV&gt;
&lt;DIV&gt;Henri&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486109&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Using-a-rectangular-selection-tp26486109p26486109.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26486046</id>
	<title>C++ and Postgis</title>
	<published>2009-11-23T13:19:44Z</published>
	<updated>2009-11-23T13:19:44Z</updated>
	<author>
		<name>Pedro Doria Meunier</name>
	</author>
	<content type="html">Hi All,
&lt;br&gt;&lt;br&gt;First off sorry for cross-posting. I'm hoping for a bigger audience... :]
&lt;br&gt;&lt;br&gt;As for my question:
&lt;br&gt;&lt;br&gt;How does one deal with Postgis geom fields in C++ ?
&lt;br&gt;Google hasn't offered much help so far.
&lt;br&gt;&lt;br&gt;I know I can make a &amp;quot;SELECT astext(my_geom) FROM my_table&amp;quot; and after 
&lt;br&gt;parsing the resulting text.
&lt;br&gt;This seems a bit awkward and time-consuming...
&lt;br&gt;&lt;br&gt;Is there a better way to deal with it?
&lt;br&gt;&lt;br&gt;Already thankful for any ideas,
&lt;br&gt;BR,
&lt;br&gt;Pedro.
&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26486046&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C%2B%2B-and-Postgis-tp26486046p26486046.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26484382</id>
	<title>Re: identifying blank geometry fields</title>
	<published>2009-11-23T11:30:13Z</published>
	<updated>2009-11-23T11:30:13Z</updated>
	<author>
		<name>Stephen Woodbridge</name>
	</author>
	<content type="html">Did you try:
&lt;br&gt;&lt;br&gt;select count(*) from yourtable where the_geom is null;
&lt;br&gt;&lt;br&gt;delete from yourtable where the_geom is null:
&lt;br&gt;&lt;br&gt;&lt;br&gt;-Steve
&lt;br&gt;&lt;br&gt;Bob Hume wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I loaded a shapefile into my Postgresql/Postgis table. I'm 
&lt;br&gt;&amp;gt; trying to put data in some records that appear to have no data and 
&lt;br&gt;&amp;gt; eventually delete records with no geometry data. One problem is that I 
&lt;br&gt;&amp;gt; can't seem to identify records with no geometry data. &amp;nbsp;If I review the 
&lt;br&gt;&amp;gt; the_geom field for all records, there are several records that seem to 
&lt;br&gt;&amp;gt; be blank. &amp;nbsp;Nothing is shown in the field when I do a listing of all 
&lt;br&gt;&amp;gt; fields and all records. However, using ST_Npoints shows, for example, 
&lt;br&gt;&amp;gt; 438 points for the “blank” record and St_IsValidReason says that it is a 
&lt;br&gt;&amp;gt; Valid Geometry. &amp;nbsp;St_GeometryType says it is ST_MultiString. &amp;nbsp;However, 
&lt;br&gt;&amp;gt; St_AsEWKT for the record is blank. It doesn't show &amp;nbsp;any coordinates like 
&lt;br&gt;&amp;gt; the other records that do have data in the the_geom field. &amp;nbsp;St_IsEmpty 
&lt;br&gt;&amp;gt; shows &amp;quot;f&amp;quot; for all records, including the ones that are apparently empty.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;So, it seems that the geometry data is &amp;nbsp;missing, but it isn't.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;How can identify the records with apparently missing geometry 
&lt;br&gt;&amp;gt; data? &amp;nbsp;Thanks for the advice.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26484382&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;/div&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26484382&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/identifying-blank-geometry-fields-tp26484271p26484382.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26483855</id>
	<title>Corner coordinates from Geometry</title>
	<published>2009-11-23T10:53:33Z</published>
	<updated>2009-11-23T10:53:33Z</updated>
	<author>
		<name>dnbphysicist</name>
	</author>
	<content type="html">Hi all, I have a table full of MULTIPOLYGON features and I am looking
&lt;br&gt;for a way to parse the geometry from a given row and get back the
&lt;br&gt;corner coordinates in decimal degrees. Is there a stored procedure for
&lt;br&gt;this?
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;web &lt;a href=&quot;http://www.hyxspace.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.hyxspace.com&lt;/a&gt;&lt;br&gt;aim hyx1138
&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26483855&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Corner-coordinates-from-Geometry-tp26483855p26483855.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26484271</id>
	<title>identifying blank geometry fields</title>
	<published>2009-11-23T10:21:31Z</published>
	<updated>2009-11-23T10:21:31Z</updated>
	<author>
		<name>Bob Hume</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;&lt;head&gt;
&lt;title&gt;&lt;/title&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html;charset=utf-8&quot; /&gt;
&lt;meta http-equiv=&quot;Content-Style-Type&quot; content=&quot;text/css&quot; /&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div align=&quot;left&quot;&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot; font-size:10pt&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;I loaded a shapefile into my Postgresql/Postgis table. I'm trying to put data in some
records that appear to have no data and eventually delete records with no geometry data.
One problem is that I can't seem to identify records with no geometry data.&amp;#160; If I review the
the_geom field for all records, there are several records that seem to be blank.&amp;#160; Nothing is
shown in the field when I do a listing of all fields and all records. However, using ST_Npoints
shows, for example, 438 points for the &amp;ldquo;blank&amp;rdquo; record and St_IsValidReason says that it is a
Valid Geometry.&amp;#160; St_GeometryType says it is ST_MultiString.&amp;#160; However, St_AsEWKT for the
record is blank. It doesn't show&amp;#160; any coordinates like the other records that do have data in
the the_geom field.&amp;#160; St_IsEmpty shows &amp;quot;f&amp;quot; for all records, including the ones that are
apparently empty.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot; font-size:10pt&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot; font-size:10pt&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;So, it seems that the geometry data is&amp;#160; missing, but it isn't.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot; font-size:10pt&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot; font-size:10pt&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;How can identify the records with apparently missing geometry data?&amp;#160; Thanks for the
advice.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot; font-size:10pt&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26484271&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/identifying-blank-geometry-fields-tp26484271p26484271.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26482916</id>
	<title>Re: Small benchmark with PostGIS and MS SQL-ServerSpatial: Adjustment</title>
	<published>2009-11-23T09:52:33Z</published>
	<updated>2009-11-23T09:52:33Z</updated>
	<author>
		<name>Sufficool, Stanley-2</name>
	</author>
	<content type="html">#2 will always be faster on SQL Server because it is not *entirely* ACID
&lt;br&gt;compliant. It has a cache rather than a full table scan for row counts
&lt;br&gt;IIRC.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26482916&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users-bounces@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26482916&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users-bounces@...&lt;/a&gt;] On 
&lt;br&gt;&amp;gt; Behalf Of &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26482916&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rkrummen@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Sent: Monday, November 23, 2009 9:46 AM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26482916&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: [postgis-users] Small benchmark with PostGIS and MS 
&lt;br&gt;&amp;gt; SQL-ServerSpatial: Adjustment
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Two weeks ago, my advisor Stefan Keller posted some queries 
&lt;br&gt;&amp;gt; about database benchmarking. We would like to thank you for 
&lt;br&gt;&amp;gt; the useful suggestions. Wherever possible we adapted our 
&lt;br&gt;&amp;gt; queries. Due to restrictions in time, data and the limited 
&lt;br&gt;&amp;gt; spatial functionality of MS SQL Server, we could not 
&lt;br&gt;&amp;gt; implement any proposed refinement, but we like to show you 
&lt;br&gt;&amp;gt; what we got now. Feel free to comment.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; - Roland
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 1. Loading data and generating indices
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; SELECT * INTO {dataset} FROM {original dataset}
&lt;br&gt;&amp;gt; WHERE ST_Intersects(@geom, the_geom) ;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ALTER TABLE {dataset} ADD PRIMARY KEY (gid);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; CREATE INDEX gidx ON {dataset} USING gist &amp;nbsp;(the_geom);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 2. Non-spatial selection query
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; SELECT Count(*) FROM {dataset lines} l
&lt;br&gt;&amp;gt; WHERE l.roadflg='Y';
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 3. Spatial query I:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; a)
&lt;br&gt;&amp;gt; SELECT Count(*) FROM {dataset points} p
&lt;br&gt;&amp;gt; WHERE ST_Intersects(@poly, p.the_geom) ;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; b)
&lt;br&gt;&amp;gt; SELECT Count(*) FROM {dataset polygons} pg
&lt;br&gt;&amp;gt; WHERE ST_Intersects(@geom, pg.the_geom) ;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; c)
&lt;br&gt;&amp;gt; SELECT Count(*) FROM {dataset lines} l
&lt;br&gt;&amp;gt; WHERE ST_Intersects(@geom, l.the_geom) ;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 4. Spatial query II:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; a)
&lt;br&gt;&amp;gt; SELECT Count(*) FROM {dataset points} p
&lt;br&gt;&amp;gt; WHERE ST_DWITHIN(@point, p.the_geom, x)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; b)
&lt;br&gt;&amp;gt; SELECT Count(*) FROM {dataset polygons} pg
&lt;br&gt;&amp;gt; WHERE ST_DWITHIN(@point, pg.the_geom, x)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; c)
&lt;br&gt;&amp;gt; SELECT Count(*) FROM {dataset lines} l
&lt;br&gt;&amp;gt; WHERE ST_DWITHIN(@point, l.the_geom, x)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 5. Join of a linestring and a polygon table
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; SELECT SUM(ST_Length(pg.the_geom)) FROM {dataset lines} l
&lt;br&gt;&amp;gt; JOIN {dataset polygons} pg ON ST_DWITHIN(pg.the_geom, 
&lt;br&gt;&amp;gt; l.the_geom, 10) WHERE l.railflg = 'Y' 
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; postgis-users mailing list &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26482916&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;/div&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26482916&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Small-benchmark-with-PostGIS-and-MS-SQL-Server-Spatial%3A-Adjustment-tp26482805p26482916.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26482805</id>
	<title>Small benchmark with PostGIS and MS SQL-Server Spatial: Adjustment</title>
	<published>2009-11-23T09:45:36Z</published>
	<updated>2009-11-23T09:45:36Z</updated>
	<author>
		<name>rkrummen</name>
	</author>
	<content type="html">Two weeks ago, my advisor Stefan Keller posted some queries about database benchmarking. We would like to thank you for the useful suggestions. Wherever possible we adapted our queries. Due to restrictions in time, data and the limited spatial functionality of MS SQL Server, we could not implement any proposed refinement, but we like to show you what we got now. Feel free to comment.
&lt;br&gt;&lt;br&gt;- Roland
&lt;br&gt;&lt;br&gt;1. Loading data and generating indices
&lt;br&gt;&lt;br&gt;SELECT * INTO {dataset} FROM {original dataset}
&lt;br&gt;WHERE ST_Intersects(@geom, the_geom) ;
&lt;br&gt;&lt;br&gt;ALTER TABLE {dataset} ADD PRIMARY KEY (gid);
&lt;br&gt;&lt;br&gt;CREATE INDEX gidx ON {dataset} USING gist &amp;nbsp;(the_geom);
&lt;br&gt;&lt;br&gt;2. Non-spatial selection query
&lt;br&gt;&lt;br&gt;SELECT Count(*) FROM {dataset lines} l
&lt;br&gt;WHERE l.roadflg='Y';
&lt;br&gt;&lt;br&gt;3. Spatial query I:
&lt;br&gt;&lt;br&gt;a)
&lt;br&gt;SELECT Count(*) FROM {dataset points} p
&lt;br&gt;WHERE ST_Intersects(@poly, p.the_geom) ;
&lt;br&gt;&lt;br&gt;b)
&lt;br&gt;SELECT Count(*) FROM {dataset polygons} pg
&lt;br&gt;WHERE ST_Intersects(@geom, pg.the_geom) ;
&lt;br&gt;&lt;br&gt;c)
&lt;br&gt;SELECT Count(*) FROM {dataset lines} l
&lt;br&gt;WHERE ST_Intersects(@geom, l.the_geom) ;
&lt;br&gt;&lt;br&gt;4. Spatial query II:
&lt;br&gt;&lt;br&gt;a)
&lt;br&gt;SELECT Count(*) FROM {dataset points} p
&lt;br&gt;WHERE ST_DWITHIN(@point, p.the_geom, x)
&lt;br&gt;&lt;br&gt;b)
&lt;br&gt;SELECT Count(*) FROM {dataset polygons} pg
&lt;br&gt;WHERE ST_DWITHIN(@point, pg.the_geom, x)
&lt;br&gt;&lt;br&gt;c)
&lt;br&gt;SELECT Count(*) FROM {dataset lines} l
&lt;br&gt;WHERE ST_DWITHIN(@point, l.the_geom, x)
&lt;br&gt;&lt;br&gt;5. Join of a linestring and a polygon table
&lt;br&gt;&lt;br&gt;SELECT SUM(ST_Length(pg.the_geom)) FROM {dataset lines} l
&lt;br&gt;JOIN {dataset polygons} pg ON ST_DWITHIN(pg.the_geom, l.the_geom, 10)
&lt;br&gt;WHERE l.railflg = 'Y'
&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26482805&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Small-benchmark-with-PostGIS-and-MS-SQL-Server-Spatial%3A-Adjustment-tp26482805p26482805.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26481356</id>
	<title>Re: [Fossgis-talk] problems using epsg:3785</title>
	<published>2009-11-23T08:27:50Z</published>
	<updated>2009-11-23T08:27:50Z</updated>
	<author>
		<name>Ahmed Dassouki</name>
	</author>
	<content type="html">Hopefully my bad day is over now that i spilled yogurt on my lap lool. i 
&lt;br&gt;laughed. So how's the pomegranate ? how's your day going so far?
&lt;br&gt;&lt;br&gt;Jan Hartmann wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Peter,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The two projection definitions you give for Google Mercator differ 
&lt;br&gt;&amp;gt; only in the datum shift:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; +nadgrids=@null (epsg and PostGIS)
&lt;br&gt;&amp;gt; +towgs84=0,0,0,0,0,0,0 (spatialreference.org)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Number one works OK for me, number two is &amp;nbsp;wrong. You can find out 
&lt;br&gt;&amp;gt; about nadgrids at:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://trac.osgeo.org/proj/wiki/FAQ&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://trac.osgeo.org/proj/wiki/FAQ&lt;/a&gt;, section &amp;quot;Changing Ellipsoid / Why 
&lt;br&gt;&amp;gt; can't I convert from WGS84 to Virtual Globe Mercator?&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; As to &amp;nbsp;the two gdalwarp's: &amp;nbsp;*both* projection definitions need a 
&lt;br&gt;&amp;gt; +datum, +towgs84 or a +nadgrids parameter, else the 
&lt;br&gt;&amp;gt; WGS84-datum-transformation won't &amp;nbsp;work. In your case, the first warp 
&lt;br&gt;&amp;gt; looks OK to me (both projections are OK), the second one gets its 
&lt;br&gt;&amp;gt; source projection from the source file. I would guess that something 
&lt;br&gt;&amp;gt; is wrong with the datum information there, and that the first warp is 
&lt;br&gt;&amp;gt; the correct one. Don't you have any ground information?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Jan
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Peter Freimuth wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; i am struggling around with a projection problem. I want to harmonize
&lt;br&gt;&amp;gt;&amp;gt; several hundreds of satellite images from different UTM Zones to the
&lt;br&gt;&amp;gt;&amp;gt; Google Projection Spherical Mercator. I am using a python script which
&lt;br&gt;&amp;gt;&amp;gt; handles the job for me using &amp;quot;gdalwarp&amp;quot; from the 1.6.1 and 1.7.0dev
&lt;br&gt;&amp;gt;&amp;gt; release (same result).
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; Find attached the gdalinfo output of the original file
&lt;br&gt;&amp;gt;&amp;gt; (gdalinfo_2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB.txt):
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Upper Left &amp;nbsp;( &amp;nbsp;691500.000,-2471500.000) ( 49d 8'25.94&amp;quot;W, 22d20'19.37&amp;quot;S)
&lt;br&gt;&amp;gt;&amp;gt; Lower Left &amp;nbsp;( &amp;nbsp;691500.000,-2496500.000) ( 49d 8'15.09&amp;quot;W, 22d33'52.01&amp;quot;S)
&lt;br&gt;&amp;gt;&amp;gt; Upper Right ( &amp;nbsp;716500.000,-2471500.000) ( 48d53'52.47&amp;quot;W, 22d20'8.69&amp;quot;S)
&lt;br&gt;&amp;gt;&amp;gt; Lower Right ( &amp;nbsp;716500.000,-2496500.000) ( 48d53'40.21&amp;quot;W, 22d33'41.21&amp;quot;S)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; echo &amp;quot;warp giving a source epsg code&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; gdalwarp -s_srs &amp;quot;EPSG:32622&amp;quot; -t_srs &amp;quot;EPSG:3785&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; 2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB.pix
&lt;br&gt;&amp;gt;&amp;gt; c:\tmp\2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB_32622-pix-3785.tif
&lt;br&gt;&amp;gt;&amp;gt; this results in
&lt;br&gt;&amp;gt;&amp;gt; (gdalinfo_2009-03-02T140133_RE3_3A-NAC_642351_34785_32622-pix-3785.txt)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Upper Left &amp;nbsp;(-5470299.856,-2535649.342)
&lt;br&gt;&amp;gt;&amp;gt; Lower Left &amp;nbsp;(-5470299.856,-2563039.918)
&lt;br&gt;&amp;gt;&amp;gt; Upper Right (-5442909.280,-2535649.342)
&lt;br&gt;&amp;gt;&amp;gt; Lower Right (-5442909.280,-2563039.918)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; echo &amp;quot;warp without giving a source epsg code&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; gdalwarp -t_srs &amp;quot;EPSG:3785&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; 2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB.pix
&lt;br&gt;&amp;gt;&amp;gt; c:\tmp\2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB_pix-3785.tif
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This results in
&lt;br&gt;&amp;gt;&amp;gt; (gdalinfo_2009-03-02T140133_RE3_3A-NAC_642351_34785_pix-3785.txt)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Upper Left &amp;nbsp;(-5470299.856,-2551883.715)
&lt;br&gt;&amp;gt;&amp;gt; Lower Left &amp;nbsp;(-5470299.856,-2579432.525)
&lt;br&gt;&amp;gt;&amp;gt; Upper Right (-5442913.703,-2551883.715)
&lt;br&gt;&amp;gt;&amp;gt; Lower Right (-5442913.703,-2579432.525)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Somehow i get big shift in the Y values of the images.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; As a kind of reference i have a polygon layer in epsg:4326 stored in a
&lt;br&gt;&amp;gt;&amp;gt; postgis 1.4.0 database table which contains the exact definitions of the
&lt;br&gt;&amp;gt;&amp;gt; tiling grid which is used to create the satallite images.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The same shift can be reproduce in postgis when using a somehow
&lt;br&gt;&amp;gt;&amp;gt; different epsg:3785 definition:
&lt;br&gt;&amp;gt;&amp;gt; As you can see, there is a significant difference in the Y value.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; select
&lt;br&gt;&amp;gt;&amp;gt; astext(envelope(transform(GeomFromEWKT('SRID=4326;POLYGON((-49.1405410766602
&lt;br&gt;&amp;gt;&amp;gt; -22.5644474029541,-49.1405410766602 -22.3357467651367,-48.8945007324219
&lt;br&gt;&amp;gt;&amp;gt; -22.3357467651367,-48.8945007324219 -22.5644474029541,-49.1405410766602
&lt;br&gt;&amp;gt;&amp;gt; -22.5644474029541))'::TEXT),3785)))
&lt;br&gt;&amp;gt;&amp;gt; =&amp;gt;&amp;gt;&amp;quot;POLYGON((-5470300 -2579430.25,-5470300 -2551883.5,-5442911
&lt;br&gt;&amp;gt;&amp;gt; -2551883.5,-5442911 -2579430.25,-5470300 -2579430.25))&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; select
&lt;br&gt;&amp;gt;&amp;gt; astext(envelope(transform(GeomFromEWKT('SRID=4326;POLYGON((-49.1405410766602
&lt;br&gt;&amp;gt;&amp;gt; -22.5644474029541,-49.1405410766602 -22.3357467651367,-48.8945007324219
&lt;br&gt;&amp;gt;&amp;gt; -22.3357467651367,-48.8945007324219 -22.5644474029541,-49.1405410766602
&lt;br&gt;&amp;gt;&amp;gt; -22.5644474029541))'::TEXT),903785)))
&lt;br&gt;&amp;gt;&amp;gt; =&amp;gt;&amp;gt;&amp;quot;POLYGON((-5470300 -2563038,-5470300 -2535649.25,-5442911
&lt;br&gt;&amp;gt;&amp;gt; -2535649.25,-5442911 -2563038,-5470300 -2563038))&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Here are the two definitons as they are in my PostGIS spatial_ref_sys table.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;3785&amp;quot; as defined in postgis 1.4.0 and proj-4.7.0 epsg file
&lt;br&gt;&amp;gt;&amp;gt; +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0
&lt;br&gt;&amp;gt;&amp;gt; +units=m +k=1.0 +nadgrids=@null +no_defs
&lt;br&gt;&amp;gt;&amp;gt; PROJCS[&amp;quot;Popular Visualisation CRS / Mercator (deprecated)&amp;quot;,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; GEOGCS[&amp;quot;Popular Visualisation CRS&amp;quot;,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATUM[&amp;quot;Popular_Visualisation_Datum&amp;quot;,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPHEROID[&amp;quot;Popular Visualisation Sphere&amp;quot;,6378137,0,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;7059&amp;quot;]],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TOWGS84[0,0,0,0,0,0,0],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;6055&amp;quot;]],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRIMEM[&amp;quot;Greenwich&amp;quot;,0,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;8901&amp;quot;]],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UNIT[&amp;quot;degree&amp;quot;,0.01745329251994328,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;9122&amp;quot;]],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;4055&amp;quot;]],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; UNIT[&amp;quot;metre&amp;quot;,1,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;9001&amp;quot;]],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; PROJECTION[&amp;quot;Mercator_1SP&amp;quot;],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;central_meridian&amp;quot;,0],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;scale_factor&amp;quot;,1],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;false_easting&amp;quot;,0],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;false_northing&amp;quot;,0],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;3785&amp;quot;],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; AXIS[&amp;quot;X&amp;quot;,EAST],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; AXIS[&amp;quot;Y&amp;quot;,NORTH]]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; I added a second definition which i took from spatialreference.org
&lt;br&gt;&amp;gt;&amp;gt; (&lt;a href=&quot;http://spatialreference.org/ref/epsg/3785&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://spatialreference.org/ref/epsg/3785&lt;/a&gt;) with the srid 903785
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;903785&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
&lt;br&gt;&amp;gt;&amp;gt; +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
&lt;br&gt;&amp;gt;&amp;gt; PROJCS[&amp;quot;Popular Visualisation CRS / Mercator&amp;quot;,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; GEOGCS[&amp;quot;Popular Visualisation CRS&amp;quot;,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATUM[&amp;quot;Popular_Visualisation_Datum&amp;quot;,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPHEROID[&amp;quot;Popular Visualisation Sphere&amp;quot;,6378137,0,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;7059&amp;quot;]],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TOWGS84[0,0,0,0,0,0,0],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;6055&amp;quot;]],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRIMEM[&amp;quot;Greenwich&amp;quot;,0,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;8901&amp;quot;]],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UNIT[&amp;quot;degree&amp;quot;,0.01745329251994328,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;9122&amp;quot;]],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;4055&amp;quot;]],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; UNIT[&amp;quot;metre&amp;quot;,1,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;9001&amp;quot;]],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; PROJECTION[&amp;quot;Mercator_1SP&amp;quot;],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;central_meridian&amp;quot;,0],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;scale_factor&amp;quot;,1],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;false_easting&amp;quot;,0],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;false_northing&amp;quot;,0],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;3785&amp;quot;],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; AXIS[&amp;quot;X&amp;quot;,EAST],
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; AXIS[&amp;quot;Y&amp;quot;,NORTH]]
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Now the big questions:
&lt;br&gt;&amp;gt;&amp;gt; Which of the above given definitions is the correct one?? So which of
&lt;br&gt;&amp;gt;&amp;gt; the polygons is the correct result when i want epsg:3785?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; How &amp;nbsp;can it be explained that gdalwarp seems to use two different
&lt;br&gt;&amp;gt;&amp;gt; projections when warping the same file to the same output projection?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Any ideas or comments??
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks for any kind of help,
&lt;br&gt;&amp;gt;&amp;gt; Peter
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; ------------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; Fossgis-talk-liste mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26481356&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Fossgis-talk-liste@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://lists.fossgis.de/mailman/listinfo/fossgis-talk-liste&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.fossgis.de/mailman/listinfo/fossgis-talk-liste&lt;/a&gt;&lt;br&gt;&amp;gt; ------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26481356&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26481356&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/problems-using-epsg%3A3785-tp26479900p26481356.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26481105</id>
	<title>Re: [Fossgis-talk] problems using epsg:3785</title>
	<published>2009-11-23T08:16:52Z</published>
	<updated>2009-11-23T08:16:52Z</updated>
	<author>
		<name>Jan Hartmann</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-15&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
Hi Peter,&lt;br&gt;
&lt;br&gt;
The two projection definitions you give for Google Mercator differ only
in the datum shift:&lt;br&gt;
&lt;br&gt;
+nadgrids=@null (epsg and PostGIS)&lt;br&gt;
+towgs84=0,0,0,0,0,0,0 (spatialreference.org)&lt;br&gt;
&lt;br&gt;
Number one works OK for me, number two is  wrong. You can find out
about nadgrids at:&lt;br&gt;
&lt;br&gt;
&lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;http://trac.osgeo.org/proj/wiki/FAQ&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://trac.osgeo.org/proj/wiki/FAQ&lt;/a&gt;, section &quot;Changing Ellipsoid / Why
can't I convert from WGS84 to Virtual Globe Mercator?&quot;&lt;br&gt;
&lt;br&gt;
As to  the two gdalwarp's:  *both* projection definitions need a
+datum, +towgs84 or a +nadgrids parameter, else the
WGS84-datum-transformation won't  work. In your case, the first warp
looks OK to me (both projections are OK), the second one gets its
source projection from the source file. I would guess that something is
wrong with the datum information there, and that the first warp is the
correct one. Don't you have any ground information?&lt;br&gt;
&lt;br&gt;
Jan&lt;br&gt;
&lt;br&gt;
Peter Freimuth wrote:
&lt;blockquote cite=&quot;mid:4B0AA744.1070202@arcor.de&quot; type=&quot;cite&quot;&gt;
  &lt;pre wrap=&quot;&quot;&gt;Hi all,

i am struggling around with a projection problem. I want to harmonize
several hundreds of satellite images from different UTM Zones to the
Google Projection Spherical Mercator. I am using a python script which
handles the job for me using &quot;gdalwarp&quot; from the 1.6.1 and 1.7.0dev
release (same result).
 
Find attached the gdalinfo output of the original file
(gdalinfo_2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB.txt):

Upper Left  (  691500.000,-2471500.000) ( 49d 8'25.94&quot;W, 22d20'19.37&quot;S)
Lower Left  (  691500.000,-2496500.000) ( 49d 8'15.09&quot;W, 22d33'52.01&quot;S)
Upper Right (  716500.000,-2471500.000) ( 48d53'52.47&quot;W, 22d20'8.69&quot;S)
Lower Right (  716500.000,-2496500.000) ( 48d53'40.21&quot;W, 22d33'41.21&quot;S)

echo &quot;warp giving a source epsg code&quot;
gdalwarp -s_srs &quot;EPSG:32622&quot; -t_srs &quot;EPSG:3785&quot;
2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB.pix
c:\tmp\2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB_32622-pix-3785.tif
this results in
(gdalinfo_2009-03-02T140133_RE3_3A-NAC_642351_34785_32622-pix-3785.txt)

Upper Left  (-5470299.856,-2535649.342)
Lower Left  (-5470299.856,-2563039.918)
Upper Right (-5442909.280,-2535649.342)
Lower Right (-5442909.280,-2563039.918)

echo &quot;warp without giving a source epsg code&quot;
gdalwarp -t_srs &quot;EPSG:3785&quot;
2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB.pix
c:\tmp\2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB_pix-3785.tif

This results in
(gdalinfo_2009-03-02T140133_RE3_3A-NAC_642351_34785_pix-3785.txt)

Upper Left  (-5470299.856,-2551883.715)
Lower Left  (-5470299.856,-2579432.525)
Upper Right (-5442913.703,-2551883.715)
Lower Right (-5442913.703,-2579432.525)

Somehow i get big shift in the Y values of the images.

As a kind of reference i have a polygon layer in epsg:4326 stored in a
postgis 1.4.0 database table which contains the exact definitions of the
tiling grid which is used to create the satallite images.

The same shift can be reproduce in postgis when using a somehow
different epsg:3785 definition:
As you can see, there is a significant difference in the Y value.

select
astext(envelope(transform(GeomFromEWKT('SRID=4326;POLYGON((-49.1405410766602
-22.5644474029541,-49.1405410766602 -22.3357467651367,-48.8945007324219
-22.3357467651367,-48.8945007324219 -22.5644474029541,-49.1405410766602
-22.5644474029541))'::TEXT),3785)))
=&amp;gt;&amp;gt;&quot;POLYGON((-5470300 -2579430.25,-5470300 -2551883.5,-5442911
-2551883.5,-5442911 -2579430.25,-5470300 -2579430.25))&quot;

select
astext(envelope(transform(GeomFromEWKT('SRID=4326;POLYGON((-49.1405410766602
-22.5644474029541,-49.1405410766602 -22.3357467651367,-48.8945007324219
-22.3357467651367,-48.8945007324219 -22.5644474029541,-49.1405410766602
-22.5644474029541))'::TEXT),903785)))
=&amp;gt;&amp;gt;&quot;POLYGON((-5470300 -2563038,-5470300 -2535649.25,-5442911
-2535649.25,-5442911 -2563038,-5470300 -2563038))&quot;

Here are the two definitons as they are in my PostGIS spatial_ref_sys table.

&quot;3785&quot; as defined in postgis 1.4.0 and proj-4.7.0 epsg file
+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0
+units=m +k=1.0 +nadgrids=@null +no_defs
PROJCS[&quot;Popular Visualisation CRS / Mercator (deprecated)&quot;,
    GEOGCS[&quot;Popular Visualisation CRS&quot;,
        DATUM[&quot;Popular_Visualisation_Datum&quot;,
            SPHEROID[&quot;Popular Visualisation Sphere&quot;,6378137,0,
                AUTHORITY[&quot;EPSG&quot;,&quot;7059&quot;]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY[&quot;EPSG&quot;,&quot;6055&quot;]],
        PRIMEM[&quot;Greenwich&quot;,0,
            AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],
        UNIT[&quot;degree&quot;,0.01745329251994328,
            AUTHORITY[&quot;EPSG&quot;,&quot;9122&quot;]],
        AUTHORITY[&quot;EPSG&quot;,&quot;4055&quot;]],
    UNIT[&quot;metre&quot;,1,
        AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]],
    PROJECTION[&quot;Mercator_1SP&quot;],
    PARAMETER[&quot;central_meridian&quot;,0],
    PARAMETER[&quot;scale_factor&quot;,1],
    PARAMETER[&quot;false_easting&quot;,0],
    PARAMETER[&quot;false_northing&quot;,0],
    AUTHORITY[&quot;EPSG&quot;,&quot;3785&quot;],
    AXIS[&quot;X&quot;,EAST],
    AXIS[&quot;Y&quot;,NORTH]]&quot;
   
I added a second definition which i took from spatialreference.org
(&lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;http://spatialreference.org/ref/epsg/3785&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://spatialreference.org/ref/epsg/3785&lt;/a&gt;) with the srid 903785
&quot;903785&quot;
+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
PROJCS[&quot;Popular Visualisation CRS / Mercator&quot;,
    GEOGCS[&quot;Popular Visualisation CRS&quot;,
        DATUM[&quot;Popular_Visualisation_Datum&quot;,
            SPHEROID[&quot;Popular Visualisation Sphere&quot;,6378137,0,
                AUTHORITY[&quot;EPSG&quot;,&quot;7059&quot;]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY[&quot;EPSG&quot;,&quot;6055&quot;]],
        PRIMEM[&quot;Greenwich&quot;,0,
            AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],
        UNIT[&quot;degree&quot;,0.01745329251994328,
            AUTHORITY[&quot;EPSG&quot;,&quot;9122&quot;]],
        AUTHORITY[&quot;EPSG&quot;,&quot;4055&quot;]],
    UNIT[&quot;metre&quot;,1,
        AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]],
    PROJECTION[&quot;Mercator_1SP&quot;],
    PARAMETER[&quot;central_meridian&quot;,0],
    PARAMETER[&quot;scale_factor&quot;,1],
    PARAMETER[&quot;false_easting&quot;,0],
    PARAMETER[&quot;false_northing&quot;,0],
    AUTHORITY[&quot;EPSG&quot;,&quot;3785&quot;],
    AXIS[&quot;X&quot;,EAST],
    AXIS[&quot;Y&quot;,NORTH]]


Now the big questions:
Which of the above given definitions is the correct one?? So which of
the polygons is the correct result when i want epsg:3785?

How  can it be explained that gdalwarp seems to use two different
projections when warping the same file to the same output projection?

Any ideas or comments??

Thanks for any kind of help,
Peter

  &lt;/pre&gt;
  &lt;pre wrap=&quot;&quot;&gt;&lt;pre wrap=&quot;&quot;&gt;&lt;pre wrap=&quot;&quot;&gt;&lt;pre wrap=&quot;&quot;&gt;
&lt;hr size=&quot;4&quot; width=&quot;90%&quot;&gt;
_______________________________________________
Fossgis-talk-liste mailing list
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26481105&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Fossgis-talk-liste@...&lt;/a&gt;
&lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;https://lists.fossgis.de/mailman/listinfo/fossgis-talk-liste&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.fossgis.de/mailman/listinfo/fossgis-talk-liste&lt;/a&gt;
&lt;/pre&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26481105&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/problems-using-epsg%3A3785-tp26479900p26481105.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26479900</id>
	<title>problems using epsg:3785</title>
	<published>2009-11-23T07:16:20Z</published>
	<updated>2009-11-23T07:16:20Z</updated>
	<author>
		<name>Peter Freimuth</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;i am struggling around with a projection problem. I want to harmonize
&lt;br&gt;several hundreds of satellite images from different UTM Zones to the
&lt;br&gt;Google Projection Spherical Mercator. I am using a python script which
&lt;br&gt;handles the job for me using &amp;quot;gdalwarp&amp;quot; from the 1.6.1 and 1.7.0dev
&lt;br&gt;release (same result).
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Find attached the gdalinfo output of the original file
&lt;br&gt;(gdalinfo_2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB.txt):
&lt;br&gt;&lt;br&gt;Upper Left &amp;nbsp;( &amp;nbsp;691500.000,-2471500.000) ( 49d 8'25.94&amp;quot;W, 22d20'19.37&amp;quot;S)
&lt;br&gt;Lower Left &amp;nbsp;( &amp;nbsp;691500.000,-2496500.000) ( 49d 8'15.09&amp;quot;W, 22d33'52.01&amp;quot;S)
&lt;br&gt;Upper Right ( &amp;nbsp;716500.000,-2471500.000) ( 48d53'52.47&amp;quot;W, 22d20'8.69&amp;quot;S)
&lt;br&gt;Lower Right ( &amp;nbsp;716500.000,-2496500.000) ( 48d53'40.21&amp;quot;W, 22d33'41.21&amp;quot;S)
&lt;br&gt;&lt;br&gt;echo &amp;quot;warp giving a source epsg code&amp;quot;
&lt;br&gt;gdalwarp -s_srs &amp;quot;EPSG:32622&amp;quot; -t_srs &amp;quot;EPSG:3785&amp;quot;
&lt;br&gt;2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB.pix
&lt;br&gt;c:\tmp\2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB_32622-pix-3785.tif
&lt;br&gt;this results in
&lt;br&gt;(gdalinfo_2009-03-02T140133_RE3_3A-NAC_642351_34785_32622-pix-3785.txt)
&lt;br&gt;&lt;br&gt;Upper Left &amp;nbsp;(-5470299.856,-2535649.342)
&lt;br&gt;Lower Left &amp;nbsp;(-5470299.856,-2563039.918)
&lt;br&gt;Upper Right (-5442909.280,-2535649.342)
&lt;br&gt;Lower Right (-5442909.280,-2563039.918)
&lt;br&gt;&lt;br&gt;echo &amp;quot;warp without giving a source epsg code&amp;quot;
&lt;br&gt;gdalwarp -t_srs &amp;quot;EPSG:3785&amp;quot;
&lt;br&gt;2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB.pix
&lt;br&gt;c:\tmp\2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB_pix-3785.tif
&lt;br&gt;&lt;br&gt;This results in
&lt;br&gt;(gdalinfo_2009-03-02T140133_RE3_3A-NAC_642351_34785_pix-3785.txt)
&lt;br&gt;&lt;br&gt;Upper Left &amp;nbsp;(-5470299.856,-2551883.715)
&lt;br&gt;Lower Left &amp;nbsp;(-5470299.856,-2579432.525)
&lt;br&gt;Upper Right (-5442913.703,-2551883.715)
&lt;br&gt;Lower Right (-5442913.703,-2579432.525)
&lt;br&gt;&lt;br&gt;Somehow i get big shift in the Y values of the images.
&lt;br&gt;&lt;br&gt;As a kind of reference i have a polygon layer in epsg:4326 stored in a
&lt;br&gt;postgis 1.4.0 database table which contains the exact definitions of the
&lt;br&gt;tiling grid which is used to create the satallite images.
&lt;br&gt;&lt;br&gt;The same shift can be reproduce in postgis when using a somehow
&lt;br&gt;different epsg:3785 definition:
&lt;br&gt;As you can see, there is a significant difference in the Y value.
&lt;br&gt;&lt;br&gt;select
&lt;br&gt;astext(envelope(transform(GeomFromEWKT('SRID=4326;POLYGON((-49.1405410766602
&lt;br&gt;-22.5644474029541,-49.1405410766602 -22.3357467651367,-48.8945007324219
&lt;br&gt;-22.3357467651367,-48.8945007324219 -22.5644474029541,-49.1405410766602
&lt;br&gt;-22.5644474029541))'::TEXT),3785)))
&lt;br&gt;=&amp;gt;&amp;gt;&amp;quot;POLYGON((-5470300 -2579430.25,-5470300 -2551883.5,-5442911
&lt;br&gt;-2551883.5,-5442911 -2579430.25,-5470300 -2579430.25))&amp;quot;
&lt;br&gt;&lt;br&gt;select
&lt;br&gt;astext(envelope(transform(GeomFromEWKT('SRID=4326;POLYGON((-49.1405410766602
&lt;br&gt;-22.5644474029541,-49.1405410766602 -22.3357467651367,-48.8945007324219
&lt;br&gt;-22.3357467651367,-48.8945007324219 -22.5644474029541,-49.1405410766602
&lt;br&gt;-22.5644474029541))'::TEXT),903785)))
&lt;br&gt;=&amp;gt;&amp;gt;&amp;quot;POLYGON((-5470300 -2563038,-5470300 -2535649.25,-5442911
&lt;br&gt;-2535649.25,-5442911 -2563038,-5470300 -2563038))&amp;quot;
&lt;br&gt;&lt;br&gt;Here are the two definitons as they are in my PostGIS spatial_ref_sys table.
&lt;br&gt;&lt;br&gt;&amp;quot;3785&amp;quot; as defined in postgis 1.4.0 and proj-4.7.0 epsg file
&lt;br&gt;+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0
&lt;br&gt;+units=m +k=1.0 +nadgrids=@null +no_defs
&lt;br&gt;PROJCS[&amp;quot;Popular Visualisation CRS / Mercator (deprecated)&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; GEOGCS[&amp;quot;Popular Visualisation CRS&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATUM[&amp;quot;Popular_Visualisation_Datum&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPHEROID[&amp;quot;Popular Visualisation Sphere&amp;quot;,6378137,0,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;7059&amp;quot;]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TOWGS84[0,0,0,0,0,0,0],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;6055&amp;quot;]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRIMEM[&amp;quot;Greenwich&amp;quot;,0,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;8901&amp;quot;]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UNIT[&amp;quot;degree&amp;quot;,0.01745329251994328,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;9122&amp;quot;]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;4055&amp;quot;]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; UNIT[&amp;quot;metre&amp;quot;,1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;9001&amp;quot;]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PROJECTION[&amp;quot;Mercator_1SP&amp;quot;],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;central_meridian&amp;quot;,0],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;scale_factor&amp;quot;,1],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;false_easting&amp;quot;,0],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;false_northing&amp;quot;,0],
&lt;br&gt;&amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;3785&amp;quot;],
&lt;br&gt;&amp;nbsp; &amp;nbsp; AXIS[&amp;quot;X&amp;quot;,EAST],
&lt;br&gt;&amp;nbsp; &amp;nbsp; AXIS[&amp;quot;Y&amp;quot;,NORTH]]&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp;
&lt;br&gt;I added a second definition which i took from spatialreference.org
&lt;br&gt;(&lt;a href=&quot;http://spatialreference.org/ref/epsg/3785&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://spatialreference.org/ref/epsg/3785&lt;/a&gt;) with the srid 903785
&lt;br&gt;&amp;quot;903785&amp;quot;
&lt;br&gt;+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
&lt;br&gt;+towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
&lt;br&gt;PROJCS[&amp;quot;Popular Visualisation CRS / Mercator&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; GEOGCS[&amp;quot;Popular Visualisation CRS&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATUM[&amp;quot;Popular_Visualisation_Datum&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPHEROID[&amp;quot;Popular Visualisation Sphere&amp;quot;,6378137,0,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;7059&amp;quot;]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TOWGS84[0,0,0,0,0,0,0],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;6055&amp;quot;]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRIMEM[&amp;quot;Greenwich&amp;quot;,0,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;8901&amp;quot;]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UNIT[&amp;quot;degree&amp;quot;,0.01745329251994328,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;9122&amp;quot;]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;4055&amp;quot;]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; UNIT[&amp;quot;metre&amp;quot;,1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;9001&amp;quot;]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PROJECTION[&amp;quot;Mercator_1SP&amp;quot;],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;central_meridian&amp;quot;,0],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;scale_factor&amp;quot;,1],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;false_easting&amp;quot;,0],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;false_northing&amp;quot;,0],
&lt;br&gt;&amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;3785&amp;quot;],
&lt;br&gt;&amp;nbsp; &amp;nbsp; AXIS[&amp;quot;X&amp;quot;,EAST],
&lt;br&gt;&amp;nbsp; &amp;nbsp; AXIS[&amp;quot;Y&amp;quot;,NORTH]]
&lt;br&gt;&lt;br&gt;&lt;br&gt;Now the big questions:
&lt;br&gt;Which of the above given definitions is the correct one?? So which of
&lt;br&gt;the polygons is the correct result when i want epsg:3785?
&lt;br&gt;&lt;br&gt;How &amp;nbsp;can it be explained that gdalwarp seems to use two different
&lt;br&gt;projections when warping the same file to the same output projection?
&lt;br&gt;&lt;br&gt;Any ideas or comments??
&lt;br&gt;&lt;br&gt;Thanks for any kind of help,
&lt;br&gt;Peter
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Peter Freimuth &amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br /&gt;Driver: GTiff/GeoTIFF
&lt;br&gt;Files: 2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB_pix-3785.tif
&lt;br&gt;Size is 5051, 5081
&lt;br&gt;Coordinate System is:
&lt;br&gt;PROJCS[&amp;quot;unnamed&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; GEOGCS[,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATUM[&amp;quot;unknown&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPHEROID[&amp;quot;unretrievable - using WGS84&amp;quot;,6378137,298.257223563]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRIMEM[&amp;quot;Greenwich&amp;quot;,0],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UNIT[&amp;quot;degree&amp;quot;,0.0174532925199433]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; UNIT[&amp;quot;metre&amp;quot;,1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;9001&amp;quot;]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;3785&amp;quot;]]
&lt;br&gt;Origin = (-5470299.855895809800000,-2551883.714705614400000)
&lt;br&gt;Pixel Size = (5.421926883630149,-5.421926883630149)
&lt;br&gt;Metadata:
&lt;br&gt;&amp;nbsp; AREA_OR_POINT=Area
&lt;br&gt;Image Structure Metadata:
&lt;br&gt;&amp;nbsp; INTERLEAVE=PIXEL
&lt;br&gt;Corner Coordinates:
&lt;br&gt;Upper Left &amp;nbsp;(-5470299.856,-2551883.715) 
&lt;br&gt;Lower Left &amp;nbsp;(-5470299.856,-2579432.525) 
&lt;br&gt;Upper Right (-5442913.703,-2551883.715) 
&lt;br&gt;Lower Right (-5442913.703,-2579432.525) 
&lt;br&gt;Center &amp;nbsp; &amp;nbsp; &amp;nbsp;(-5456606.780,-2565658.120) 
&lt;br&gt;Band 1 Block=5051x1 Type=Byte, ColorInterp=Red
&lt;br&gt;Band 2 Block=5051x1 Type=Byte, ColorInterp=Green
&lt;br&gt;Band 3 Block=5051x1 Type=Byte, ColorInterp=Blue
&lt;br&gt;&lt;br /&gt;Driver: GTiff/GeoTIFF
&lt;br&gt;Files: 2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB_32622-pix-3785.tif
&lt;br&gt;Size is 5066, 5066
&lt;br&gt;Coordinate System is:
&lt;br&gt;PROJCS[&amp;quot;unnamed&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; GEOGCS[,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATUM[&amp;quot;unknown&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPHEROID[&amp;quot;unretrievable - using WGS84&amp;quot;,6378137,298.257223563]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRIMEM[&amp;quot;Greenwich&amp;quot;,0],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UNIT[&amp;quot;degree&amp;quot;,0.0174532925199433]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; UNIT[&amp;quot;metre&amp;quot;,1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;9001&amp;quot;]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;3785&amp;quot;]]
&lt;br&gt;Origin = (-5470299.855895809800000,-2535649.341730865200000)
&lt;br&gt;Pixel Size = (5.406746173490638,-5.406746173490638)
&lt;br&gt;Metadata:
&lt;br&gt;&amp;nbsp; AREA_OR_POINT=Area
&lt;br&gt;Image Structure Metadata:
&lt;br&gt;&amp;nbsp; INTERLEAVE=PIXEL
&lt;br&gt;Corner Coordinates:
&lt;br&gt;Upper Left &amp;nbsp;(-5470299.856,-2535649.342) 
&lt;br&gt;Lower Left &amp;nbsp;(-5470299.856,-2563039.918) 
&lt;br&gt;Upper Right (-5442909.280,-2535649.342) 
&lt;br&gt;Lower Right (-5442909.280,-2563039.918) 
&lt;br&gt;Center &amp;nbsp; &amp;nbsp; &amp;nbsp;(-5456604.568,-2549344.630) 
&lt;br&gt;Band 1 Block=5066x1 Type=Byte, ColorInterp=Red
&lt;br&gt;Band 2 Block=5066x1 Type=Byte, ColorInterp=Green
&lt;br&gt;Band 3 Block=5066x1 Type=Byte, ColorInterp=Blue
&lt;br&gt;&lt;br /&gt;Driver: PCIDSK/PCIDSK Database File
&lt;br&gt;Files: 2009-03-02T140133_RE3_3A-NAC_642351_34785_enhancedRGB.pix
&lt;br&gt;Size is 5000, 5000
&lt;br&gt;Coordinate System is:
&lt;br&gt;PROJCS[&amp;quot;UTM Zone 22, Northern Hemisphere&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; GEOGCS[&amp;quot;Unknown datum based upon the WGS 84 ellipsoid&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATUM[&amp;quot;Not specified (based on WGS 84 spheroid)&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPHEROID[&amp;quot;WGS 84&amp;quot;,6378137,298.257223563,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;7030&amp;quot;]]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRIMEM[&amp;quot;Greenwich&amp;quot;,0],
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UNIT[&amp;quot;degree&amp;quot;,0.0174532925199433]],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PROJECTION[&amp;quot;Transverse_Mercator&amp;quot;],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;latitude_of_origin&amp;quot;,0],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;central_meridian&amp;quot;,-51],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;scale_factor&amp;quot;,0.9996],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;false_easting&amp;quot;,500000],
&lt;br&gt;&amp;nbsp; &amp;nbsp; PARAMETER[&amp;quot;false_northing&amp;quot;,0],
&lt;br&gt;&amp;nbsp; &amp;nbsp; UNIT[&amp;quot;Meter&amp;quot;,1]]
&lt;br&gt;Origin = (691500.000000000000000,-2471500.000000000000000)
&lt;br&gt;Pixel Size = (5.000000000000000,-5.000000000000000)
&lt;br&gt;Corner Coordinates:
&lt;br&gt;Upper Left &amp;nbsp;( &amp;nbsp;691500.000,-2471500.000) ( 49d 8'25.94&amp;quot;W, 22d20'19.37&amp;quot;S)
&lt;br&gt;Lower Left &amp;nbsp;( &amp;nbsp;691500.000,-2496500.000) ( 49d 8'15.09&amp;quot;W, 22d33'52.01&amp;quot;S)
&lt;br&gt;Upper Right ( &amp;nbsp;716500.000,-2471500.000) ( 48d53'52.47&amp;quot;W, 22d20'8.69&amp;quot;S)
&lt;br&gt;Lower Right ( &amp;nbsp;716500.000,-2496500.000) ( 48d53'40.21&amp;quot;W, 22d33'41.21&amp;quot;S)
&lt;br&gt;Center &amp;nbsp; &amp;nbsp; &amp;nbsp;( &amp;nbsp;704000.000,-2484000.000) ( 49d 1'3.43&amp;quot;W, 22d27'0.49&amp;quot;S)
&lt;br&gt;Band 1 Block=5000x1 Type=Byte, ColorInterp=Undefined
&lt;br&gt;&amp;nbsp; Description = Contents Not Specified
&lt;br&gt;...
&lt;br&gt;Band 2 Block=5000x1 Type=Byte, ColorInterp=Undefined
&lt;br&gt;&amp;nbsp; Description = Contents Not Specified
&lt;br&gt;...
&lt;br&gt;Band 3 Block=5000x1 Type=Byte, ColorInterp=Undefined
&lt;br&gt;&amp;nbsp; Description = Contents Not Specified
&lt;br&gt;...&lt;br /&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26479900&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/problems-using-epsg%3A3785-tp26479900p26479900.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26449125</id>
	<title>Re: Server Crash on Invalid 3d Polygon</title>
	<published>2009-11-20T11:36:35Z</published>
	<updated>2009-11-20T11:36:35Z</updated>
	<author>
		<name>Paul Ramsey-4</name>
	</author>
	<content type="html">Love to see a bug with such a succinct test case. It crashes for me
&lt;br&gt;too, I've ticked it and will be looking now.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://trac.osgeo.org/postgis/ticket/316&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://trac.osgeo.org/postgis/ticket/316&lt;/a&gt;&lt;br&gt;&lt;br&gt;P
&lt;br&gt;&lt;br&gt;On Fri, Nov 20, 2009 at 11:31 AM, Brad Hecox &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26449125&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;brad@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I am having a problem were I get a server crash any time I try to validate or generate a geometry on an invalid 3D polygon.  I have a set of polygons in EWKT format that I need to validate and convert to geometries if valid.  In most cases the st_isvalid function returns a true or false, however of the polygon is 3D and is invalid rather than returning a false, the system crashes.  I have been able to reproduce this on Solaris x86, Solaris SPARC and Max OSX.  We are running PostgreSQL 8.4.1 with PostGIS 1.4.0.  The following is the pstack from the core dump:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ore 'core' of 4774:    /opt/postgres/pgserver/8.4.1/bin/postgres
&lt;br&gt;&amp;gt;  fef68610 strncat  (4d8e38, 0, 40923bff, 28, 0, 0) + 20
&lt;br&gt;&amp;gt;  fedd3360 pg_parser_errhint (ffbfd9e8, 4d8e38, 7, fee02a08, fee026d0, fee34224) + 24
&lt;br&gt;&amp;gt;  fedd9c74 LWGEOM_in (ffbfda70, 5167bc, d3280f32, 406000, 0, 3) + 70
&lt;br&gt;&amp;gt;  002a0ef4 InputFunctionCall (ffbfdce8, 4d8e38, 4010, ffffffff, 516688, 4010) + 58
&lt;br&gt;&amp;gt;  002a1120 OidInputFunctionCall (4012, 4d8e38, 4010, ffffffff, 0, 445000) + 20
&lt;br&gt;&amp;gt;  000e43e8 coerce_type (4d9150, 4d90b0, 2c1, 4010, ffffffff, 0) + 3d4
&lt;br&gt;&amp;gt;  000da760 make_fn_arguments (4d8d60, 4d90d8, ffbfdef0, 4d9118, 0, 0) + 5c
&lt;br&gt;&amp;gt;  000db534 ParseFuncOrColumn (4d8d60, 4d8e20, 4d90e8, 2, 0, 0) + 3d8
&lt;br&gt;&amp;gt;  000d7d00 transformExpr (0, 4d8f00, 4d9020, 31, 1518, 4da538) + 150
&lt;br&gt;&amp;gt;  000e6cb8 transformTargetEntry (4d8d60, 4d8f00, 0, 0, 0, 2b65c4) + 80
&lt;br&gt;&amp;gt;  000e6d0c transformTargetList (0, 4d8f50, 398ea0, fee62a00, 1e70, 0) + 44
&lt;br&gt;&amp;gt;  000bc6a4 transformStmt (4d9028, 4d8f78, 0, 11ab4, 529f2c, 529f2c) + e0
&lt;br&gt;&amp;gt;  000bed78 parse_analyze (4d8f78, 4d8550, 0, 0, 41e400, 529f00) + 20
&lt;br&gt;&amp;gt;  001e8664 pg_analyze_and_rewrite (4d8f78, 4d8550, 0, 0, 4627d0, 462748) + 24
&lt;br&gt;&amp;gt;  001ea244 PostgresMain (2, 4627d0, 4d9000, 0, 0, 1000000) + 14bc
&lt;br&gt;&amp;gt;  001bc2f0 ServerLoop (47d0c8, ffbff278, 38e800, 4b06afa6, 41d400, 3ccc00) + 9e8
&lt;br&gt;&amp;gt;  001be9ec PostmasterMain (0, 45c180, 3cd800, 461698, 45a400, 3ccc00) + 11c0
&lt;br&gt;&amp;gt;  00164550 main     (1, 45c180, ffbff8fc, 459bac, fee60100, fee60140) + 39c
&lt;br&gt;&amp;gt;  0004ace4 _start   (0, 0, 0, 0, 0, 0) + 5c
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am able to reproduce the crash consistently with a query such as the following:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; select st_isvalid('POLYGON ((-97.78351581 36.37358796 1167.172,-97.78303556 36.37319923 1167.172,-98.88351581 38.37358796 1167.172))');
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any help would be greatly appreciated!!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Brad
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26449125&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26449125&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Server-Crash-on-Invalid-3d-Polygon-tp26449052p26449125.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26449052</id>
	<title>Server Crash on Invalid 3d Polygon</title>
	<published>2009-11-20T11:31:20Z</published>
	<updated>2009-11-20T11:31:20Z</updated>
	<author>
		<name>Brad Hecox</name>
	</author>
	<content type="html">I am having a problem were I get a server crash any time I try to validate or generate a geometry on an invalid 3D polygon. &amp;nbsp;I have a set of polygons in EWKT format that I need to validate and convert to geometries if valid. &amp;nbsp;In most cases the st_isvalid function returns a true or false, however of the polygon is 3D and is invalid rather than returning a false, the system crashes. &amp;nbsp;I have been able to reproduce this on Solaris x86, Solaris SPARC and Max OSX. &amp;nbsp;We are running PostgreSQL 8.4.1 with PostGIS 1.4.0. &amp;nbsp;The following is the pstack from the core dump:
&lt;br&gt;&lt;br&gt;ore 'core' of 4774: &amp;nbsp; &amp;nbsp;/opt/postgres/pgserver/8.4.1/bin/postgres
&lt;br&gt;&amp;nbsp;fef68610 strncat &amp;nbsp;(4d8e38, 0, 40923bff, 28, 0, 0) + 20
&lt;br&gt;&amp;nbsp;fedd3360 pg_parser_errhint (ffbfd9e8, 4d8e38, 7, fee02a08, fee026d0, fee34224) + 24
&lt;br&gt;&amp;nbsp;fedd9c74 LWGEOM_in (ffbfda70, 5167bc, d3280f32, 406000, 0, 3) + 70
&lt;br&gt;&amp;nbsp;002a0ef4 InputFunctionCall (ffbfdce8, 4d8e38, 4010, ffffffff, 516688, 4010) + 58
&lt;br&gt;&amp;nbsp;002a1120 OidInputFunctionCall (4012, 4d8e38, 4010, ffffffff, 0, 445000) + 20
&lt;br&gt;&amp;nbsp;000e43e8 coerce_type (4d9150, 4d90b0, 2c1, 4010, ffffffff, 0) + 3d4
&lt;br&gt;&amp;nbsp;000da760 make_fn_arguments (4d8d60, 4d90d8, ffbfdef0, 4d9118, 0, 0) + 5c
&lt;br&gt;&amp;nbsp;000db534 ParseFuncOrColumn (4d8d60, 4d8e20, 4d90e8, 2, 0, 0) + 3d8
&lt;br&gt;&amp;nbsp;000d7d00 transformExpr (0, 4d8f00, 4d9020, 31, 1518, 4da538) + 150
&lt;br&gt;&amp;nbsp;000e6cb8 transformTargetEntry (4d8d60, 4d8f00, 0, 0, 0, 2b65c4) + 80
&lt;br&gt;&amp;nbsp;000e6d0c transformTargetList (0, 4d8f50, 398ea0, fee62a00, 1e70, 0) + 44
&lt;br&gt;&amp;nbsp;000bc6a4 transformStmt (4d9028, 4d8f78, 0, 11ab4, 529f2c, 529f2c) + e0
&lt;br&gt;&amp;nbsp;000bed78 parse_analyze (4d8f78, 4d8550, 0, 0, 41e400, 529f00) + 20
&lt;br&gt;&amp;nbsp;001e8664 pg_analyze_and_rewrite (4d8f78, 4d8550, 0, 0, 4627d0, 462748) + 24
&lt;br&gt;&amp;nbsp;001ea244 PostgresMain (2, 4627d0, 4d9000, 0, 0, 1000000) + 14bc
&lt;br&gt;&amp;nbsp;001bc2f0 ServerLoop (47d0c8, ffbff278, 38e800, 4b06afa6, 41d400, 3ccc00) + 9e8
&lt;br&gt;&amp;nbsp;001be9ec PostmasterMain (0, 45c180, 3cd800, 461698, 45a400, 3ccc00) + 11c0
&lt;br&gt;&amp;nbsp;00164550 main &amp;nbsp; &amp;nbsp; (1, 45c180, ffbff8fc, 459bac, fee60100, fee60140) + 39c
&lt;br&gt;&amp;nbsp;0004ace4 _start &amp;nbsp; (0, 0, 0, 0, 0, 0) + 5c
&lt;br&gt;&lt;br&gt;I am able to reproduce the crash consistently with a query such as the following:
&lt;br&gt;&lt;br&gt;select st_isvalid('POLYGON ((-97.78351581 36.37358796 1167.172,-97.78303556 36.37319923 1167.172,-98.88351581 38.37358796 1167.172))');
&lt;br&gt;&lt;br&gt;Any help would be greatly appreciated!!
&lt;br&gt;&lt;br&gt;Brad
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26449052&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Server-Crash-on-Invalid-3d-Polygon-tp26449052p26449052.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26445935</id>
	<title>Re: how many vertices in a linestring</title>
	<published>2009-11-20T08:07:18Z</published>
	<updated>2009-11-20T08:07:18Z</updated>
	<author>
		<name>Maxime van Noppen</name>
	</author>
	<content type="html">Marco Lechner - FOSSGIS e.V. wrote:
&lt;br&gt;&amp;gt; exactly. thnx. by the way: what's the difference between st_numpoints()
&lt;br&gt;&amp;gt; and st_npoints()? The results in my case are the same
&lt;br&gt;&lt;br&gt;From the doc of ST_NumPoints :
&lt;br&gt;&lt;br&gt;« From 1.4 forward this is an alias for ST_NPoints which returns number
&lt;br&gt;of vertexes for not just line strings. Consider using ST_NPoints instead
&lt;br&gt;which is multi-purpose and works with many geometry types. »
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Maxime
&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445935&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-many-vertices-in-a-linestring-tp26445406p26445935.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26445872</id>
	<title>Re: how many vertices in a linestring</title>
	<published>2009-11-20T08:07:16Z</published>
	<updated>2009-11-20T08:07:16Z</updated>
	<author>
		<name>Marco Lechner - FOSSGIS e.V.</name>
	</author>
	<content type="html">Maxime van Noppen schrieb:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Marco Lechner - FOSSGIS e.V. wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; is there a function that returns the number of points of a geometry?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; LINESTRING(9.6567389 47.8442843,9.6572511 47.8443736,9.6570058
&lt;br&gt;&amp;gt;&amp;gt; 47.8449885,9.6565007 47.8449207,9.6567378 47.8442853) =&amp;gt; 5
&lt;br&gt;&amp;gt;&amp;gt; LINESTRING(8.9289313 48.6910326,8.9289313 48.6910326) =&amp;gt; 2
&lt;br&gt;&amp;gt;&amp;gt; ...
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You might want to look at ST_NPoints and ST_Numpoints for linestrings :
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/documentation/manual-1.4/ST_NumPoints.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/documentation/manual-1.4/ST_NumPoints.html&lt;/a&gt;&lt;br&gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/documentation/manual-1.4/ST_NPoints.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/documentation/manual-1.4/ST_NPoints.html&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; However for geometries in general it's more complicated
&lt;/div&gt;exactly. thnx. by the way: what's the difference between st_numpoints()
&lt;br&gt;and st_npoints()? The results in my case are the same
&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445872&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-many-vertices-in-a-linestring-tp26445406p26445872.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26445600</id>
	<title>Re: how many vertices in a linestring</title>
	<published>2009-11-20T07:48:43Z</published>
	<updated>2009-11-20T07:48:43Z</updated>
	<author>
		<name>Maxime van Noppen</name>
	</author>
	<content type="html">Marco Lechner - FOSSGIS e.V. wrote:
&lt;br&gt;&amp;gt; is there a function that returns the number of points of a geometry?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; LINESTRING(9.6567389 47.8442843,9.6572511 47.8443736,9.6570058
&lt;br&gt;&amp;gt; 47.8449885,9.6565007 47.8449207,9.6567378 47.8442853) =&amp;gt; 5
&lt;br&gt;&amp;gt; LINESTRING(8.9289313 48.6910326,8.9289313 48.6910326) =&amp;gt; 2
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;You might want to look at ST_NPoints and ST_Numpoints for linestrings :
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/documentation/manual-1.4/ST_NumPoints.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/documentation/manual-1.4/ST_NumPoints.html&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/documentation/manual-1.4/ST_NPoints.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/documentation/manual-1.4/ST_NPoints.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;However for geometries in general it's more complicated.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Maxime
&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445600&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-many-vertices-in-a-linestring-tp26445406p26445600.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26445406</id>
	<title>how many vertices in a linestring</title>
	<published>2009-11-20T07:41:29Z</published>
	<updated>2009-11-20T07:41:29Z</updated>
	<author>
		<name>Marco Lechner - FOSSGIS e.V.</name>
	</author>
	<content type="html">is there a function that returns the number of points of a geometry?
&lt;br&gt;&lt;br&gt;LINESTRING(9.6567389 47.8442843,9.6572511 47.8443736,9.6570058
&lt;br&gt;47.8449885,9.6565007 47.8449207,9.6567378 47.8442853) =&amp;gt; 5
&lt;br&gt;LINESTRING(8.9289313 48.6910326,8.9289313 48.6910326) =&amp;gt; 2
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;Marco
&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445406&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-many-vertices-in-a-linestring-tp26445406p26445406.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26440921</id>
	<title>Re: TopologyException: no outgoing dirEdge found</title>
	<published>2009-11-20T04:18:50Z</published>
	<updated>2009-11-20T04:18:50Z</updated>
	<author>
		<name>John Powell</name>
	</author>
	<content type="html">I was having this error and in my case it was to do with consecutive identical polygons. 
&lt;br&gt;&lt;br&gt;I ran 
&lt;br&gt;&lt;br&gt;delete from geom_table using (select t1.id as delid from geom_table t1, geom_table t2 where t1.id&amp;lt;&amp;gt;t2.id and st_equals(t1.g,t2.g)='t' group by t1.id) as dupes where geom_table.id=dupes.delid;
&lt;br&gt;&lt;br&gt;to remove all the duplicates. After that ST_Multi(ST_Union(geom)) worked as expected.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Andreas Laggner wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi,
&lt;br&gt;&lt;br&gt;does someone know what´s behind this Error?
&lt;br&gt;NOTICE: TopologyException: no outgoing dirEdge found 
&lt;br&gt;(3.5888e+006,5.82215e+006)
&lt;br&gt;ERROR: GEOS union() threw an error!
&lt;br&gt;&lt;br&gt;I tried the functions Intersection() and Union() with different datasets 
&lt;br&gt;from differnet regions (65 to 6000 polygons) in many combinations and i 
&lt;br&gt;always get this error (even if the data isvalid and issimple). With 
&lt;br&gt;google search i found some hints: Maybe to high precision is the reason 
&lt;br&gt;for this???
&lt;br&gt;I want to intersect whole germany with postgis and i did not realize a 
&lt;br&gt;small municipality so far! I tried WinXP with PostgreSQL8.1 and Linux 
&lt;br&gt;with PostgreSQL8.2 (new installation with highest version of postgis 
&lt;br&gt;available).
&lt;br&gt;&lt;br&gt;My SQL statements:
&lt;br&gt;create table intersect_gf2(gid integer) with oids;
&lt;br&gt;select 
&lt;br&gt;addgeometrycolumn('','intersect_gf2','the_geom','31467','MULTIPOLYGON',2);
&lt;br&gt;insert into intersect_gf2 select t1.gid,geomunion(t1.the_geom, 
&lt;br&gt;t2.the_geom) from gf_veg1 t1, gf_corine t2;
&lt;br&gt;insert into intersect_gf2 select t1.gid,intersection(t1.the_geom, 
&lt;br&gt;t2.the_geom) from gf_buk t1, gf_veg2 t2;
&lt;br&gt;&lt;br&gt;hasta luego Andreas
&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;postgis-users@postgis.refractions.net
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/TopologyException%3A-no-outgoing-dirEdge-found-tp12052295p26440921.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26437075</id>
	<title>Re: st_union exception</title>
	<published>2009-11-20T02:30:12Z</published>
	<updated>2009-11-20T02:30:12Z</updated>
	<author>
		<name>John Powell</name>
	</author>
	<content type="html">I have also seen this error and I believe it is to do with identical geometries being unioned. I cleaned my dataset using someting like
&lt;br&gt;&lt;br&gt;select t1.id from points t1, points t2 where t1.id&amp;lt;&amp;gt;t2.id and st_equals(t1.geom,t2.geom)='t' group by t1.id
&lt;br&gt;&lt;br&gt;to find all the duplicates which i then deleted. The st_union(geom) function then worked as expected. 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Mark Mitchell-5 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Anyone get an error similar to this when unioning a bunch of polygons
&lt;br&gt;with st_union?
&lt;br&gt;&lt;br&gt;NOTICE: &amp;nbsp;TopologyException: no outgoing dirEdge found (-149.073,61.6101,61.6101)
&lt;br&gt;ERROR: &amp;nbsp;GEOS union() threw an error!
&lt;br&gt;&lt;br&gt;I must say before I get into the details only a few of you will read
&lt;br&gt;that portion that I've used postgis for a while now (since 1.1.5) and
&lt;br&gt;it is *PHENOMENAL*. &amp;nbsp;I don't want my only posts to this list in that
&lt;br&gt;time frame to be negative -- can't tell you how much
&lt;br&gt;faster/better/intuitive I've found postgis over very expensive
&lt;br&gt;commercial alternatives :-).
&lt;br&gt;&lt;br&gt;&lt;br&gt;My query is similar to the following:
&lt;br&gt;&lt;br&gt;SELECT st_multi(st_union(poly)) from (select ... (a bunch of polys) ... ) a;
&lt;br&gt;&lt;br&gt;The subselect is operating on a fairly dynamic table, and I've gone
&lt;br&gt;months without any problems (with many different sets of polygons too)
&lt;br&gt;&lt;br&gt;I tried st_isvalid() on all polygons returned from the subselect, and
&lt;br&gt;all are valid, and are all non-null...
&lt;br&gt;If I have duplicate (or close to duplicate) polygons returned, is that
&lt;br&gt;going to potentially screw up st_union()?
&lt;br&gt;&lt;br&gt;&lt;br&gt;I'm running Ubuntu server (x64) 8.04 LTS, and am using the packages
&lt;br&gt;for GEOS and postgis from their universe repo:
&lt;br&gt;&lt;br&gt;postgis 1.3.3
&lt;br&gt;libgeos 2.2.3
&lt;br&gt;&lt;br&gt;(postgresql 8.3)
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks for the help!
&lt;br&gt;&lt;br&gt;-Mark
&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;postgis-users@postgis.refractions.net
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/st_union-exception-tp21482884p26437075.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26430745</id>
	<title>Re: Postgis and arcgis with data interoperability extension</title>
	<published>2009-11-19T09:41:37Z</published>
	<updated>2009-11-19T09:41:37Z</updated>
	<author>
		<name>Paragon Corporation-2</name>
	</author>
	<content type="html">Thomas,
&lt;br&gt;Try changing the client encoding of your db to latin1. &amp;nbsp;That's what I do.
&lt;br&gt;&lt;br&gt;ALTER DATABASE mydb SET client_encoding=latin1; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;Leo
&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430745&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users-bounces@...&lt;/a&gt;
&lt;br&gt;[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430745&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users-bounces@...&lt;/a&gt;] On Behalf Of Thomas
&lt;br&gt;Sent: Thursday, November 19, 2009 10:47 AM
&lt;br&gt;To: PostGIS Users Discussion
&lt;br&gt;Subject: Re: [postgis-users] Postgis and arcgis with data interoperability
&lt;br&gt;extension
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Maybe I have an idea how. to solve the Problem: The error message that i get
&lt;br&gt;from the database is that the &amp;nbsp;query is using the wrong encoding: IBM/latin
&lt;br&gt;but in the database we are using UTF8 Does anybody know how to change that
&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;Thomas &amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;On 19.11.09 10:50, &amp;quot;Andreas Neumann&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430745&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;a.neumann@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Thomas,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; did you have a look at ziggis? It enables data connection and editing of
&lt;br&gt;&amp;gt; native Postgis geometries without the need for ArcSDE.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It is commercial, but much cheaper than SDE: &lt;a href=&quot;http://pub.obtusesoft.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pub.obtusesoft.com/&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I don't have ESRI myself, so I don't have experience with it, but it is
&lt;br&gt;&amp;gt; definitely worth a try.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Andreas
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Thu, November 19, 2009 10:19 am, Thomas wrote:
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Ok thanks for the OLE DB info.
&lt;br&gt;&amp;gt;&amp;gt; I am still new to working with databases so maybe I am wrong, but ESRI
&lt;br&gt;&amp;gt;&amp;gt; told
&lt;br&gt;&amp;gt;&amp;gt; me that I can use ArcSDE only with the Server Version that I until now
&lt;/div&gt;don
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; t
&lt;br&gt;&amp;gt;&amp;gt; have. But still it should be possible to connect through the Data
&lt;br&gt;&amp;gt;&amp;gt; Interoperability Extension.
&lt;br&gt;&amp;gt;&amp;gt; The strange thing is that it works with polygons but not with point
&lt;br&gt;&amp;gt;&amp;gt; geometry
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Thanks for your ideas
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; thomas
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; On 18.11.09 22:51, &amp;quot;George Silva&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430745&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;georger.silva@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; This is very weird. Very weird. I have experience with Esri SDE and if
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; you are
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; working with OGC standarts everything should work fine.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Did you registered all your tables trough ArcSDE? If not, you need to do
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; it.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; OLE Connections will only let you handle tabular information, so let
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; that go.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; It's not the way.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; AFAIK ESRI implements OGC standarts. You should NOT have problems with
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; point
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; geometry.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Att
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; George
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Wed, Nov 18, 2009 at 6:39 PM, Ragi Y. Burhum &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430745&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rburhum@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; From: Thomas Jakubicka &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430745&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;crazyh@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Subject: [postgis-users] Postgis and arcgis with data interoperability
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;       extension
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430745&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Message-ID: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430745&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;C729D2DF.2936%crazyh@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430745&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;C729D2DF.2936%25crazyh@...&lt;/a&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Content-Type: text/plain;       charset=&amp;quot;US-ASCII&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I am trying to access my postgis/postgreSQL database through the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; datainteroperability extension and have problems with all my point
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; data. I
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; can load and export polygons but no points. The connection to the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; database
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; works fine but when i try to load point data the attribute table is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; empty
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; and only the header row is shown
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; That seems bizarre. FYI, ESRI provides their own implementation of a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Geometry
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; type on PostgreSQL. You can also use PostGIS. My &amp;quot;psychic debugging&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; skills
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; tell me there is a chance you may be mixing the two?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Also, did you load the PostGIS functions as described in the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; documentation
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; for the database you are working with *before* loading the data?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I also tried to access the database through an OLE DB connection witch
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; working so far that I get access to all tables stored in the database
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; but
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; still can not show the spatial information. With this connection all
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; datasets are shown with the table-symbol and the geometry field stays
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; empty.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This is how the ESRI OLE DB provider works - it doesn't load and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; spatial
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; information. Anything you load from there will be &amp;quot;just a table&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;  
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; We are using the Postgis/PostgreSQL version 8.3 and ArcEditor 9.3.1
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Thanks for your help
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The best thing I could recommend to you now is to do some logging from
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; PostgreSQL side of things. See what SQL is being executed during the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; load and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it should show you your problem right away.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hope this helps,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - Ragi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430745&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430745&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430745&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430745&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Postgis-and-arcgis-with-data-interoperability-extension-tp26410249p26430745.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26428576</id>
	<title>Re: Postgis and arcgis with data interoperability extension</title>
	<published>2009-11-19T07:47:09Z</published>
	<updated>2009-11-19T07:47:09Z</updated>
	<author>
		<name>Thomas Jakubicka</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;Maybe I have an idea how. to solve the Problem: The error message that i get
&lt;br&gt;from the database is that the &amp;nbsp;query is using the wrong encoding: IBM/latin
&lt;br&gt;but in the database we are using UTF8
&lt;br&gt;Does anybody know how to change that
&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards 
&lt;br&gt;Thomas &amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;On 19.11.09 10:50, &amp;quot;Andreas Neumann&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26428576&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;a.neumann@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Thomas,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; did you have a look at ziggis? It enables data connection and editing of
&lt;br&gt;&amp;gt; native Postgis geometries without the need for ArcSDE.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It is commercial, but much cheaper than SDE: &lt;a href=&quot;http://pub.obtusesoft.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pub.obtusesoft.com/&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I don't have ESRI myself, so I don't have experience with it, but it is
&lt;br&gt;&amp;gt; definitely worth a try.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Andreas
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Thu, November 19, 2009 10:19 am, Thomas wrote:
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Ok thanks for the OLE DB info.
&lt;br&gt;&amp;gt;&amp;gt; I am still new to working with databases so maybe I am wrong, but ESRI
&lt;br&gt;&amp;gt;&amp;gt; told
&lt;br&gt;&amp;gt;&amp;gt; me that I can use ArcSDE only with the Server Version that I until now don
&lt;br&gt;&amp;gt;&amp;gt; t
&lt;br&gt;&amp;gt;&amp;gt; have. But still it should be possible to connect through the Data
&lt;br&gt;&amp;gt;&amp;gt; Interoperability Extension.
&lt;br&gt;&amp;gt;&amp;gt; The strange thing is that it works with polygons but not with point
&lt;br&gt;&amp;gt;&amp;gt; geometry
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Thanks for your ideas
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; thomas
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; On 18.11.09 22:51, &amp;quot;George Silva&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26428576&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;georger.silva@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; This is very weird. Very weird. I have experience with Esri SDE and if
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; you are
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; working with OGC standarts everything should work fine.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Did you registered all your tables trough ArcSDE? If not, you need to do
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; it.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; OLE Connections will only let you handle tabular information, so let
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; that go.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; It's not the way.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; AFAIK ESRI implements OGC standarts. You should NOT have problems with
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; point
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; geometry.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Att
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; George
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Wed, Nov 18, 2009 at 6:39 PM, Ragi Y. Burhum &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26428576&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rburhum@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; From: Thomas Jakubicka &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26428576&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;crazyh@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Subject: [postgis-users] Postgis and arcgis with data interoperability
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;       extension
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26428576&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Message-ID: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26428576&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;C729D2DF.2936%crazyh@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26428576&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;C729D2DF.2936%25crazyh@...&lt;/a&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Content-Type: text/plain;       charset=&amp;quot;US-ASCII&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I am trying to access my postgis/postgreSQL database through the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; datainteroperability extension and have problems with all my point
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; data. I
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; can load and export polygons but no points. The connection to the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; database
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; works fine but when i try to load point data the attribute table is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; empty
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; and only the header row is shown
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; That seems bizarre. FYI, ESRI provides their own implementation of a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Geometry
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; type on PostgreSQL. You can also use PostGIS. My &amp;quot;psychic debugging&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; skills
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; tell me there is a chance you may be mixing the two?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Also, did you load the PostGIS functions as described in the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; documentation
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; for the database you are working with *before* loading the data?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I also tried to access the database through an OLE DB connection witch
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; working so far that I get access to all tables stored in the database
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; but
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; still can not show the spatial information. With this connection all
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; datasets are shown with the table-symbol and the geometry field stays
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; empty.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This is how the ESRI OLE DB provider works - it doesn't load and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; spatial
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; information. Anything you load from there will be &amp;quot;just a table&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;  
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; We are using the Postgis/PostgreSQL version 8.3 and ArcEditor 9.3.1
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Thanks for your help
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The best thing I could recommend to you now is to do some logging from
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; PostgreSQL side of things. See what SQL is being executed during the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; load and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it should show you your problem right away.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hope this helps,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - Ragi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26428576&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; postgis-users mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26428576&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;postgis-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26428576&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;postgis-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://postgis.refractions.net/mailman/listinfo/postgis-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Postgis-and-arcgis-with-data-interoperability-extension-tp26410249p26428576.html" />
</entry>

</feed>
