[gdal-dev] Q: GFS Type for int64/bigint?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Q: GFS Type for int64/bigint?

Just van den Broecke-2
Hi,

I use ogr2ogr (GML to PG) with a .gfs file with Type specs.  I need to
map a GML integer value to eventually a BigInt in PostgreSQL. I see
String, Integer, Real etc. "Integer" maps to "integer" type in
PostgreSQL but I need to map to a PG BigInt.

What Type do I need to specify in the .gfs file? Tried Integer64, Long
etc. Or is there no such Type? Could not figure from the OGR GML Driver
doc. I can use GFS Type Real and later cast to bigint in PostgreSQL, but
is somewhat involved.

Best,

Just van den Broecke
The Netherlands
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Q: GFS Type for int64/bigint?

Even Rouault-2
Just,

> I use ogr2ogr (GML to PG) with a .gfs file with Type specs.  I need to
> map a GML integer value to eventually a BigInt in PostgreSQL. I see
> String, Integer, Real etc. "Integer" maps to "integer" type in
> PostgreSQL but I need to map to a PG BigInt.
>
> What Type do I need to specify in the .gfs file?

Use
<Type>Integer</Type>
<SubType>Integer64</SubType>

See
https://github.com/OSGeo/gdal/blob/7f942653f570f3e99cf0273e979272190cc6c312/gdal/data/ruian_vf_v1.gfs#L60

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Q: GFS Type for int64/bigint?

Just van den Broecke-2
Hi Even, Aha, thanks for quick reply! Best, Just

On 28-02-20 13:45, Even Rouault wrote:

> Just,
>
>> I use ogr2ogr (GML to PG) with a .gfs file with Type specs.  I need to
>> map a GML integer value to eventually a BigInt in PostgreSQL. I see
>> String, Integer, Real etc. "Integer" maps to "integer" type in
>> PostgreSQL but I need to map to a PG BigInt.
>>
>> What Type do I need to specify in the .gfs file?
>
> Use
> <Type>Integer</Type>
> <SubType>Integer64</SubType>
>
> See
> https://github.com/OSGeo/gdal/blob/7f942653f570f3e99cf0273e979272190cc6c312/gdal/data/ruian_vf_v1.gfs#L60
>
> Even
>

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev