Skip to content

Commit

Permalink
fix ACMA geo coords
Browse files Browse the repository at this point in the history
  • Loading branch information
jmckenna committed Sep 25, 2024
1 parent 9e444c5 commit 13ddd59
Show file tree
Hide file tree
Showing 45 changed files with 331 additions and 451 deletions.
34 changes: 23 additions & 11 deletions collection/scripts/acma-harvest.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,17 @@
maxx = csw.records[rec].identification.bbox.maxx
maxy = csw.records[rec].identification.bbox.maxy

poly = str("""POLYGON(({} {}, {} {}, {} {}, {} {}, {} {}))""".format(minx, miny, minx, maxy, maxx, maxy, maxx, miny, minx, miny))
#poly = str("""POLYGON(({} {}, {} {}, {} {}, {} {}, {} {}))""".format(minx, miny, minx, maxy, maxx, maxy, maxx, miny, minx, miny))

#schema.org expects lat long (Y X) coordinate order
boxCoords = str("""{} {} {} {}""".format(miny, minx, maxy, maxx))
print(" GeoShape:Box: " + boxCoords)
spatialCov = {}
spatialCov["@type"] = "https://schema.org/Place"
geo = {}
geo["@type"] = "https://schema.org/GeoShape"
geo["https://schema.org/box"] = boxCoords
spatialCov["https://schema.org/geo"] = geo

data = {}

Expand All @@ -176,19 +186,21 @@
data["https://schema.org/description"] = description
data["https://schema.org/url"] = url

aswkt = {}
aswkt["@type"] = "http://www.opengis.net/ont/geosparql#wktLiteral"
aswkt["@value"] = poly
#aswkt = {}
#aswkt["@type"] = "http://www.opengis.net/ont/geosparql#wktLiteral"
#aswkt["@value"] = poly

crs = {}
crs["@id"] = "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
#crs = {}
#crs["@id"] = "http://www.opengis.net/def/crs/OGC/1.3/CRS84"

hg = {}
hg["@type"] = "http://www.opengis.net/ont/sf#Polygon"
hg["http://www.opengis.net/ont/geosparql#asWKT"] = aswkt
hg["http://www.opengis.net/ont/geosparql#crs"] = crs
#hg = {}
#hg["@type"] = "http://www.opengis.net/ont/sf#Polygon"
#hg["http://www.opengis.net/ont/geosparql#asWKT"] = aswkt
#hg["http://www.opengis.net/ont/geosparql#crs"] = crs

data["http://www.opengis.net/ont/geosparql#hasGeometry"] = hg
#data["http://www.opengis.net/ont/geosparql#hasGeometry"] = hg

data["https://schema.org/spatialCoverage"] = spatialCov

