Skip to main content

I was attempting to read a input data list, which along with the dataset path, has some formatted instructions for translation. One of these instructions is the reprojection of attribute values in two columns. I am reading the instructions for the attribute reprojections for the dataset from a value such as this:

 

 

I was then reading values into fields, so that I could use them in the csmapattributereprojector as follows:

 

 

At this point, FieldNameX has the value of 'Easting', and FieldNameY has the value of 'Northing'. (Just at present, I have hardcoded the source and destination coordiante systems, not attempting to read them from the input, but just choosing them in the input dialog of the csmapattributereprojector).

I am using a dynamic schema, so at this point the attribute{1}.name has value of 'Easting' and attribute{2}.name has value of 'Northing'.

 

My problem is that the csmapattributereprojector does not seem to be reprojecting the values. I have tried a similiar conversion with a static schema and it seems to work fine. I am wondering if this has to do with the dynamic schema, Is this a known issue, or are there any suggestions for workarounds?

 

Tahnks very much

Jamie

Hi @mackinneyjg, it seems that the CsmapAttributeReprojector transformer calculates new coordinates based on the values of stored in the attributes which are specified in the X/Y Attribute parameters, then overwrites those attributes with the resulting values if the calculation is succeeded.

However, in this case, the values of FieldNamesX/Y are names of coordinate attributes (not coordinate values) that store coordinate values, so the transformer cannot retrieve the coordinate values with your parameters setting. The attribute names aren't coordinate values, the transformer just does nothing.

A possible workaround is, retrieve the coordinate values through FieldNameX/Y and save them into new two attributes (e.g. __xcoord, __ycoord) with an AttributeCreator, perform reprojection on the new attributes with the CsmapAttributeReprojector, and use another AttributeCreator to assign the new coordinate values to the actual coordinate attributes whose names are stored in FieldNameX/Y. This screenshot illustrates the procedure.

The 1st AttributeCreator: You can retrieve the values of attributes whose names are stored in the attributes FieldNameX/Y.

The 2nd AttributeCreator: You can set an Attribute Value to New Attribute.

Hope this helps.


Thanks so much for the detailed help @takashi , I've tried that out just now, and it has worked successfully. Really appreciate the quick response and the guidance in improving my understanding of this situation.

Jamie


Reply