Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed SRID from text to integer type for PostGIS in AddGeometryColumn statement #657

Merged
merged 1 commit into from
Dec 22, 2015

Conversation

copierrj
Copy link
Member

PostGIS 2 requires this parameter to be an integer. For PostGIS 1.5 the
value should be -1 when the srid is unknown. In PostGIS 2 providing a negative
value for srid is equivalent to providing 0, which is the PostGIS 2 value
for an unknown srid.

PostGIS versions tested:

  • 1.5
  • 2.1

Test performed:

create table test(id serial);
select AddGeometryColumn('public', 'test', 'geometry', -1, 'GEOMETRY', '2');
select srid from public.geometry_columns where f_table_name = 'test';

Test result:

  • 1.5: srid = -1
  • 2.1: srid = 0

Todo: also test in 2.0

fixes #531

PostGIS 2 requires this parameter to be an integer. For PostGIS 1.5 the
value should be -1 when the srid is unknown. In PostGIS 2 providing a negative
value for srid is equivalent to providing 0, which is the PostGIS 2 value
for an unknown srid.
@copierrj copierrj added this to the 3.4 milestone Dec 21, 2015
@tfr42 tfr42 added the enhancement enhancement or improvement label Dec 22, 2015
copierrj added a commit that referenced this pull request Dec 22, 2015
changed srid from text to integer
@copierrj copierrj merged commit 1f4a4b0 into deegree:master Dec 22, 2015
@copierrj copierrj deleted the 531-srid-param branch December 22, 2015 14:44
@tfr42 tfr42 changed the title changed srid from text to integer Changed SRID from text to integer type for PostGIS in create table statement Dec 22, 2015
@tfr42 tfr42 changed the title Changed SRID from text to integer type for PostGIS in create table statement Changed SRID from text to integer type for PostGIS in AddGeometryColumn statement Dec 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhancement or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ISOMetadataStore (SQL): Setup tables script fails on PostgreSQL 9.3/PostGIS 2.1
2 participants