Opened 13 years ago

Closed 13 years ago

#1096 closed defect (fixed)

postgis_type_name() misses some type/dim combinations

Reported by: strk Owned by: strk
Priority: blocker Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: Cc:

Description

select topology.createtopology('ttz', 4326, 0, true);


ERROR:  Invalid type name - valid ones are:
        POINT, MULTIPOINT,
        LINESTRING, MULTILINESTRING,
        POLYGON, MULTIPOLYGON,
        CIRCULARSTRING, COMPOUNDCURVE, MULTICURVE,
        CURVEPOLYGON, MULTISURFACE,
        GEOMETRY, GEOMETRYCOLLECTION,
        POINTM, MULTIPOINTM,
        LINESTRINGM, MULTILINESTRINGM,
        POLYGONM, MULTIPOLYGONM,
        CIRCULARSTRINGM, COMPOUNDCURVEM, MULTICURVEM
        CURVEPOLYGONM, MULTISURFACEM, TRIANGLE, TRIANGLEM,
        POLYHEDRALSURFACE, POLYHEDRALSURFACEM, TIN, TINM
        or GEOMETRYCOLLECTIONM
CONTEXT:  SQL statement "SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 , $6 , $7 )"
PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement
SQL statement "SELECT AddGeometryColumn('ttz','edge_data','geom','4326','LINESTRING',3)"

Change History (9)

comment:1 by strk, 13 years ago

Component: topologymanagement
Owner: changed from strk to chodgson

This is actually unrelated to topology, it's the AddGeometryColumn function itself erroring out on 'LINESTRING'. It doesn't even need any existing schema or table ...

=# SELECT AddGeometryColumn('ttz','edge_data','geom','4326','LINESTRING',3);
ERROR:  Invalid type name - valid ones are:
        POINT, MULTIPOINT,
        LINESTRING, MULTILINESTRING,
        POLYGON, MULTIPOLYGON,
        CIRCULARSTRING, COMPOUNDCURVE, MULTICURVE,
        CURVEPOLYGON, MULTISURFACE,
        GEOMETRY, GEOMETRYCOLLECTION,
        POINTM, MULTIPOINTM,
        LINESTRINGM, MULTILINESTRINGM,
        POLYGONM, MULTIPOLYGONM,
        CIRCULARSTRINGM, COMPOUNDCURVEM, MULTICURVEM
        CURVEPOLYGONM, MULTISURFACEM, TRIANGLE, TRIANGLEM,
        POLYHEDRALSURFACE, POLYHEDRALSURFACEM, TIN, TINM
        or GEOMETRYCOLLECTIONM

comment:2 by strk, 13 years ago

For the record this is as of r7550

comment:3 by strk, 13 years ago

Summary: 2.5d topologies can't be created since switch to typmodpostgis_type_name('LINESTRING', 3) returns null

Following the code flow this turns out being a problem with postgis_type_name('LINSTRING', 3).

Regress tests !!

comment:4 by strk, 13 years ago

Component: managementpostgis
Owner: changed from chodgson to pramsey

comment:5 by robe, 13 years ago

Resolution: fixed
Status: newclosed

Fixed at r7553.

Sorry haven't had a chance to test topology and raster since the change since its more difficult with those broken curves :)

comment:6 by robe, 13 years ago

fixed multilinestringZ, geometry z zm cases at r7559 added extra line between families for easier detection.

comment:7 by strk, 13 years ago

Resolution: fixed
Status: closedreopened
Summary: postgis_type_name('LINESTRING', 3) returns nullpostgis_type_name() misses some type/dim combinations

Robe: could you please add a cohomprensive testcase containing all known permutations ? You've still left bogus entries in there... I wont' tell which one or you'd keep fixing just the ones I mention :P

comment:8 by strk, 13 years ago

Owner: changed from pramsey to strk
Status: reopenednew

I'm working on regress test and fixes

comment:9 by strk, 13 years ago

Resolution: fixed
Status: newclosed

This is closes and regress-tested as of r7576

Note: See TracTickets for help on using tickets.