1

I have this file http://www.meteofrance.com/mf3-rpc-portlet/js/datas/zones_AVDEPT73.json where the "zone" field is put in an area HTML element (so does "shape").

I have a little script that takes the zone and transform it into GeoJSON. Even if the GeoJSON is not at the right place here is the script:

from typing import Dict

def parse_geom(zone: str) -> Dict:
    geom = {'type': 'Polygon', 'coordinates': None}
    coords = zone.split(',')
    # we want the area to be projected in EPSG:4326. But lat need to be bound
    # in -180;+180 and long -90;+90.
    coords_int = [float(x)/100 for x in coords]
    geom['coordinates'] = [[coords_int[x+1], coords_int[x]] for x in range(0, len(coords_int)-1, 2)]
    geom['coordinates'] = [geom['coordinates']]
    return geom

Here is the result (in geojson.io) enter image description here

Here is the entire script to downloads the file:

https://gist.github.com/RemiDesgrange/fd29aadb9493b1d7a88b7eb246a93425

I tried to rotate it via QGIS. But I don't understand what I see. It seems to me that this is a fairly simple math problem...

0

On the theorical part, my question is not answered. But technicaly. I manage to get data right in Qgis by selecting all the geom, rotating by -90° and then swap X and Y.

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.