<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Jeremy,<div><br></div><div>Outside of a GDAL solution, what format is the underlying data stored in?</div><div><br></div><div>I have resolved issues like this with Postgis data stores by doing the int64 to string conversion in the query generating the data for the service, or via views on the source tables.</div><div><br></div><div>Not the most elegant approach, but one of the reasons a good spatial database is a useful foundation for these sorts of systems.</div><div><br></div><div>Brent Wood.</div><div><br><br>--- On <b>Thu, 11/29/12, Jeremy Palmer <i><JPalmer@linz.govt.nz></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Jeremy Palmer <JPalmer@linz.govt.nz><br>Subject: [gdal-dev] 64bit integers<br>To: "gdal-dev@lists.osgeo.org"
 <gdal-dev@lists.osgeo.org><br>Date: Thursday, November 29, 2012, 10:26 AM<br><br><div class="plainMail">I have a WFS layer with a 64bit integer field (sufi):<br><br><a href="http://wfs.data.linz.govt.nz/83de09e2215a4d0c914dbfe28bb71557/v/x1208/wfs?service=WFS" target="_blank">http://wfs.data.linz.govt.nz/83de09e2215a4d0c914dbfe28bb71557/v/x1208/wfs?service=WFS</a><br><br>When using ogr this 64bit integer field gets truncated to 32bit without any warning. E.g<br><br>ogrinfo -al 'wfs:<a href="http://wfs.data.linz.govt.nz/83de09e2215a4d0c914dbfe28bb71557/v/x1208/wfs?service=WFS&MAXFEATURES=1'" target="_blank">http://wfs.data.linz.govt.nz/83de09e2215a4d0c914dbfe28bb71557/v/x1208/wfs?service=WFS&MAXFEATURES=1'</a><br><br>OGRFeature(v:x1208):1384201<br>  gml_id (String) = x1208.1384201<br>  id (Integer) = 1384201<br>  sufi (Integer) = -1519442684<br>  name (String) = Copy of Daffodil Bay Road<br>  locality (String) =
 Sandy Point<br>  created (String) = 2012-09-04T01:04:02Z<br>  modified (String) = 2012-09-04T01:04:02Z<br>  text (String) = (null)<br>  unofficial_flag (String) = O<br>  editor (String) = jbedford<br>  version (Integer) = 1<br>  edit_action (String) = N<br>  status (String) = H<br><br>This of course then flows through to all drivers such as sqlite, postgresql, mysql, mssql etc.<br><br>Should ogr not cast these 64bit integers to an ogr string so data is not lost? At least until <a href="http://trac.osgeo.org/gdal/wiki/rfc31_ogr_64" target="_blank">http://trac.osgeo.org/gdal/wiki/rfc31_ogr_64</a> is implemented?<br><br>Thanks,<br>Jeremy<br><br><br>This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us
 immediately (Phone 0800 665 463 or <a ymailto="mailto:info@linz.govt.nz" href="/mc/compose?to=info@linz.govt.nz">info@linz.govt.nz</a>) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.<br>_______________________________________________<br>gdal-dev mailing list<br><a ymailto="mailto:gdal-dev@lists.osgeo.org" href="/mc/compose?to=gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></div></blockquote></div></td></tr></table>