[jira] (GEOT-4179) Postgis 2.0 support

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] (GEOT-4179) Postgis 2.0 support

JIRA jira@codehaus.org
Issue Type: Improvement Improvement
Affects Versions: 8.0-RC1
Assignee: Justin Deoliveira
Components: jdbc-postgis plugin
Created: 19/Jun/12 9:47 PM
Description:

A few things have to be updated to support postgis 2.0. The main ones are:

#. All the old style (non st prefix) functions are gone, so we must use the new style
#. The geometry_columns table is now a view so updating it directly has no affect, instead geometry metadata like arid are specified directly when creating a geometry type

Project: GeoTools
Priority: Major Major
Reporter: Justin Deoliveira
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-devel
Reply | Threaded
Open this post in threaded view
|

Re: [jira] (GEOT-4179) Postgis 2.0 support

Brett Walker

Hi Justin,

 

I’ve looked into this also and have sent some of my findings to Andrea. I could forward some of my finding to you if that would be helpful.

 

I would also add that the testing framework also needs some attention in light of Postgis 2.0 requirements. My concern is how to make the tests work on Postgis 2.0 and pre-Postgis 2.0 without getting to fancy.

 

Brett

 

From: Justin Deoliveira (JIRA) [mailto:[hidden email]]
Sent: Wednesday, 20 June 2012 12:48 PM
To: [hidden email]
Subject: [Geotools-devel] [jira] (GEOT-4179) Postgis 2.0 support

 

Justin Deoliveira created ImprovementGEOT-4179

Issue Type:

ImprovementImprovement

Affects Versions:

8.0-RC1

Assignee:

Justin Deoliveira

Components:

jdbc-postgis plugin

Created:

19/Jun/12 9:47 PM

Description:

A few things have to be updated to support postgis 2.0. The main ones are:

#. All the old style (non st prefix) functions are gone, so we must use the new style
#. The geometry_columns table is now a view so updating it directly has no affect, instead geometry metadata like arid are specified directly when creating a geometry type

Project:

GeoTools

Priority:

MajorMajor

Reporter:

Justin Deoliveira

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-devel
Reply | Threaded
Open this post in threaded view
|

Re: [jira] (GEOT-4179) Postgis 2.0 support

Justin Deoliveira
Hey Brett,

On Tue, Jun 19, 2012 at 8:58 PM, Brett Walker <[hidden email]> wrote:

Hi Justin,

 

I’ve looked into this also and have sent some of my findings to Andrea. I could forward some of my finding to you if that would be helpful.

 

Sounds good. Have you taken a look at the patch I attached to the ticket? Do they answer your concerns?
 

I would also add that the testing framework also needs some attention in light of Postgis 2.0 requirements. My concern is how to make the tests work on Postgis 2.0 and pre-Postgis 2.0 without getting to fancy.

Can you be more specific? The approach I took was to more or less to do version checking in the dialect itself (which we already do) and act accordingly if postgis >= 2.0 is in play.

 

Brett

 

From: Justin Deoliveira (JIRA) [mailto:[hidden email]]
Sent: Wednesday, 20 June 2012 12:48 PM
To: [hidden email]
Subject: [Geotools-devel] [jira] (GEOT-4179) Postgis 2.0 support

 

Justin Deoliveira created ImprovementGEOT-4179

Issue Type:

ImprovementImprovement

Affects Versions:

8.0-RC1

Assignee:

Justin Deoliveira

Components:

jdbc-postgis plugin

Created:

19/Jun/12 9:47 PM

Description:

A few things have to be updated to support postgis 2.0. The main ones are:

#. All the old style (non st prefix) functions are gone, so we must use the new style
#. The geometry_columns table is now a view so updating it directly has no affect, instead geometry metadata like arid are specified directly when creating a geometry type

Project:

GeoTools

Priority:

MajorMajor

Reporter:

Justin Deoliveira

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-devel




--
Justin Deoliveira
Enterprise support for open source geospatial.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-devel
Reply | Threaded
Open this post in threaded view
|

Re: [jira] (GEOT-4179) Postgis 2.0 support

Brett Walker
Hi Justin,

I didn't notice the attached patch. I'll have a look latter and provide some feedback.

Brett

Sent from my iPad

On 20/06/2012, at 11:48 PM, "Justin Deoliveira" <[hidden email]> wrote:

Hey Brett,

On Tue, Jun 19, 2012 at 8:58 PM, Brett Walker <[hidden email]> wrote:

Hi Justin,

 

I’ve looked into this also and have sent some of my findings to Andrea. I could forward some of my finding to you if that would be helpful.

 

Sounds good. Have you taken a look at the patch I attached to the ticket? Do they answer your concerns?
 

I would also add that the testing framework also needs some attention in light of Postgis 2.0 requirements. My concern is how to make the tests work on Postgis 2.0 and pre-Postgis 2.0 without getting to fancy.

