I spent many sleepless and desperate hours trying to solve my problem. All links in google are now purple, no blue unread links. You guys are my last hope in solving my seems to be a simple problem.

Okay, I have an online app which is a customised module of Drupal 7. When a user types any address in the text-field the module converts address into long/lat and then performs multiple json calls to various servers and databases to collect various data. Basically, the user gets a PDF-report with something like:

  • the nearest school is located about 1km away from this house
  • crime rate in this area is low
  • property prices here are high
  • bla bla bla
  • public transport is good
  • ...and this is an aerial view of your house.

This is where the problem starts. I am trying to place a JPG file provided by our government ArcGIS server into my report. The government server is a bit slow. Sometimes it produces JPG view fast, but about 20% of requests are being ignored. Even if I open that URL in 4 browser windows and hit ENTER 3 of 4 images come nice, but 4th will fail. Or not fail today, but will fail tomorrow. It is just unpredictable and unreliable.

So, I decided not to depend on our government server and to get a copy of all imagery on my server. I am interested in about 50x50km block of land (1 big city).

After searching around I came across GeoServer as a suitable platform to host imagery and provide my app with map export capabilities. I was also considering MapServer and Mapnik. So, not yet sure that GeoServer is the best choice for me.

Okay, I am running my site on AWS EC2 server (Ubuntu).

Now, the question is how can I extract lowest layer of Imagery from government ArcGIS server and import it into my GeoServer? Can I request it all if geo tiff? Should I design some sort of script to simulate fly-over and saving its imagery on the fly?

The government ArcGIS server offers REST / SOAP / WMS interfaces. I can run query EXPORT to say capture 2000x2000px image of any BBOX and save it, but there are too many blocks. I could script a loop with about 500m step to walk through the map up and down, but I believe there should be a better way of doing that.

I have a qGIS which is able to connect to the server via WMS and even save some tiff of the current view. But I couldn't the way to save a whole layer into geo-tiff or something.

There are some vector layers also available (borders of properties, roads, parks, etc) so I'd love to save these to my GeoServer too.

As for licensing, the imagery is provided on Creative Commons base.

1 Answer 1


My first suggestion would be to reach out to the government agency's GIS contact and ask them if they can share the data in bulk with you. Explain the issue with reliability, and mention that if you had all this data you wouldn't have to keep hitting their servers to request data. I've been surprised more than once when I ask for data from a government agency and they respond with "Here you go!"

If that doesn't work, I think a script to loop through the low-level bounding boxes of the entire area is the best second bet. While it isn't very efficient, as you mentioned, this doesn't sound like it's something you need to update often so would be a one-time headache. Other than the script to retrieve the data, I would create a table containing 1 row for every bounding box in the area you want to store and include a column for storing the image when it is successfully retrieved. That will allow your script to easily track what bounding boxes still are missing pictures by using a query like SELECT bbox FROM table WHERE picture IS NULL. This can help mitigate the issue of 25% of requests being dropped.

  • another option is to use GeoServer to cascade the government server into GeoWebCache to save the good responses
    – Ian Turton
    Sep 19, 2015 at 2:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.