Question

Coordinate System from Trimble JXL

  • 17 February 2021
  • 7 replies
  • 31 views

Badge +9

I am reading many jxl files. Each jxl has a "CoordinateSystemRecord". 1 for each file. howver this is not a standardized CS as recognized by fme.

It has an attribute for ZoneName which is a text value like "New Mexico East 3001" and a SystemName attribute like "US State Plane 1983".

How can I use these to set the coordinate system value as the file is read?

i currently have the coordinatesystemextractor transformer in my wb. but the value is empty.

 


7 replies

Badge +16

One way that I built my logic was to manually create the mapping of the Trimble Coordinate System to the FME Coordinate System. In my case it was easy, as I know what coordinate systems to expect the data to be in. Of course my solution only works when known coordinate systems from the JXL files are processed, as it will give an error if one hasn't been mapped. 

 

So basically look for these values and create a value mapping to the FME coordinate system and then use the coordinatesystemsetter transformer.

<CoordinateSystemRecord ID="00000017" TimeStamp="2021-02-09T09:47:42"><SystemName>United States/State Plane 1983</SystemName><ZoneName>Texas Central 4203</ZoneName><DatumName>NAD 1983 (Conus)</DatumName></CoordinateSystemRecord>

 

 

Here is the link to download the Trimble Coordinate System Manager that shows all coordinate systems for reference. 

https://www.trimble.com/globalTRL.aspx?nav=Collection-36339

 csm 

Userlevel 1
Badge +10

In addition to @Chris Warren​, if the corresponding coordinate systems you are looking for aren't in the FME coordinate system picker, you can consider adding a custom coordinate system definition to FME using this tool.

Badge +9

One way that I built my logic was to manually create the mapping of the Trimble Coordinate System to the FME Coordinate System. In my case it was easy, as I know what coordinate systems to expect the data to be in. Of course my solution only works when known coordinate systems from the JXL files are processed, as it will give an error if one hasn't been mapped. 

 

So basically look for these values and create a value mapping to the FME coordinate system and then use the coordinatesystemsetter transformer.

<CoordinateSystemRecord ID="00000017" TimeStamp="2021-02-09T09:47:42"><SystemName>United States/State Plane 1983</SystemName><ZoneName>Texas Central 4203</ZoneName><DatumName>NAD 1983 (Conus)</DatumName></CoordinateSystemRecord>

 

 

Here is the link to download the Trimble Coordinate System Manager that shows all coordinate systems for reference. 

https://www.trimble.com/globalTRL.aspx?nav=Collection-36339

 csm 

Thank you @Chris Warren​  I am doing this on many files so. That is what I have already done. I originally was processing many files at once but have begun to use an fmeserver automation process to process each file to completion before running the next (~18k files to run).  I can get the values out from a testfilter. but can't figure out how to manage the coordinatesystemsetter. I have tried in the past to get the projection into a user parameter but have been told by support that is not supported on a dynamic level. 

Any suggestions are very welcome. Thanks.CS_SELECTOR 

Badge +16

Thank you @Chris Warren​  I am doing this on many files so. That is what I have already done. I originally was processing many files at once but have begun to use an fmeserver automation process to process each file to completion before running the next (~18k files to run).  I can get the values out from a testfilter. but can't figure out how to manage the coordinatesystemsetter. I have tried in the past to get the projection into a user parameter but have been told by support that is not supported on a dynamic level. 

Any suggestions are very welcome. Thanks.CS_SELECTOR 

This might not be the most elegant solution, but what I ended up doing was creating the mapping in a python caller. In this example I have a python dictionary with the Trimble coordinate system name and it's FME counterpart. This way it maps the coordinate system accordingly. I'm only working in SPC 1983, so it was easy for me to map the U.S. states to it.

import fme
import fmeobjects
 
