Converts a GeoJson file as an input to create WKT file for each polygon
Note: The script was created using the Opendatasoft GeoJson files as example
python3 main.py [path-to-geojson-file]
Files will be created in the folder polygons in the same directory
Expected output:
properties
==================================================
Geom
Example output:
{"n_sq_qu": 750000036, "n_sq_ar": 750000009, "geom_x_y": [48.8798119198, 2.344861291], "c_qu": 36, "surface": 500435.41496439, "l_qu": "Rochechouart", "perimetre": 2862.45052541, "c_quinsee": 7510904, "c_ar": 9}
==================================================
SRID=4326;Polygon(((2.349708567463582 48.88222268076684, 2.349829487799957 48.88108939621413, 2.349858955208091 48.88062645079998, 2.349524398670685 48.87968520901964, 2.349515247916175 48.87966938500461, 2.349291761377601 48.87904846353868, 2.349196610503572 48.878546680359925, 2.349113866582734 48.877477896306026, 2.3490849481480263 48.87742251003852, 2.348661299296471 48.87663406745335, 2.344384406671995 48.87655458225969, 2.344374511398225 48.87654153086638, 2.343132541053842 48.87655557350835, 2.342283973743703 48.87651244787431, 2.340255299125085 48.87660144727086, 2.33967858092326 48.876655380709416, 2.339311439919574 48.87666634230503, 2.3392285502760473 48.87679269118237, 2.339861098892225 48.87904808707813, 2.340415197896781 48.88038170959969, 2.339610716261635 48.882007810067556, 2.339594908692709 48.882039911751455, 2.3395864310275822 48.88205712945715, 2.339597712544355 48.88205548025938, 2.33967810387627 48.8820437314389, 2.339776541708434 48.882029348116795, 2.339816043339583 48.88202357549772, 2.341575430099056 48.88236750798415, 2.34188879425914 48.88242876215582, 2.341988741273266 48.882448299091344, 2.343903993171748 48.88282265597415, 2.344436687658256 48.88293057710488, 2.344446695656295 48.882932605035016, 2.3445147533814152 48.88294587136562, 2.346629952240909 48.883358164807774, 2.346656128621727 48.88336326566054, 2.346660903282687 48.883364197340946, 2.34677524250487 48.8833864824888, 2.346950387627314 48.88342061872497, 2.347000796674596 48.88342663229518, 2.34713432312578 48.883442560060196, 2.347240744321025 48.88345525339857, 2.348816337834741 48.88364318120608, 2.349336903283812 48.88370526549933, 2.349505641130354 48.88372538847324, 2.349590125124536 48.883487518861706, 2.349708567463582 48.88222268076684)))