Can you be more specific? The approach I took was to more or less to do version checking in the dialect itself (which we already do) and act accordingly if postgis >= 2.0 is in play.

 

Brett

 

From: Justin Deoliveira (JIRA) [mailto:[hidden email]]
Sent: Wednesday, 20 June 2012 12:48 PM
To: [hidden email]
Subject: [Geotools-devel] [jira] (GEOT-4179) Postgis 2.0 support

 

Justin Deoliveira created ImprovementGEOT-4179

Issue Type:

ImprovementImprovement

Affects Versions:

8.0-RC1

Assignee:

Justin Deoliveira

Components:

jdbc-postgis plugin

Created:

19/Jun/12 9:47 PM

Description:

A few things have to be updated to support postgis 2.0. The main ones are:

#. All the old style (non st prefix) functions are gone, so we must use the new style
#. The geometry_columns table is now a view so updating it directly has no affect, instead geometry metadata like arid are specified directly when creating a geometry type

Project:

GeoTools

Priority:

MajorMajor

Reporter:

Justin Deoliveira

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-devel




--
Justin Deoliveira
Enterprise support for open source geospatial.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-devel
Reply | Threaded
Open this post in threaded view
|

Re: [jira] (GEOT-4179) Postgis 2.0 support

Brett Walker

 

Hi Justin,

 

I’m being a bit picky, but the method PostGISTestSetup.isVersion2() I would rename to PostGISTestSetup.isAtleastVersion2() as it is a minimum test not an equality test. And the following typical block of code: 
 
        run("INSERT INTO GEOMETRY_COLUMNS VALUES('', 'public', 'ft1', 'geometry', 2, '4326', 'POINT')");
        if (isVersion2()) {
            run("ALTER TABLE \"ft1\" ALTER COLUMN  \"geometry\" TYPE geometry(Point,4326);");
        }
 
I would recode as:
 
        if (isVersion2()) {
            run("ALTER TABLE \"ft1\" ALTER COLUMN  \"geometry\" TYPE geometry(Point,4326);");
        } else {
            run("INSERT INTO GEOMETRY_COLUMNS VALUES('', 'public', 'ft1', 'geometry', 2, '4326', 'POINT')");
        }
 
because the insert into geometry_columns does nothing in v2.0 The effect that it did do is now done by the ALTER TABLE statement.
 
I haven’t used the ALTER TABLE statement to enforce a geometry but I use the following three statement which replicates the pre v2.0 behaviour instead of the ALTER TABLE statement.
 
        CONSTRAINT enforce_dims_wkb_geometry CHECK (st_ndims(location) = 2),
        CONSTRAINT enforce_geotype_wkb_geometry CHECK (st_geometrytype(location) = 'POINT'::text),
        CONSTRAINT enforce_srid_wkb_geometry CHECK (st_srid(location) = 4326)
 
The geometry_columns view in v2.0 uses the constraints to extract the metadata for the spatial tables.  If the ALTER TABLE statement does this then I am happy. I haven’t read the PostGIS v2.0.0 manual thoroughly.
 
I haven’t done a thorough code review. Only looked at your patch. Hopefully all the missing ST_ prefixes have been added.
 
Brett

 

From: Brett Walker [mailto:[hidden email]]
Sent: Thursday, 21 June 2012 7:30 AM
To: Justin Deoliveira
Cc: [hidden email]
Subject: Re: [Geotools-devel] [jira] (GEOT-4179) Postgis 2.0 support

 

Hi Justin,

 

I didn't notice the attached patch. I'll have a look latter and provide some feedback.

 

Brett

Sent from my iPad


On 20/06/2012, at 11:48 PM, "Justin Deoliveira" <[hidden email]> wrote:

Hey Brett,

On Tue, Jun 19, 2012 at 8:58 PM, Brett Walker <[hidden email]> wrote:

Hi Justin,

 

I’ve looked into this also and have sent some of my findings to Andrea. I could forward some of my finding to you if that would be helpful.

 

Sounds good. Have you taken a look at the patch I attached to the ticket? Do they answer your concerns?

 

I would also add that the testing framework also needs some attention in light of Postgis 2.0 requirements. My concern is how to make the tests work on Postgis 2.0 and pre-Postgis 2.0 without getting to fancy.

Can you be more specific? The approach I took was to more or less to do version checking in the dialect itself (which we already do) and act accordingly if postgis >= 2.0 is in play.

 

Brett

 

From: Justin Deoliveira (JIRA) [mailto:[hidden email]]
Sent: Wednesday, 20 June 2012 12:48 PM
To: [hidden email]
Subject: [Geotools-devel] [jira] (GEOT-4179) Postgis 2.0 support

 

Justin Deoliveira created GEOT-4179

Issue Type:

Improvement

Affects Versions:

8.0-RC1

Assignee:

Justin Deoliveira

Components:

jdbc-postgis plugin

Created:

19/Jun/12 9:47 PM

Description:

