Solved

geojson from WMS

  • 29 April 2023
  • 3 replies
  • 19 views

I can read this geojson below in fme.

 

In this example (I & J) at the end of the string Fjson&I=800&J=422

It will give me back a responds.

However looking to loop through all possible values of I & J

Imax=1073&Jmax=571 = 612683 values.

where I and J is a variable in the geojson string.

 

xxx/geoserver/ows?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&BBOX=50.46754657502329877%2C-1.82577500000000015%2C51.03245342497670123%2C-0.76422499999999971&CRS=EPSG%3A4326&WIDTH=1073&HEIGHT=571&LAYERS=public%3Axxxxxxx&STYLES=&FORMAT=image%2Fpng&QUERY_LAYERS=public%3Asolent_currents_direction&INFO_FORMAT=application%2Fjson&I=800&J=422

icon

Best answer by redgeographics 1 May 2023, 09:55

View original

3 replies

Badge +5

Use a Cloner to create 1073 records with the Copy Number Attribute set to I and feed the output of that into a second cloner creating 571 records with Copy Number Attribute set to J.

 

Hopefully this is your WMS service and you aren't going to be sending that many requests to someone else's server. Either way you may want to add a Decelerator in there to control how many requests per minute are sent.

Userlevel 5
Badge +25

Use a Cloner to create 1073 records with the Copy Number Attribute set to I and feed the output of that into a second cloner creating 571 records with Copy Number Attribute set to J.

 

Hopefully this is your WMS service and you aren't going to be sending that many requests to someone else's server. Either way you may want to add a Decelerator in there to control how many requests per minute are sent.

My thoughts exactly. Also, how long does a single request take? Even if it's a second you're looking at 170+ hours of processing.

 

Is there another way to get to the data? (and if whoever is controlling that server says no, feel free to tell them what @Gary Nicholson​ and I have said here)

thanks that works. it takes 2 minutes. there is another way as the geoserver also permits geotiff which gives you the real world coordinates X and Y. The I and J gives you the getfeatureinfo for column= I and row=J. Be aware the origin is left upper corner so J has to be swapped. The width and height is just the range of I and J which can be translated to the X and J range. That would mean 1073 x 571 = 612683 through the http caller.

You could even do a higher resolution but it just interpolates the values and takes a lot longer without to much gain of resolution. You need to balance it.

Reply