Re: [Qgis-user] Confused by Point vs. PointZ and LineString v. LineStringZ

2018-12-05 Thread Nyall Dawson
On Wed, 5 Dec 2018 at 01:40, C Hamilton  wrote:
>
> I have been writing some code that maintains the Z dimension for vector 
> layers. When I create a layer from QGIS points whether it is a point or line 
> layer and I create the points with QgsPoint(x, y, altitude), I can do this 
> without using PointZ or LineStringZ layers and it maintains the Z axis.
>
> What is the purpose of PointZ, LineStringZ, and PolygonZ? Is there a reason I 
> should be using them when Point, LineString, and Polygon seem to work the 
> same? Is there a reason I should not use the Z versions?

This depends. I gather you mean that you can freely create geometries
with z or m dimension, regardless of whether the layer itself has
these dimensions? If so, it depends on the underlying layer type. Some
are more fussy then others, but some, (eg memory layers) will happily
accept any dimensionality without complaining.

This *can* cause issues when later converting these layers to other
formats though, so it's always best to correctly define the
dimensionality of your layer upfront.

Nyall


>
> Thanks,
>
> Calvin
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Confused by Point vs. PointZ and LineString v. LineStringZ

2018-12-04 Thread C Hamilton
I have been writing some code that maintains the Z dimension for vector
layers. When I create a layer from QGIS points whether it is a point or
line layer and I create the points with QgsPoint(x, y, altitude), I can do
this without using PointZ or LineStringZ layers and it maintains the Z axis.

What is the purpose of PointZ, LineStringZ, and PolygonZ? Is there a reason
I should be using them when Point, LineString, and Polygon seem to work the
same? Is there a reason I should not use the Z versions?

Thanks,

Calvin
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user