Skip to main content

Hi,

 

I have a ESRI-JSON file which geometry looks likes this: 

"geometry":{"hasM":true,"paths":ue,333334.24000000209,6611588.879999999,0], ...

Note that the hasM property is true.

I am trying to convert that file (among other operations) but when it is read by FME it seems that the third coordinate is parsed as a Z value and not as a measure:

1 

Where I should expect something like that (2D but with true measure):

2 

Question: how to deal with that data to output a true M-Value?

 

I am thinking of two approches:

  1. Find a proper setting in the ESRI-JSON reader what would parse the M-value as a true measure and not a Z ; I did not find that kind of settings if it exists
  2. Let the reader as it but find a way to transfer/copy the Z value into a M value using transformers; I did not find the proper method yet

 

Any thoughts about this?

 

Thanks a lot!

Jean

Hi @jportemer​ ,

 

Not sure if there is a format attribute that contains the measures, but if so you can try exposing it with the AttributeExposer (or in the Reader Feature Type on the format attributes tab). If there isn't, perhaps you could use a MeasuresSetter and set the value to the Z coordinate or the MeasureExtractor using the Individual Vertex by Index type?


@jportemer​  try the ElevationToMeasureCopier that is available on FME HUB. This should copy the Z values to your measures.

But we probably should fix the Esri JSON reader to handle 2D+M. Do you have a small example you can attach or send to mark at safe.com?


Hi,

 

Thank you two for your quick answers. For the moment I will try to use ElevationToMeasureCopier, then erase the Z component. That seems to be the most straightforward solution today.

 

But fixing the reader itself would be relevant since I may have to deal with 3D+M features some day (hasZ=true and hasM=true, I do not have a real example now).

Here attached is an actual sample of ESRI-JSON with 2D+M coordinates that you can use.

 

Thanks a lot, I would appreciate if you keep me informed on the update of the reader.

Take care,

 

jportemer


Hi,

 

Thank you two for your quick answers. For the moment I will try to use ElevationToMeasureCopier, then erase the Z component. That seems to be the most straightforward solution today.

 

But fixing the reader itself would be relevant since I may have to deal with 3D+M features some day (hasZ=true and hasM=true, I do not have a real example now).

Here attached is an actual sample of ESRI-JSON with 2D+M coordinates that you can use.

 

Thanks a lot, I would appreciate if you keep me informed on the update of the reader.

Take care,

 

jportemer

If i read that file, the measures are read as measures

CaptureWhat version of FME are you using?


If i read that file, the measures are read as measures

CaptureWhat version of FME are you using?

I currently use FME 2017.1., build 17652.


If i read that file, the measures are read as measures

CaptureWhat version of FME are you using?

The measures are definitely interpreted correctly in 2019.2

If you aren't able to upgrade, I'd use the following to transfer the z-values to measures (assuming linear input)

Capture


Yes, thanks, I will try to upgrade then.

Better have the right interpretation of coordinates correctly in prevision of using 3D+M data.


Yes, thanks, I will try to upgrade then.

Better have the right interpretation of coordinates correctly in prevision of using 3D+M data.

I've just done a quick check and 3D+M appears as I would expect also. It would be interesting to see how 2017 handles that scenario


OK, I confirm that upgrading FME > 2019.2 enables to get the good interpretative reader.

I have not achieved to transfer that M-values into a GeoJSON thought, but maybe that format is not compatible? (I have found no information on that subject)

 

I have now a more general into mixing in the same process different schemas and different coordinate setting (2D or 2D+M) but I think it is not on the scope of this thread, I'll open a new one.

Thanks again


In FME 2017, the Esri-JSON writer attached the measures as Z values as @jportemer​ reported. This was fixed in 2018 and the measures are read correctly in FME 2018 and higher.


Reply