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.Envelope.Maximum.M = dMmax;

myFeature.Envelope.Minimum.M = dMmin;


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


fs.SaveAs("Test.shp", true);
  • 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 Jul 3 '18 at 22:52
  • Ah, that's my bad. Sorry! – Trevor J. Smith Jul 4 '18 at 3:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.