def trimble_fme_cs_mapper(feature):
    '''
    Converts the Trimble coordinate systems to FME coordinate systems
    '''
    # Trimble and FME coordinate systems. Key = Trimble and Value = FME
    coord_systems_83 = {'Alabama East 0101': 'AL83-EF', 'Alabama West 0102': 'AL83-WF', 'Alaska Zone  1 5001': 'AK83-1F', 'Alaska Zone  2 5002': 'AK83-2F', 'Alaska Zone  3 5003': 'AK83-3F', 'Alaska Zone  4 5004': 'AK83-4F', 'Alaska Zone  5 5005': 'AK83-5F', 'Alaska Zone  6 5006': 'AK83-6F', 'Alaska Zone  7 5007': 'AK83-7F', 'Alaska Zone  8 5008': 'AK83-8F', 'Alaska Zone  9 5009': 'AK83-9F', 'Alaska Zone 10 5010': 'AK83-10F', 'Arizona Central 0202': 'AZ83-CF', 'Arizona East 0201': 'AZ83-EF', 'Arizona West 0203': 'AZ83-WF', 'Arkansas North 0301': 'AR83-NF', 'Arkansas South 0302': 'AR83-SF', 'California Zone 1 0401': 'CA83-IF', 'California Zone 2 0402': 'CA83-IIF', 'California Zone 3 0403': 'CA83IIIF', 'California Zone 4 0404': 'CA83-IV', 'California Zone 5 0405': 'CA83-VF', 'California Zone 6 0406': 'CA83-VIF', 'Colorado Central 0502': 'CO83-CF', 'Colorado North 0501': 'CO83-NF', 'Colorado South 0503': 'CO83-SF', 'Connecticut 0600': 'CT83F', 'Delaware 0700': 'DE83F', 'Florida East 0901': 'FL83-EF', 'Florida North 0903': 'FL83-NF', 'Florida West 0902': 'FL83-WF', 'Georgia East 1001': 'GA83-EF', 'Georgia West 1002': 'GA83-WF', 'Hawaii Zone 1 5101': 'HI83-1F', 'Hawaii Zone 2 5102': 'HI83-2F', 'Hawaii Zone 3 5103': 'HI83-3F', 'Hawaii Zone 4 5104': 'HI83-4F', 'Hawaii Zone 5 5105': 'HI83-5F', 'Idaho Central 1102': 'ID83-CF', 'Idaho East 1101': 'ID83-EF', 'Idaho West 1103': 'ID83-WF', 'Illinois East 1201': 'IL83-EF', 'Illinois West 1202': 'IL83-WF', 'Indiana East 1301': 'IN83-EF', 'Indiana West 1302': 'IN83-WF', 'Iowa North 1401': 'IA83-NF', 'Iowa South 1402': 'IA83-SF', 'Kansas North 1501': 'KS83-NF', 'Kansas South 1502': 'KS83-SF', 'Kentucky North 1601': 'KY83-NF', 'Kentucky Single Zone': 'KY83F', 'Kentucky South 1602': 'KY83-SF', 'Louisiana North 1701': 'LA83-NF', 'Louisiana Offshore 1703': 'LA83-OF', 'Louisiana South 1702': 'LA83-SF', 'Maine 2000 Central': 'ME2K-C', 'Maine 2000 East': 'ME2K-E', 'Maine 2000 West': 'ME2K-W', 'Maine East 1801': 'ME83-EF', 'Maine West 1802': 'ME83-WF', 'Maryland 1900': 'MD83F', 'Massachusetts Island 2002': 'MA83-ISF', 'Massachusetts Mainland 2001': 'MA83F', 'Michigan Central 2112': 'MI-CF', 'Michigan North 2111': 'MI-NF', 'Michigan South 2113': 'MI-SF', 'Minnesota Central 2202': 'MN83-CF', 'Minnesota North 2201': 'MN83-NF', 'Minnesota South 2203': 'MN83-SF', 'Mississippi East 2301': 'MS83-EF', 'Mississippi West 2302': 'MS83-WF', 'Missouri Central 2402': 'MO83-CF', 'Missouri East 2401': 'MO83-EF', 'Missouri West 2403': 'MO83-WF', 'Montana 2500': 'MT83F', 'Nebraska 2600': 'NE83F', 'Nevada Central 2702': 'NV83-CF', 'Nevada East 2701': 'NV83-EF', 'Nevada West 2703': 'NV83-WF', 'New Hampshire 2800': 'NH83F', 'New Jersey 2900': 'NJ83F', 'New Mexico Central 3002': 'NM83-CF', 'New Mexico East 3001': 'NM83-EF', 'New Mexico West 3003': 'NM83-WF', 'New York Central 3102': 'NY83-CF', 'New York East 3101': 'NY83-EF', 'New York Long Island 3104': 'NY83-LIF', 'New York West 3103': 'NY83-WF', 'North Carolina 3200': 'NC83F', 'North Dakota North 3301': 'ND83-NF', 'North Dakota South 3302': 'ND83-SF', 'Ohio North 3401': 'OH83-NF', 'Ohio South 3402': 'OH83-SF', 'Oklahoma North 3501': 'OK83-NF', 'Oklahoma South 3502': 'OK83-SF', 'Oregon North 3601': 'OR83-NF', 'Oregon South 3602': 'OR83-SF', 'Pennsylvania North 3701': 'PA83-NF', 'Pennsylvania South 3702': 'PA83-SF', 'Puerto Rico/Virgin Is 5200': 'PR83F', 'Rhode Island 3800': 'RI83F', 'South Carolina 3900': 'SC83F', 'South Dakota North 4001': 'SD83-NF', 'South Dakota South 4002': 'SD83-SF', 'Tennessee 4100': 'TN83F', 'Texas Central 4203': 'TX83-CF', 'Texas North 4201': 'TX83-NF', 'Texas North Central 4202': 'TX83-NCF', 'Texas South 4205': 'TX83-SF', 'Texas South Central 4204': 'TX83-SCF', 'Utah Central 4302': 'UT83-CF', 'Utah North 4301': 'UT83-NF', 'Utah South 4303': 'UT83-SF', 'Vermont 4400': 'VT83F', 'Virginia North 4501': 'VA83-NF', 'Virginia South 4502': 'VA83-SF', 'Washington North 4601': 'WA83-NF', 'Washington South 4602': 'WA83-SF', 'West Virginia North 4701': 'WV83-NF', 'West Virginia South 4702': 'WV83-SF', 'Wisconsin Central 4802': 'WI83-CF', 'Wisconsin North 4801': 'WI83-NF', 'Wisconsin South 4803': 'WI83-SF', 'Wyoming East 4901': 'WY83-EF', 'Wyoming East Central 4902': 'WY83-ECF', 'Wyoming West 4904': 'WY83-WF', 'Wyoming West Central 4903': 'WY83-WCF'}
    
    jxl_cs_zone = feature.getAttribute('ZoneName')
    jxl_cs_name = feature.getAttribute('SystemName')
 
    if jxl_cs_name == 'United States/State Plane 1983':
        fme_coord_system = coord_systems_83[jxl_cs_zone]
        feature.setAttribute('coord_system', fme_coord_system)
 
 

