0

I'm making a polyline with M and Z values using DotSpatial.

The M an Z values are displayed when the shapefile is dropped in QGIS, but in ArcGIS, though the attribute table indicates that its a PolylineZM shape, only the X&Y shows up in the Edit Sketch Properties, while Z and M are displayed as NaN.

I assume it might be a property that ArcGIS requires, but is having trouble finding. Code below:

IFeature myFeature = new Feature();

FeatureSet fs = new FeatureSet(myFeature.FeatureType);

fs.CoordinateType = CoordinateType.M;

List<Coordinate> liVertices = new List<Coordinate>();

for (int i =0; i< 3; i++)
{

  liVertices.Add(new DotSpatial.Topology.Coordinate(dEast[i], dNorth[i], dDepth[i], dKp[i]));

}

myFeature = new Feature(liVertices);

fs.CoordinateType = CoordinateType.M;

myFeature.ShapeType.Equals(23);

myFeature.Envelope.HasZ();

myFeature.Envelope.HasM();

myFeature.Envelope.Maximum.M = dMmax;

myFeature.Envelope.Minimum.M = dMmin;

myFeature.UpdateEnvelope();

myFeature.Envelope.SetExtents(dXmin, dYmax, dZmin, dXmax, dYmax, dZmax);

fs.Features.Add(myFeature);

fs.SaveAs("Test.shp", true);
2
  • I removed the QGIS tag from your question because it sounds like you are seeing what you expect there, and are seeing other than what you expect only in ArcGIS Desktop.
    – PolyGeo
    Commented Jul 3, 2018 at 22:52
  • Ah, that's my bad. Sorry!
    – Zeitsperre
    Commented Jul 4, 2018 at 3:21

0

Your Answer

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