I will reconvert my data again in PostGIS.<br>I think ogr2or creates a oid automatically.<br>Thanks for helping out<br><br>Steven<br><br><div class="gmail_quote">On Nov 19, 2007 4:01 PM, Marcos Sánchez Provencio &lt;<a href="mailto:marcos@burke.ath.cx">
marcos@burke.ath.cx</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Try setting debug and see what querys get the database.
<br><br><br>El lun, 19-11-2007 a las 15:31 +0100, Steven De Vriendt escribió:<br><div><div></div><div class="Wj3C7c">&gt; update:<br>&gt; when I use SRID=-1 I get a map in return but I&#39;m still unable to query<br>&gt; it..
<br>&gt;<br>&gt; Steven<br>&gt;<br>&gt; On Nov 19, 2007 3:26 PM, Steven De Vriendt &lt;<a href="mailto:gisaalter@gmail.com">gisaalter@gmail.com</a>&gt;<br>&gt; wrote:<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; Marcos,<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; When I try your suggestion Mapserver returns:
<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; −<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;ServiceExceptionReport version=&quot;1.1.0&quot;&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; −<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;ServiceException&gt;<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; msDrawMap(): Image handling error. Failed to draw layer named
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &#39;percelen&#39;.<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; msPOSTGISLayerWhichShapes(): Query error. Error executing<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor BINARY<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; CURSOR FOR SELECT
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; asbinary(force_collection(force_2d(the_geom)),&#39;NDR&#39;),gid::text<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; from (SELECT * FROM b_capa_percid) AS foo WHERE the_geom &amp;&amp;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; setSRID(&#39;BOX3D( 76945.5918856108
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; 189996.502536997,91328.1081143621 201805.497460877)&#39;::BOX3D,<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; 31300 )<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; -ERROR: &nbsp;Operation on two geometries with different SRIDs<br>&gt;<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/ServiceException&gt;
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/ServiceExceptionReport&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; On Nov 19, 2007 3:19 PM, Marcos Sánchez Provencio<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="mailto:marcos@burke.ath.cx">marcos@burke.ath.cx</a>&gt; wrote:
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DATA &quot;the_geom from (SELECT * FROM b_capa_percid) as<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foo<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; using srid=31300 using unique gid&quot;<br>&gt;<br>&gt;<br>
&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; El lun, 19-11-2007 a las 09:48 +0100, Steven De<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Vriendt escribió:<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &gt; DATA &quot;the_geom from b_capa_percid&quot;<br>&gt;<br>&gt;<br>&gt;
<br>&gt;<br>&gt;<br><br></div></div></blockquote></div><br>