1

I'm trying to create some tables on PostgreSQL with a Geometry field. For the Polygon and Point types it works but when I want to create a Line o LSEG type I get an error.

If I do:

.....
geometry_field geometry(Polygon, 25829),

or

geometry_field geometry(Point, 25829),
.....

it works and the table it's created but when I try:

.....
geometry_field geometry(Line, 25829),

or

geometry_field geometry(LSEG, 25829),
.....

I get:

ERROR:  Invalid geometry type modifier: line or lseg

Looking at the Documentation the type exists so I don't know what I'm doing wrong.

Where is my mistake?

Edit:

I'm using a legacy system whith PostgreSQL 8.4 and PostGIS 1.5

  • It looks like you're mixing PostGIS and native geometry syntax. Please edit the question to specify the exact version of PostgreSQL and PostGIS software in use. – Vince Feb 22 '17 at 12:59
  • The link you have put is to Postgres geometry types, not Postgis ones,, which can be Point, Linestring, Polygon (or their multi versions) or geometry (a mixture of anything). – John Powell Feb 22 '17 at 13:01
1

For line in postgis native will be Linestring

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.