Question

dynamic crs to separate data stream

  • 5 April 2024
  • 4 replies
  • 37 views

Badge +10

I am reading datasets and can extract the crs (stateplane) from them. but I need to use a spatialrelator for data that is in WGS. I need to be able to determine incoming crs and set a reprojector on the wgs data right before the spatialrelator. In the past i have only been able to accomplish this by stringing together more than 1 workbench.

Any ideas on how to get this done in 1?


4 replies

Userlevel 2
Badge +6

Hi @gisbradokla, if I’m understanding your scenario correctly, I’m thinking that you can use the CoordinateSystemExtractor to obtain the CRS of your datasets as an attribute, and then set that attribute as the Coordinate System in the CoordinateSystemSetter. The only thing you’ll really have to set is @Value(_coordsys) in the CoordinateSystemSetter. I hope this helps and let me know if you have any questions!
 

 

Badge +10

No that is not the scenario.

The scenario is I have 2 datasets coming in to the workbench.

1 is known gcs (wgs84), the other is stateplane but one of several possibilities. (unknown)

both are going into the SpatialRelator xformer. I would be able to put a reprojector on the sp side and discover it’s projection and reproject to wgs84. but 1  using reprojector doesn’t allow transformation and reprojects incorrectly. 2 i have tried the esrireprojector but fails with the error:EsriReprojector (TeeFactory): EsriReprojector: Reproject: Could not reproject the geometry of the preceding feature: Reprojector: Invalid reprojection parameters

Also it is not desirable to relate the data in wgs84 at this point because there is more work to do to the data with regard to length and distance after i get this subset of data.
 

 

Userlevel 2
Badge +6

Hi @gisbradokla, you can try to use multiple CsmapReprojectors to run copies of the WGS84 hull and convert each one to a different possible state plane. You can then extract the coordinate system name  and copy it over to your input data with the SpatialRelator. I hope this helps! 

Badge +10

Hi @gisbradokla, you can try to use multiple CsmapReprojectors to run copies of the WGS84 hull and convert each one to a different possible state plane. You can then extract the coordinate system name  and copy it over to your input data with the SpatialRelator. I hope this helps! 

Not that great of a solution as there are multiple states and even texas has many projections. let alone that the dwg could be nad27 or nad83. It seems the stack of tests would become quite volumous

Reply