If I remember well the loader script shp2pgsql create the unique attribute
called gid. And that gid I supose be the record id or record position from the
shape source file.<br>
So if you need a map between file position and database record returned read the attribute &#39;gid&#39; from that shape record.<br><br>
I do not know if still done on recent versions of loader.<br><br><br><br><div class="gmail_quote">2010/6/10 Lime, Steve D (DNR) <span dir="ltr">&lt;<a href="mailto:Steve.Lime@state.mn.us">Steve.Lime@state.mn.us</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">








<div bgcolor="white" link="blue" vlink="purple" lang="EN-US">

<div>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">The concept changed in 5.6 to support improved query
performance, especially for RDBMS data sources. It’s been a bit of</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">a cluster though and interpretation of $result-&gt;shapeindex
varies by 5.6.x version and driver. We’ll get this straightened</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">out and simplified in 6.0. Addressing 5.6.3 only:</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p style="margin-left: 22.5pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><span>-<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">         
</span></span></span><span style="font-size: 11pt; color: rgb(31, 73, 125);">shapeindex should hold the global record index for a shape</span></p>

<p style="margin-left: 22.5pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><span>-<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">         
</span></span></span><span style="font-size: 11pt; color: rgb(31, 73, 125);">tileindex should hold the result set record index for a shape
(for RDBMS data sources, e.g. Oracle and PostGIS only)</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">There still may be inconsistencies with OGR-fronted RDBMS
sources.</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Steve</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<div>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">

<p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;">
<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>
[mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Sven
Schroeter<br>
<b>Sent:</b> Thursday, June 10, 2010 10:27 AM<br>
<b>To:</b> <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [mapserver-users] mapserver &gt;= 5.6 and querys via
php-mapscript</span></p>

</div>

</div><div><div></div><div class="h5">

<p class="MsoNormal"> </p>

<div>

<p class="MsoNormal">Hi Daniel,<br>
&gt;<br>
&gt; I don&#39;t think there is any way to get the &quot;real&quot; shapeindex
unless you <br>
&gt; have an id field in the data itself. You could file a ticket about this, <br>
&gt; but for some data sources, such as Postgis, Oracle Spatial, and many OGR <br>
&gt; ones, there is no concept of absolute record id, so if something was <br>
&gt; added, it would very likely work only for shapefiles<br>
&gt;<br>
<br>
in the older ms versions I got with $result-&gt;shapeindex an absolute record <br>
id for all data sources (postgis, OGR, shapefiles).<br>
what ids were used before by default e.g. for postgis data?<br>
why this concept has changed in the new version 5.6?<br>
Thanx<br>
Sven</p>

</div>

</div></div></div>

</div>


<br>_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br></blockquote></div><br>