[postgis-users] Importing data in Lambert72 (Belgium)

Paolo Corti pcorti at gmail.com
Tue Nov 13 05:17:52 PST 2012


On Tue, Nov 13, 2012 at 1:54 PM, Jo <winfixit at gmail.com> wrote:
> How can I get these in a table that includes 2 columns with those same
> coordinates in WGS84? Should I have a column with a geometry type and
> a point in it? Can I create a trigger function which updates the WGS84
> as the Lambert72 are inserted?
>

Yes, creating a trigger after a COPY or \copy would be an option.

Alternatively you could use a GDAL OGR VRT driver [0], and use
ogr2ogr to directly import the geometry without needing to store in
the database the X and Y values at all. It is just a matter of
correctly setting the GeometryField attribute:

<GeometryField encoding="PointFromColumns" x="coordinateX" y="coordinateY"/>

Regards
p

[0] http://www.gdal.org/ogr/drv_csv.html

--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti


More information about the postgis-users mailing list