Ticket #1096 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

postgis_type_name() misses some type/dim combinations

Reported by: strk Owned by: strk
Priority: blocker Milestone: PostGIS 2.0.0
Component: postgis Version: trunk
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

Changed 2 years ago by strk

  • owner changed from strk to chodgson
  • component changed from topology to management

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

Changed 2 years ago by strk

For the record this is as of r7550

Changed 2 years ago by strk

  • summary changed from 2.5d topologies can't be created since switch to typmod to postgis_type_name('LINESTRING', 3) returns null

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

Regress tests !!

Changed 2 years ago by strk

  • owner changed from chodgson to pramsey
  • component changed from management to postgis

Changed 2 years ago by robe

  • status changed from new to closed
  • resolution set to fixed

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 :)

Changed 2 years ago by robe

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

Changed 2 years ago by strk

  • status changed from closed to reopened
  • resolution fixed deleted
  • summary changed from postgis_type_name('LINESTRING', 3) returns null to postgis_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

Changed 2 years ago by strk

  • owner changed from pramsey to strk
  • status changed from reopened to new

I'm working on regress test and fixes

Changed 2 years ago by strk

  • status changed from new to closed
  • resolution set to fixed

This is closes and regress-tested as of r7576

Note: See TracTickets for help on using tickets.