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

2
  • 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
    Commented Feb 22, 2017 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). Commented Feb 22, 2017 at 13:01

1 Answer 1

1

For line in postgis native will be Linestring

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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