Select to view content in your preferred language

Extracting data from Open Data map services to gdb

165
0
04-08-2025 10:58 AM
Labels (2)
ZélieSchuhmacher
New Contributor

I want to extract open data map services to gdb.

Here is the link of the open data map services i want to extract: https://egisp.dfo-mpo.gc.ca/arcgis/rest/services/open_data_donnees_ouvertes

Attention! Each one may have multiples layers and sublayers and i need all of the data

I am a real begginer with python but my best would be to write a script to help me do it.

Here is what i have in mind:

  1. Get all URLs from base site: https://egisp.dfo-mpo.gc.ca/arcgis/rest/services/open_data_donnees_ouvertes?f=pjson
  2. For each url in urls, get the mapserver json (ex: https://egisp.dfo-mpo.gc.ca/arcgis/rest/services/open_data_donnees_ouvertes/4rst_nafo_fishing_areas_...)
  3. From that MapServer json file, get the "layers" (but also sublayers is applicable)
  4. For each layer id, get the geojson file (ex: https://egisp.dfo-mpo.gc.ca/arcgis/rest/services/open_data_donnees_ouvertes/4rst_nafo_fishing_areas_...)
  5. Download and save the geojson as "{{MapServerName}}.geojson"
  6. Run the ArcGis "JSON vers entites" tool 

 

Would any of you have already tried to write something like that?

Can someone help me programming this kind of script?

Thanks!

0 Kudos
0 Replies