creating schemas in postgis is nondeterministic in which spatial type is 
entered into geometry_columns
------------------------------------------------------------------------------------------------------

                 Key: GEOT-3157
                 URL: http://jira.codehaus.org/browse/GEOT-3157
             Project: GeoTools
          Issue Type: Bug
          Components: data postgis
    Affects Versions: 2.4.0
         Environment: All
            Reporter: Chris Van Orman
            Assignee: Justin Deoliveira


The PostgisDataStore does not seem to be consistent in which spatial type is 
entered into the geometry_columns table when creating a schema.

Looking at the source it would appear that the GEOM_TYPE_MAP HashMap is simply 
iterated over and inserted into the GEOM_CLASS_MAPPING HashMap with the keys 
and values reversed.  However, the GEOM_TYPE_MAP is many-one (ie. POLYGON, 
POLYGONM, CURVEPOLYGON all map to Polygon.class).  So, when creating a schema 
for a Polygon.class it is unclear whether the type inserted will be POLYGON, 
POLYGONM, or CURVEPOLYGON (the order of a HashMap is not defined or guaranteed 
to remain constant over time).

In version 2.3.0 the GEOM_TYPE_MAP was a one-one relationship and so this 
problem did not show up until 2.4.0.  Perhaps the GEOM_CLASS_MAPPING should be 
independently generated?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to