# Adding a map to the Geography View

**URL:** <https://gramps.discourse.group/t/adding-a-map-to-the-geography-view/950>\
**Category:** Help\
**Created:** [November 21, 2020, 8:42pm UTC](https://gramps.discourse.group/t/adding-a-map-to-the-geography-view/950 "2020-11-21T20:42:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![PLegoux](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/plegoux/32/413_2.png) [@PLegoux](https://gramps.discourse.group/u/PLegoux)\
**Post date:** [November 21, 2020, 8:42pm UTC](https://gramps.discourse.group/t/adding-a-map-to-the-geography-view/950/1 "2020-11-21T20:42:46Z")

</div>

(Gramps version : AIO64-5.1.1-1, Operating System: Win10)

Hello,

I’ve found that geographic map web site and would know if it is possible to add it to the Gramps Geography view?

> **[France 1750 - David Rumsey Historical Map Collection](http://rumsey.geogarage.com/maps/cassinige.html)**

URL looks like that when zooming into the map:  
`http://rumsey.geogarage.com/maps/cassinige.html?lat=48.77791275550184&lon=2.5927734375&zoom=6`

---

<div class="post-metadata">

**Author:** ![GeorgeWilmes](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@GeorgeWilmes](https://gramps.discourse.group/u/GeorgeWilmes)\
**Post date:** [November 21, 2020, 10:15pm UTC](https://gramps.discourse.group/t/adding-a-map-to-the-geography-view/950/2 "2020-11-21T22:15:36Z")

</div>

@PLegoux, you might also like [mapire.eu](https://mapire.eu/). See also [this older discussion](https://gramps.discourse.group/t/can-a-geography-view-be-exported/576).

---

<div class="post-metadata">

**Author:** ![SNoiraud](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/snoiraud/32/72_2.png) [@SNoiraud](https://gramps.discourse.group/u/SNoiraud)\
**Post date:** [November 21, 2020, 11:27pm UTC](https://gramps.discourse.group/t/adding-a-map-to-the-geography-view/950/3 "2020-11-21T23:27:09Z")

</div>

> [@PLegoux](#):
>
> [France 1750 - David Rumsey Historical Map Collection](http://rumsey.geogarage.com/maps/cassinige.html?lat=48.77791275550184&lon=2.5927734375&zoom=6)

Impossible to do. See the feature request: [#4782](https://gramps-project.org/bugs/view.php?id=4782)

The map format is incompatible with the osm-gps-map library. I asked to the [géoportail (IGN)](https://www.geoportail.gouv.fr/carte). I never received a correct answer.

---

<div class="post-metadata">

**Author:** ![SNoiraud](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/snoiraud/32/72_2.png) [@SNoiraud](https://gramps.discourse.group/u/SNoiraud)\
**Post date:** [November 22, 2020, 9:35am UTC](https://gramps.discourse.group/t/adding-a-map-to-the-geography-view/950/5 "2020-11-22T09:35:42Z")

</div>

I downloaded the whole map from cassini and its size is around 8.5gb.  
If someone can transform this hierarchy from an image size of 512x512 to a size of 256x256, we might have a cassini map available in gramps.  
A script to do that should be very interesting.  
Don’t forget the format must be #Z/#Y/#X

---

<div class="post-metadata">

**Author:** ![PLegoux](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/plegoux/32/413_2.png) [@PLegoux](https://gramps.discourse.group/u/PLegoux)\
**Post date:** [November 22, 2020, 1:37pm UTC](https://gramps.discourse.group/t/adding-a-map-to-the-geography-view/950/6 "2020-11-22T13:37:03Z")

</div>

I’m not sure this what you want to do but XnView, freeware for any OS flavour, have a batch function. Select pictures you want to change, i.e to resize them, define wanted ratio, here 50%, define an output directory if you want and let’s go.

---

<div class="post-metadata">

**Author:** ![SNoiraud](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/snoiraud/32/72_2.png) [@SNoiraud](https://gramps.discourse.group/u/SNoiraud)\
**Post date:** [November 22, 2020, 1:56pm UTC](https://gramps.discourse.group/t/adding-a-map-to-the-geography-view/950/7 "2020-11-22T13:56:04Z")

</div>

> [@PLegoux](#):
>
> XnView

XnView is not available on linux.

I have 182000 images to convert 😉

The real problem is to divide an image in 4 parts and to rename them.

---

<div class="post-metadata">

**Author:** ![PLegoux](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/plegoux/32/413_2.png) [@PLegoux](https://gramps.discourse.group/u/PLegoux)\
**Post date:** [November 22, 2020, 2:52pm UTC](https://gramps.discourse.group/t/adding-a-map-to-the-geography-view/950/9 "2020-11-22T14:52:52Z")

</div>

I try this batch on one 500x500 px square picture:

- export 1/4 left top to filename\_1
- 1/4 right top to filename\_2
- etc

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/227c5a8da708534b36f7bb960a93c5a341798c8a.png)

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/f50947f73f0496033801dc1b92f9a75f54555253.png)

Original:  
 ![test 4 x4](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/e1ea9aab7937edced9791b50978acf811e909918.jpeg)

Automaticaly cutted parts:  
 ![test 4 x4_1](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/d9a1909b4e844e789c6ede1f86867ef55f123e98.jpeg)  
 ![test 4 x4_2](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/910749edc6acf6b3f23a61499588d4d7adf3766c.jpeg)  
 ![test 4 x4_3](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/27bd051fd66c14a0144123e8a078e4b382fdfc7e.jpeg)  
 ![test 4 x4_4](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/b97f4cbb5aed487252a05cc89c0a12bce0ee109f.jpeg)

If you put them side by side:  
`![test 4 x4_1|250x250](upload://v3fLfZrWJZXShPkr0D9l8SCtn4c.jpeg)![test 4 x4_2|250x250](upload://kGYQEX9Kkhj9uCcINr9DcJIbrA0.jpeg)![test 4 x4_3|250x250](upload://5FxASFiMMzCEXd6XROsoTtavWbA.jpeg)![test 4 x4_4|250x250](upload://qsZ4mPntqOnwxJXk1brw4UC1ZhR.jpeg)`

![test 4 x4_1](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/d9a1909b4e844e789c6ede1f86867ef55f123e98.jpeg) ![test 4 x4_2](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/910749edc6acf6b3f23a61499588d4d7adf3766c.jpeg) ![test 4 x4_3](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/27bd051fd66c14a0144123e8a078e4b382fdfc7e.jpeg) ![test 4 x4_4](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/b97f4cbb5aed487252a05cc89c0a12bce0ee109f.jpeg)

On XnView website you can find debian distributions:

> **[XnView Software · XnViewMP](https://www.xnview.com/fr/xnviewmp/)**

If you want I can try to cut some of your pictures, give me a ftp url to download them

---

<div class="post-metadata">

**Author:** ![SNoiraud](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/snoiraud/32/72_2.png) [@SNoiraud](https://gramps.discourse.group/u/SNoiraud)\
**Post date:** [November 22, 2020, 4:02pm UTC](https://gramps.discourse.group/t/adding-a-map-to-the-geography-view/950/11 "2020-11-22T16:02:36Z")

</div>

This is a GUI application. Does this application exist in a “batch” way? 182,000 images are impossible to divide with this tool. It would take too long.  
After that, the problem will be to manage the hierarchical place of these images in #Z/#Y/#X  
I think it will be a very difficult and long task.

XnView\* are not free applications because the sources are not available.

I think it will be easier with a real free tool called ImageMagick. It’s available in batch mode.

We can do that with : convert -crop 256x256 img.jpg img\_%d.jpg

---

<div class="post-metadata">

**Author:** ![SNoiraud](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/snoiraud/32/72_2.png) [@SNoiraud](https://gramps.discourse.group/u/SNoiraud)\
**Post date:** [November 22, 2020, 4:12pm UTC](https://gramps.discourse.group/t/adding-a-map-to-the-geography-view/950/12 "2020-11-22T16:12:04Z")

</div>

> [@SNoiraud](#):
>
> We can do that with : convert -crop 256x256 img.jpg img\_%d.jpg

Yes, that works. Need to make a script to create all images.  
I think it will be a very long process. The problem is not to divide the images, but to recreate the image tree.

---

<div class="post-metadata">

**Author:** ![PLegoux](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/plegoux/32/413_2.png) [@PLegoux](https://gramps.discourse.group/u/PLegoux)\
**Post date:** [December 1, 2020, 5:27pm UTC](https://gramps.discourse.group/t/adding-a-map-to-the-geography-view/950/13 "2020-12-01T17:27:32Z")

</div>

I don’t know why you need to crop images but I find this, [IIIF](https://iiif.io/api/image/3.0/#table-of-contents) and [a python library](https://pypi.org/project/iiif/) to use this normalization. [It is used by Ligeo](https://www.ligeo-archives.com/actualites/lire/des-nouveaux-projets-et-l-arrivee-de-monocole-notre-nouvelle-visionneuse/127/n:143?fbclid=IwAR0nW96LCGEv22fhy3dco-TgcfOQDMEcZjY4IINuyNvrJqbma5O9OaohoWA) [fr], a french company which works for some french archives centers to crop registers images in little parts to display them more fastly. Does this could help you?

---

<div class="post-metadata">

**Author:** ![SNoiraud](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/snoiraud/32/72_2.png) [@SNoiraud](https://gramps.discourse.group/u/SNoiraud)\
**Post date:** [December 1, 2020, 7:03pm UTC](https://gramps.discourse.group/t/adding-a-map-to-the-geography-view/950/14 "2020-12-01T19:03:55Z")

</div>

I don’t want to crop the images but to divide them.  
gramps uses a library which uses the formats provided by openstreetmap or googlemap, ie:  
[http://x.y.z/#Z/#Y/#X](http://x.y.z/#Z/#Y/#X)  
#Z is the zoom.  
#X, # Y is the position of the tile on the map. each tile is size 256x256  
The rumsey site uses an alternate access method and its tiles are 512x512. So I have to divide a 512x512 tile into 4 256x256 tiles.

Their library don’t help me.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [December 31, 2020, 7:04pm UTC](https://gramps.discourse.group/t/adding-a-map-to-the-geography-view/950/15 "2020-12-31T19:04:00Z")

</div>

Closed on December 31, 2020, 7:04pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
