ThinkGeo.com    |     Documentation    |     Premium Support

LineShape Z Axis

Hi,

I tried to create a Line shape using WKT :

var l = new LineShape(" LINESTRING (298226.64 93982.87 18.7, 298216 93981 18.7, 298208 93979 18.7, 298192.947 93978.626 18.9, 298144 93977 18.2, 298137 93976 18.1, 298131 93973 17.9, 298127 93970 17.8, 298125 93967 18, 298125 93965 18, 298143 93890 15.7, 298146 93881 15.2, 298151.863 93867.273 14.4, 298156 93856 13.8, 298161 93841 12.9, 298170 93811 12.4, 298180.891 93770 12.4, 298204 93683 19.1, 298207 93671 19.7, 298213 93654 19.8, 298214 93646 19.9, 298222 93583 15.3, 298221 93561 12.7, 298216 93545 11.2)")

But, because LineShape is a list of Vertex, not PointShape, It seems it ignores Z axis of WKT.

My problem is that I need the Z axis of each point of the line, to calculate the point to point slope, what should I do?

Regards,
Ben

Hi Ben,

The z value should only works for 3d map, our line shape only support 2d map now.

If you want to save this value, please create a Feature based on the LineShape, and save all the z value of your points as a string into the ColumnValues, of course you can save as many items in it but not a string.

Wish that’s helpful.

Regards,

Ethan

Hi Ethan,

Thanks for your reply,
I don’t want to save them
I need to iterate the points in Linstring/MultiLineString, whats the best way to do that using ThinkGeo classes/Libraries?

ps: I would prefer not to directly process the string, cause I don’t want to directly manage all possible exceptions.

Regards,
Ben

Hi Ben,

For the PointShape or LineShape, I think the Z value cannot be parsed from WKT now.

We tried to implement some classes based on our classes make the Z can be parsed but failed, because the basic functions are designed to save the 2d shape and the basic object is vertex which cannot save the Z.

Regards,

Ethan