# keyword(s) loop
k = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,19 @@
},
"@id": "https://raw.githubusercontent.com/iodepo/odis-arch/collection/tempHosting/data-acma/acma-0dde4807-79ad-436f-b226-5640c816166f.json",
"@type": "Dataset",
"geosparql:hasGeometry": {
"@type": "http://www.opengis.net/ont/sf#Polygon",
"geosparql:asWKT": {
"@type": "geosparql:wktLiteral",
"@value": "POLYGON((3.4 4.316944, 3.4 6.4622474, 7.24 6.4622474, 7.24 4.316944, 3.4 4.316944))"
},
"geosparql:crs": {
"@id": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
"description": "An island or isle is any any piece of sub-continental land that is surrounded by water. Very small islands such as emergent land features on atolls can be called islets, cays or keys. An island in a river or an island in a lake may be called an holm. A grouping of geographically or geologically related islands is called an archipelago. An island may still be described as such despite the presence of an artificial land bridge, or delta islands. Some places may even retain \"island\" in their names for historical reasons after being connected to a larger landmass by a wide land bridge. Conversely, when a piece of land is separated from the mainland by a man-made canal, it is generally not considered an island. There are Six (6) pronounced Islands in the nation.",
"keywords": [
"ATLAS",
"Human Dimensions | Islands | Places|Beaches|Monitoring Stations|",
"Nigeria"
],
"name": "Nigeria Islands",
"spatialCoverage": {
"@type": "Place",
"geo": {
"@type": "GeoShape",
"box": "4.316944 3.4 6.4622474 7.24"
}
},
"url": "https://acma.africanmarineatlas.org/catalogue/#/dataset/42"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@
},
"@id": "https://raw.githubusercontent.com/iodepo/odis-arch/collection/tempHosting/data-acma/acma-189b4971-ce42-4255-bcab-47eac9e1c36c.json",
"@type": "Dataset",
"geosparql:hasGeometry": {
"@type": "http://www.opengis.net/ont/sf#Polygon",
"geosparql:asWKT": {
"@type": "geosparql:wktLiteral",
"@value": "POLYGON((43.24011993408203 -23.767911911010742, 43.24011993408203 -11.958700180053711, 49.99799346923828 -11.958700180053711, 49.99799346923828 -23.767911911010742, 43.24011993408203 -23.767911911010742))"
},
"geosparql:crs": {
"@id": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
"description": "Madagascar has the highest surface area of mangroves in the Eastern African region. Mangroves in Madagascar are the breeding grounds for several globally threatened species, including the endangered Madagascar teal (Anas bernieri) and the critically endangered Madagascar fish eagle (Haliaeetus vociferoides. They are also nurseries for a wide range of commercially and artisanally important fish, crustaceans and mollusks which are important to both numerous local western coastal communities and the country’s fisheries, one of the primary industries in Madagascar. Mangroves are under increasing pressure as terrestrial forests dwindle, Agricultural lands are fully occupied elsewhere leading to migration into once undisturbed mangroves. The reduction in terrestrial forest cover has led to more and more harvesting of mangrove timber which, at the same time, is increasingly prized for its construction versatility, value as charcoal and resistance to parasites. The search for new agricultural lands has led to locally extensive clearing of mangroves. This increasese the risks of negative ecological and humanitarian impacts through flooding as sea levels rise.",
"keywords": [
"Land Surface",
Expand All @@ -29,5 +19,12 @@
"Africa"
],
"name": "Madagascar: Mangroves Hot spots areas",
"spatialCoverage": {
"@type": "Place",
"geo": {
"@type": "GeoShape",
"box": "-23.767911911010742 43.24011993408203 -11.958700180053711 49.99799346923828"
}
},
"url": "https://acma.africanmarineatlas.org/catalogue/#/dataset/7"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@
},
"@id": "https://raw.githubusercontent.com/iodepo/odis-arch/collection/tempHosting/data-acma/acma-18f8f0e0-4ec3-441f-9475-c76eafa595b3.json",
"@type": "Dataset",
"geosparql:hasGeometry": {
"@type": "http://www.opengis.net/ont/sf#Polygon",
"geosparql:asWKT": {
"@type": "geosparql:wktLiteral",
"@value": "POLYGON((40.359036342531994 -22.339760708873058, 40.359036342531994 -4.430079610119688, 55.54139793687514 -4.430079610119688, 55.54139793687514 -22.339760708873058, 40.359036342531994 -22.339760708873058))"
},
"geosparql:crs": {
"@id": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
"description": "Cinq espèces de tortues marines sont présentes dans l’Océan Indien Occidental. Les plus abondantes sont la tortue verte (Chelonia mydas) et la tortue imbriquée (Eretmochelys imbricata) pour lesquelles l’OIO regroupe des sites de pontes parmi les plus importants au monde. De nombreuses plages et sites autour de Madagascar sont fréquentés par les tortues vertes. Les Seychelles et les îles de Nosy Hara et Radama au nord-ouest de Madagascar sont des zones importantes pour l’alimentation des tortues imbriquées. Les îles du canal du Mozambique (Europa, Juan de Nova et Glorieuses) ainsi que Moheli et Mayotte sont très fréquentées par les juvéniles de tortue imbriquée.(Source: RAMP-COI, 2011)",
"keywords": [
"Madagascar",
Expand All @@ -25,5 +15,12 @@
"Africa"
],
"name": "Turtle nesting points (Eretmochelys imbricata)",
"spatialCoverage": {
"@type": "Place",
"geo": {
"@type": "GeoShape",
"box": "-22.339760708873058 40.359036342531994 -4.430079610119688 55.54139793687514"
}
},
"url": "https://acma.africanmarineatlas.org/catalogue/#/dataset/2"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@
},
"@id": "https://raw.githubusercontent.com/iodepo/odis-arch/collection/tempHosting/data-acma/acma-1fd72a93-3f66-4739-a943-7ff06bfc1727.json",
"@type": "Dataset",
"geosparql:hasGeometry": {
"@type": "http://www.opengis.net/ont/sf#Polygon",
"geosparql:asWKT": {
"@type": "geosparql:wktLiteral",
"@value": "POLYGON((43.318023681640625 -25.466215133666992, 43.318023681640625 -12.043371200561523, 57.779964447021484 -12.043371200561523, 57.779964447021484 -25.466215133666992, 43.318023681640625 -25.466215133666992))"
},
"geosparql:crs": {
"@id": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
"description": "Madagascar montre une très grande hétérogénéité dans la répartition et le potentiel de ses ressources en eau. Il existe ainsi des régions qui ne semblent pas exploiter suffisamment les ressources disponibles, alors que d'autres régions n'en disposent pas assez. Malgré le fait qu'aucune étude systématique n'a encore été effectuée jusqu'à présent pour une évaluation des ressources en eau, notamment souterraines, il sera esquissé dans les paragraphes qui suivent une présentation sommaire des caractéristiques des principales potentialités aquatiques de Madagascar. Madagascar dispose de plus de 3.000 km environ de fleuves et rivières. Le réseau hydrographique est naturellement divisé en cinq ensembles d'importance très inégale",
"keywords": [
"Land Surface",
Expand All @@ -28,5 +18,12 @@
"Africa"
],
"name": "Madagascar: Fleuves et Rivieres",
"spatialCoverage": {
"@type": "Place",
"geo": {
"@type": "GeoShape",
"box": "-25.466215133666992 43.318023681640625 -12.043371200561523 57.779964447021484"
}
},
"url": "https://acma.africanmarineatlas.org/catalogue/#/dataset/4"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@
},
"@id": "https://raw.githubusercontent.com/iodepo/odis-arch/collection/tempHosting/data-acma/acma-1fdb3bda-0431-4bda-98ca-65ec5f98f597.json",
"@type": "Dataset",
"geosparql:hasGeometry": {
"@type": "http://www.opengis.net/ont/sf#Polygon",
"geosparql:asWKT": {
"@type": "geosparql:wktLiteral",
"@value": "POLYGON((33.9493859 -4.663867, 33.9493859 4.5455407, 41.8772814 4.5455407, 41.8772814 -4.663867, 33.9493859 -4.663867))"
},
"geosparql:crs": {
"@id": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
"description": "This data is from OSM and was downloaded Sept 22, 2024",
"keywords": "",
"name": "Kenya Points of Interest from OpenStreetMap, 2024",
"spatialCoverage": {
"@type": "Place",
"geo": {
"@type": "GeoShape",
"box": "-4.663867 33.9493859 4.5455407 41.8772814"
}
},
"url": "https://acma.africanmarineatlas.org/catalogue/#/dataset/48"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,19 @@
},
"@id": "https://raw.githubusercontent.com/iodepo/odis-arch/collection/tempHosting/data-acma/acma-21a5ddda-c9d8-4485-907e-732920e85ed1.json",
"@type": "Dataset",
"geosparql:hasGeometry": {
"@type": "http://www.opengis.net/ont/sf#Polygon",
"geosparql:asWKT": {
"@type": "geosparql:wktLiteral",
"@value": "POLYGON((3.255556 6.614444, 3.255556 13.530556, 12.014167 13.530556, 12.014167 6.614444, 3.255556 6.614444))"
},
"geosparql:crs": {
"@id": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
"description": "Dam is a structure built across a stream, river or estuary to retain water. Some dams are tall and thin, while others are short and thick. Dams are made from a variety of materials such as rock, steel and wood. This activity concentrates on dams made from concrete, a complex material, because it is important for the construction of large dams. The importance of the dams for irrigation, electrical supply and recreation.",
"keywords": [
"ATLAS",
"Human Dimensions | Boundaries | Places|Dams",
"Nigeria"
],
"name": "Nigeria Dams",
"spatialCoverage": {
"@type": "Place",
"geo": {
"@type": "GeoShape",
"box": "6.614444 3.255556 13.530556 12.014167"
}
},
"url": "https://acma.africanmarineatlas.org/catalogue/#/dataset/39"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@
},
"@id": "https://raw.githubusercontent.com/iodepo/odis-arch/collection/tempHosting/data-acma/acma-29bf6500-0644-48e2-86bc-60ed802279de.json",
"@type": "Dataset",
"geosparql:hasGeometry": {
"@type": "http://www.opengis.net/ont/sf#Polygon",
"geosparql:asWKT": {
"@type": "geosparql:wktLiteral",
"@value": "POLYGON((43.069673217232584 -25.604974776321917, 43.069673217232584 -11.982498957183896, 50.630815651383045 -11.982498957183896, 50.630815651383045 -25.604974776321917, 43.069673217232584 -25.604974776321917))"
},
"geosparql:crs": {
"@id": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
"description": "Lors du Congrès Mondial des Aires Protégées à Durban (Afrique du Sud) en 2003, Madagascar annonçait au monde entier la décision du Gouvernement Malgache de tripler avant 2008 la surface des aires protégées à Madagascar en se référant aux catégories des aires protégées de l'UICN. Ainsi, dans le cadre de la Politique Générale de l’Etat (PGE), Le Gouvernement a décidé de fixer un objectif de création de un million d’hectares d’aires protégées nouvelles au cours de l’année 2005, , . Les axes d’objectifs pour le Système d’Aires Protégées de Madagascar (SAPM) sont : Conserver l’ensemble de la biodiversité unique de Madagascar (écosystèmes, espèces, variabilité génétique) ; Conserver le patrimoine culturel Malagasy ; Maintenir les services écologiques et l’utilisation durable des ressources naturelles pour la réduction de la pauvreté et le développement durable",
"keywords": [
"Land Surface",
Expand All @@ -23,5 +13,12 @@
"Africa"
],
"name": "Madagascar AOI : Les Aires Protegees Marines",
"spatialCoverage": {
"@type": "Place",
"geo": {
"@type": "GeoShape",
"box": "-25.604974776321917 43.069673217232584 -11.982498957183896 50.630815651383045"
}
},
"url": "https://acma.africanmarineatlas.org/catalogue/#/dataset/9"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@
},
"@id": "https://raw.githubusercontent.com/iodepo/odis-arch/collection/tempHosting/data-acma/acma-2b962cb8-0f76-44b1-aee3-0778fbd6693e.json",
"@type": "Dataset",
"geosparql:hasGeometry": {
"@type": "http://www.opengis.net/ont/sf#Polygon",
"geosparql:asWKT": {
"@type": "geosparql:wktLiteral",
"@value": "POLYGON((37.00000000000006 -31.83679141085293, 37.00000000000006 -4.99999999999995, 57.0 -4.99999999999995, 57.0 -31.83679141085293, 37.00000000000006 -31.83679141085293))"
},
"geosparql:crs": {
"@id": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
"description": "Comminication cables sourcesd from Greg's Cable Map which is an attempt to consolidate all the available information about the undersea communications infrastructure. The initial data was harvested from Wikipedia, and further information was gathered by  googling and transcribing data into a GIS format.",
"keywords": [
"Madagascar",
Expand All @@ -24,5 +14,12 @@
"Africa"
],
"name": "Madagascar AOI Communication Cables",
"spatialCoverage": {
"@type": "Place",
"geo": {
"@type": "GeoShape",
"box": "-31.83679141085293 37.00000000000006 -4.99999999999995 57.0"
}
},
"url": "https://acma.africanmarineatlas.org/catalogue/#/dataset/16"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@
},
"@id": "https://raw.githubusercontent.com/iodepo/odis-arch/collection/tempHosting/data-acma/acma-2df256d1-f528-4257-ae69-0c2001d76e28.json",
"@type": "Dataset",
"geosparql:hasGeometry": {
"@type": "http://www.opengis.net/ont/sf#Polygon",
"geosparql:asWKT": {
"@type": "geosparql:wktLiteral",
"@value": "POLYGON((43.22848450372746 -25.57046994414094, 43.22848450372746 -11.963613701983933, 50.4754880363888 -11.963613701983933, 50.4754880363888 -25.57046994414094, 43.22848450372746 -25.57046994414094))"
},
"geosparql:crs": {
"@id": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
"description": "Avec 20 millions d’habitants pour une superficie atteignant 587 041 km², soit un peu supérieure à celle de la France, Madagascar n’a qu’une faible densité démographique d’un peu plus de 30 habitants au km2. Et comme cette population n’est urbanisée qu’à environ 15%, on comprendra que les grandes agglomérations soient rares. Les plus importantes sont Antananarivo, la capitale nationale et les cinq chefs-lieux des anciennes Provinces, soit par ordre alphabétique, Antsiranana, Fianarantsoa, Mahajanga, Toamasina et Toliara. Aux temps coloniaux, bien avant la suppression des six provinces et leur remplacement par les vingt-deux régions actuelles, le nom de ces six villes que les colonisateurs ne parvenaient pas à prononcer avait été changé en Tananarive, Diégo Suarez, Fianarantsoa, Majunga, Tamatave et Tuléar, des noms qui ont toujours été rejetés par les autochtones. Ces villes ont fini par retrouver leur identité initiale peu après l’indépendance en 1960. Avec le grand changement politique de 2002 et la mise en place de la décentralisation, elles ont presque toutes perdu une bonne partie de leur importance administrative et politique, mais non leur poids démographique et économique. C’est d’ailleurs ce dernier facteur qui nous a conduit à leur ajouter deux ports : l’un à l’extrême Sud-est qui se développe énormément en raison de l’exploitation et l’exportation de l’ilménite, minerais dont on extrait le titane et le second dans le creux de la côte ouest, avec un arrière-pays prometteur au plan charbonnier (Sakoa) et pétrolier (Bemolanga). Il s’agit respectivement de Taolagnaro, nom original de Fort Dauphin, et de Morondava.",
"keywords": [
"Madagascar",
Expand All @@ -25,5 +15,12 @@
"Africa"
],
"name": "Madagascar AOI: Les villes et villages",
"spatialCoverage": {
"@type": "Place",
"geo": {
"@type": "GeoShape",
"box": "-25.57046994414094 43.22848450372746 -11.963613701983933 50.4754880363888"
}
},
"url": "https://acma.africanmarineatlas.org/catalogue/#/dataset/5"
}
Loading

0 comments on commit 13ddd59

Please sign in to comment.