Importing official administrative boundaries

I’m now trying to generate tiles automatically using Geoserver. If successful, I will put them online.

I would like to point again on the Palestine authority border issue:

Please discuss there how to continue with that issue.
we have to solve that one day.

Good luck!

I can try and write some script that creates these tiles.
This script would be reusable if/when we get an updated version of this file.
I know this file change once in a while, when municipalities are formed or merged one into another.

If jpg/jgw combination is the standard, then we could use this script in future imports as well.


My biggest problem right now is: what is the naming scheme for tiles which Potlatch understands?
I managed to produce beautiful tiles which can be overlayed on Google Maps, but not in Potlatch.

Slippy map tilenames


OK, here goes:
set in Potlatch a custom background with the following:!/!/!.png

You can also browse the whole thing via SlippyMap:

I’ve generated up to zoomlevel 13 in the meanwhile, I will set up my laptop to generate L14 during the night :slight_smile:


Wow! Thank you!

Here are the instructions for use in Potlatch2:

Click on the arrow next to “Background”
Click on the “Edit…” button. You’ll get a “Background imagery” popup window.
Click on “Add” (bottom right), a new line will be added, and edit it as follows:

(new name) => MOIN (or any other name you like)
(new URL) =>$z/$x/$y.png

Close the window.

Now you can choose this background on the “Background” drop-down menu.


Now we also have zoom 14. Please tell me if you need more.


Zoom Level 14 is great. Thank you!


I have played a little with automatic vectorising before and I decided to try my old vectoriser on the .jpg file with the borders. The results are very bad, probably useless, but if you’re curious, I have put up some files to look at: ← this is the input bitmap I supply to the vectoriser, note that I filled all the labels with orange colour to avoid artifacts. ← this is the result with orange colour treated like white. ← this is the result with orange colour treated like blue.

These results are so bad because the parameters are adjusted for a different task (I had building outlines at very very high resolution, so the vectoriser ignores short segments, and tries to find right angles everywhere, even if there aren’t any). I will play with the parameters a little tomorrow, today I spent all the time trying to get the EPSG:2039 projection right.

Thank you very much for your effort! It would be interesting to compare your automatic results (when successful) with our manual tracing.

Thank you balrog-kun!

Dimka, could you ask MOIN for an image file without the names?
Sometimes the names are in the way, like in Abu Gosh / Kiryat Yearim.
We could trace on the nameless file, and use the names from the named file, switching between the2 overlayes.

The nameless file could be used by balrog-kun to get better results.


Thanks for your comments.

I now basically removed all of the building-related postprocessing and now the results are a little better, I don’t think it’s possible to do this better except for manual tracing.

Note that the blue lines have a width of 7 pixels, so they are polygons and it’s difficult to calculate only the centrelines (I think it’s impossible). ← this is all of the blue lines traced. ← same as above with a 3.5pixel offset added. ← same with a -3.5px offset (the detection of “in” and “out” is not always working, so some shapes get offset in the wrong direction… in effect for some areas this file is better and in some areas the previous file is better)

When the administrative borders run along streams (e.g. Beit Gamliel). What is more accurate, the borders based on the raster image you got, or the natural borders. And if the latter is true, should we correct them?

AFAIK, officially, the raster image is more accurate.
When streams change course, it takes time for the MOIN to do new surveys and update the administrative borders. If at all…


The raster image is clearly off by a few meters in some obvious places (like border between two cities which should pass in the middle of a highway). The lines on the raster are too thick and in many cases an adjustment is needed based on common sense (for example when a city border is on top of a residential area clearly belonging to the city, the border should be adjusted to be just outside the area).
I don’t know if the administrative borders are supposed to coincide with natural boundaries or just be parallel to them. I think that in case of streams it doesn’t really matter.

Hi guys, if you want to use a WMS like geoserver to use with Potlatch, you should
use a proxy available at
The use for geoserver will be something like:!/!/!/LAYER/http://SERVER:8080/geoserver/wms

Best regards from Chile

Dimka I don’t find the map of Israel gvulot_shiput_OSM.jpg on the website attached. From where I can download it?

The files were deleted by accident.
I will reinstate them ASAP. Sorry!


Now it is fixed.