<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19328"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=297103204-29112012><FONT color=#0000ff
size=2 face=Verdana>Hi Brent,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=297103204-29112012><FONT color=#0000ff
size=2 face=Verdana></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=297103204-29112012><FONT color=#0000ff
size=2 face=Verdana>It's in PostgreSQL. We could convert the field to a string
data type, but that's not the point. OGR is currently corrupting data without
telling the user!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=297103204-29112012><FONT color=#0000ff
size=2 face=Verdana></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=297103204-29112012><FONT color=#0000ff
size=2 face=Verdana>Cheers</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=297103204-29112012><FONT color=#0000ff
size=2 face=Verdana>Jeremy</FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> pcreso@pcreso.com
[mailto:pcreso@pcreso.com] <BR><B>Sent:</B> Thursday, 29 November 2012 3:55
p.m.<BR><B>To:</B> gdal-dev@lists.osgeo.org; Jeremy Palmer<BR><B>Subject:</B>
Re: [gdal-dev] 64bit integers<BR></FONT><BR></DIV>
<DIV></DIV>
<TABLE border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD vAlign=top>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: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-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 href="/mc/compose?to=info@linz.govt.nz"
ymailto="mailto: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 href="/mc/compose?to=gdal-dev@lists.osgeo.org"
ymailto="mailto: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></TBODY></TABLE></BLOCKQUOTE></BODY></HTML>