Then after the attribute "coord_system" exits the python caller, I can perform logic to test if it contains a value, and if so, set it using the coordinatesystemsetter.

Badge +9

Thank you @Chris Warren​  I am doing this on many files so. That is what I have already done. I originally was processing many files at once but have begun to use an fmeserver automation process to process each file to completion before running the next (~18k files to run). I can get the values out from a testfilter. but can't figure out how to manage the coordinatesystemsetter. I have tried in the past to get the projection into a user parameter but have been told by support that is not supported on a dynamic level.

Any suggestions are very welcome. Thanks.CS_SELECTOR 

Thank you for that @Chris Warren​ I think this might work. I do have NAD27 systems that will need to be added. I'll let you know how it goes.

Badge +9

Thank you @Chris Warren​  I am doing this on many files so. That is what I have already done. I originally was processing many files at once but have begun to use an fmeserver automation process to process each file to completion before running the next (~18k files to run). I can get the values out from a testfilter. but can't figure out how to manage the coordinatesystemsetter. I have tried in the past to get the projection into a user parameter but have been told by support that is not supported on a dynamic level.

Any suggestions are very welcome. Thanks.CS_SELECTOR 

@Chris Warren​ you might fix this btw: 'California Zone 3 0403': 'CA83IIIF', needs CA83-IIIF

Badge +16

Thank you @Chris Warren​  I am doing this on many files so. That is what I have already done. I originally was processing many files at once but have begun to use an fmeserver automation process to process each file to completion before running the next (~18k files to run). I can get the values out from a testfilter. but can't figure out how to manage the coordinatesystemsetter. I have tried in the past to get the projection into a user parameter but have been told by support that is not supported on a dynamic level.

Any suggestions are very welcome. Thanks.CS_SELECTOR 

Good catch. Thanks!

Reply