feraudyh (3) [Avatar] Offline
#1
The first paragraph says
Just like points there are 3 variants of linestrings – linestring with points represented in x,y,z coordinates, LINESTRINGM which is a linestrings with points represented using x,y,m coordinates (LINESTRINGM data type), and linestrings with points represented in x,y,z,m coordinates (LINESTRINGMZ data type).

The example that follows involves linestrings in which only two coordinate values per point are provided, with no explanation of what the z or m values would be in those cases.

Is that first paragraph a mistake or has something (for example about default z and m values) been not said explicity?
regina.leo (265) [Avatar] Offline
#2
Re: Section 2.2.3
Henri,

That paragraph wasn't a mistake. We do go more into the examples of what the x,y,z and x,y and xy,m variants look like in later sections of the chapter and other chapters. In general while those do exist and are allowed, they are not that heavily used in PostGIS because of few viewing tools and the non-complete support for them by relational spatial functions. This might change in PostGIS 2.0 since a lot of work is going into expanding their support and also introducing real 3d surfaces.

For that particular example we are inserting into a table that is constrained to a coordinate dimension of 2 (see the 2 in the AddGeometry. function call) which is standard practice. We couldn't stuff a 3 coordinate geometry in there without getting an error.

I guess our intention with that section was to expose people to the idea of what is possible and demonstrate the most common use.

Hope that clarifies things,
L & R
feraudyh (3) [Avatar] Offline
#3
Re: Section 2.2.3
I'm afraid your answer does not help.
For one thing I searchd for AddGeometry (from your answer) and did not find it. I suppose you mean AddGeometryColumn.
Yes, I know that there is an argument for the dimension of the column.
So if you can put 2 in that argument and later you insert say LineString(2 3, 4 5)
what are the z values of the nodes of what you have inserted? I would have said it doesnt exist. Yet your book says that the points of a linestring are either
x,y,z
x,y,m
or
x,y,z,m

So what about the points that are just in x,y?
In your *reply* you say that there are x,y variants. That's not what you wrote in the book.
Are you implying that the z is optional?
regina.leo (265) [Avatar] Offline
#4
Re: Section 2.2.3
Henri,

Ah Okay we see your point now.
Yes that's a mistake then. We forgot to itemize the most common linestring that has only x,y coordinates.

We've corrected now in that chapter.

Yes we meant AddGeometryColumn in last comment.

Thanks for the catch,
Leo and Regina