I have a feature class with xym linestring geometry. I need it converted to xyzm linestring geometry (with z set to 0). How can I do this?
Is the data in a database?
Also if it is in an Oracle database ESRI ST, Oracle ST or Oracle SDO geometry type
Hey Eric. The data is in an FGDB getting prepped to go into postgres. I wrote a function in Oracle SDO to do this conversion but I don't know how to do it in either ArcGIS or Postgres. The workaround I am using now is copying the table to Oracle, converting it, copying it back to Esri, then copying it to postgres. It is pretty ugly.
Yea, I figured you were doing that. I looked through the SQL API Here but nothing stuck out at me. Thought about ST_GeomFromText in an SDE environment
"When you provide a well-known text description to construct a geometry, the measure coordinate must be specified last. For example, if your text includes coordinates for x, y, z, and m, they must be provided in that order, not x, y, m, z."
But that is not your case. Guess this has beaten the Database guys. We would use FME to do the conversion.
I did find a solution that did what I needed. I converted the XYM shapefile to an XYZM shapefile using this. I used the Feature Class to Shapefile tool in ArcGIS and selected the Environments button and set it to enable Z with a default of 0. The resultant shapefile has XYZM geometry. I am sure the Environments button will work similarly with other commands as well.