A few things have to be updated to support postgis 2.0. The main ones are:

#. All the old style (non st prefix) functions are gone, so we must use the new style
#. The geometry_columns table is now a view so updating it directly has no affect, instead geometry metadata like arid are specified directly when creating a geometry type

Project:

GeoTools

Priority:

Major

Reporter:

Justin Deoliveira

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-devel



 

--
Justin Deoliveira

Enterprise support for open source geospatial.

 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-devel
Reply | Threaded
Open this post in threaded view
|

Re: [jira] (GEOT-4179) Postgis 2.0 support

Justin Deoliveira
Hey Brett,

Sounds reasonable to me, feel free to submit a patch for this stuff.

-Justin

On Wed, Jun 20, 2012 at 7:09 PM, Brett Walker <[hidden email]> wrote:

 

Hi Justin,

 

I’m being a bit picky, but the method PostGISTestSetup.isVersion2() I would rename to PostGISTestSetup.isAtleastVersion2() as it is a minimum test not an equality test. And the following typical block of code: 
 
        run("INSERT INTO GEOMETRY_COLUMNS VALUES('', 'public', 'ft1', 'geometry', 2, '4326', 'POINT')");
        if (isVersion2()) {
            run("ALTER TABLE \"ft1\" ALTER COLUMN  \"geometry\" TYPE geometry(Point,4326);");
        }
 
I would recode as:
 
        if (isVersion2()) {
            run("ALTER TABLE \"ft1\" ALTER COLUMN  \"geometry\" TYPE geometry(Point,4326);");
        } else {
            run("INSERT INTO GEOMETRY_COLUMNS VALUES('', 'public', 'ft1', 'geometry', 2, '4326', 'POINT')");
        }
 
because the insert into geometry_columns does nothing in v2.0 The effect that it did do is now done by the ALTER TABLE statement.
 
I haven’t used the ALTER TABLE statement to enforce a geometry but I use the following three statement which replicates the pre v2.0 behaviour instead of the ALTER TABLE statement.
 
        CONSTRAINT enforce_dims_wkb_geometry CHECK (st_ndims(location) = 2),
        CONSTRAINT enforce_geotype_wkb_geometry CHECK (st_geometrytype(location) = 'POINT'::text),
        CONSTRAINT enforce_srid_wkb_geometry CHECK (st_srid(location) = 4326)
 
The geometry_columns view in v2.0 uses the constraints to extract the metadata for the spatial tables.  If the ALTER TABLE statement does this then I am happy. I haven’t read the PostGIS v2.0.0 manual thoroughly.
 
I haven’t done a thorough code review. Only looked at your patch. Hopefully all the missing ST_ prefixes have been added.
 
Brett

 

From: Brett Walker [mailto:[hidden email]]
Sent: Thursday, 21 June 2012 7:30 AM
To: Justin Deoliveira
Cc: [hidden email]
Subject: Re: [Geotools-devel] [jira] (GEOT-4179) Postgis 2.0 support

 

Hi Justin,

 

I didn't notice the attached patch. I'll have a look latter and provide some feedback.

 

Brett

Sent from my iPad


On 20/06/2012, at 11:48 PM, "Justin Deoliveira" <[hidden email]> wrote:

Hey Brett,

On Tue, Jun 19, 2012 at 8:58 PM, Brett Walker <[hidden email]> wrote:

Hi Justin,

 

I’ve looked into this also and have sent some of my findings to Andrea. I could forward some of my finding to you if that would be helpful.

 

Sounds good. Have you taken a look at the patch I attached to the ticket? Do they answer your concerns?

 

I would also add that the testing framework also needs some attention in light of Postgis 2.0 requirements. My concern is how to make the tests work on Postgis 2.0 and pre-Postgis 2.0 without getting to fancy.

Can you be more specific? The approach I took was to more or less to do version checking in the dialect itself (which we already do) and act accordingly if postgis >= 2.0 is in play.

 

Brett

 

From: Justin Deoliveira (JIRA) [mailto:[hidden email]]
Sent: Wednesday, 20 June 2012 12:48 PM
To: [hidden email]
Subject: [Geotools-devel] [jira] (GEOT-4179) Postgis 2.0 support

 

Justin Deoliveira created GEOT-4179

Issue Type:

Improvement

Affects Versions:

8.0-RC1

Assignee:

Justin Deoliveira

Components:

jdbc-postgis plugin

Created:

19/Jun/12 9:47 PM

Description:

A few things have to be updated to support postgis 2.0. The main ones are:

#. All the old style (non st prefix) functions are gone, so we must use the new style
#. The geometry_columns table is now a view so updating it directly has no affect, instead geometry metadata like arid are specified directly when creating a geometry type

Project:

GeoTools

Priority:

Major

Reporter:

Justin Deoliveira

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-devel



 

--
Justin Deoliveira

Enterprise support for open source geospatial.

 




--
Justin Deoliveira
Enterprise support for open source geospatial.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-devel