# What is the maximum number of vertices for polygons & polylines in PostGIS?

What is the maximum number of vertices for polygons and polylines (including multipart) in PostGIS?

• I believe it is a setting somewhere, Oracle spatial I think has a limit of 8999. – Brad Nesom Apr 26 '13 at 18:30

The only link I could find about this is a post on the discussion group tittled, `What is maximum limit(max number of coordinates) for a LineString?` where it is mentioned that

It's a 32bit integer, so theoretically you should be able to have up to 4,294,967,295 vertices per line.

Update According to this comment by Paul Ramsey, the Number of vertices is lower:

This is correct, though the npoints counter is a signed integer (oh well), so you can "only" get 2 billion vertices in.

I would believe that the same limit would hold for a polygon.

Your question however raises more questions. What exactly are you trying to do where you would be concerned about the limit of vertices in a polygon? If you are indeed running into this limit, then you are definitely doing something wrong.

• This is correct, though the npoints counter is a signed integer (oh well), so you can "only" get 2 billion vertices in. – Paul Ramsey May 1 '13 at 0:06