Opened 19 years ago

Closed 16 years ago

#770 closed defect (fixed)

Specify proj4text in spatial_ref_sys table of PostGIS

Reported by: jdenisgiguere@… Owned by: Mateusz Łoskot
Priority: normal Milestone: 1.5.0
Component: OGR_SF Version: unspecified
Severity: normal Keywords: postgresql postgis srid
Cc: neteler@…, warmerdam

Description (last modified by Mateusz Łoskot)

When we import data to postgis using ogr2ogr, ogr doesn't fill the proj4text field of the spatial_ref_sys table. This cause problem when you want to use the transform(geometry,int) function of postGIS.

See: http://postgis.refractions.net/pipermail/postgis-users/2005-February/006953.html

This bug was reported using:

gdal 1.2.5.0
proj 4.4.9
postgis 0.9.1

Change History (3)

comment:4 by warmerdam, 17 years ago

Cc: warmerdam added
Component: OGR_SRSOGR_SF
Description: modified (diff)
Milestone: 1.5.0
Owner: changed from warmerdam to Mateusz Łoskot
Priority: highnormal

I think this may have been fixed.

Mateusz, could you verify and close if so, other plan on implementing this by 1.5.0.

comment:5 by Mateusz Łoskot, 17 years ago

Description: modified (diff)
Status: newassigned

comment:6 by Mateusz Łoskot, 16 years ago

Keywords: postgresql postgis srid added
Resolution: fixed
Status: assignedclosed

I tried to reproduce this issue and it does not occur. proj2text is correctly imported for non-existing SRS. Short test using customized SRS (notice XXX):

mloskot@dog:~/data/test$ ~/dev/gdal/_svn/trunk/gdal/apps/ogrinfo point.shp point -so
INFO: Open of `point.shp'
      using driver `ESRI Shapefile' successful.

Layer name: point
Geometry: Point
Feature Count: 53
Extent: (11.660233, 48.320917) - (21.675483, 53.763433)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984XXX",
    DATUM["WGS_1984XXX",
        SPHEROID["WGS_1984XXX",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["Degree",0.017453292519943295]]
...

mloskot@dog:~/data/test$ cat point.prj
GEOGCS["GCS_WGS_1984XXX",DATUM["D_WGS_1984XXX",SPHEROID["WGS_1984XXX",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

mloskot@dog:~/data/test$ ~/dev/gdal/_svn/trunk/gdal/apps/ogr2ogr -f PostgreSQL PG:dbname=test -nln xxx point.shp
...

mloskot@dog:~/data/test$ ~/dev/gdal/_svn/trunk/gdal/apps/ogrinfo PG:dbname=test xxx -so
INFO: Open of `PG:dbname=test'
      using driver `PostgreSQL' successful.

Layer name: xxx
Geometry: Point
Feature Count: 53
Extent: (11.660233, 48.320915) - (21.675484, 53.763435)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984XXX",
    DATUM["WGS_1984XXX",
        SPHEROID["WGS_1984XXX",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["Degree",0.017453292519943295]]
...

This bug was fixed in r9579. I'm closing it.

Note: See TracTickets for help on using tickets.