Features to GeoJSON Format

277
0
02-12-2024 11:14 PM
AlaaAlGhananim
New Contributor

Hello Community,

Would you please one specialized in this case help me,

I have multiple polygons and need to convert them in another format to upload them into another server system , I’ll use an SQL server but first transfer polygons to GeoJSON format

AlaaAlGhananim_0-1707806677724.png

Results shows as Below:

{"type":"FeatureCollection","features":[{"type":"Feature","id":1,"geometry":{"type":"Polygon","coordinates":[[[35.877999960644175,31.96960995004596],[35.877918374751779,31.969675898305823],[35.877739969336332,31.969819948846691],[35.877082573228272,31.970412091776517],[35.876329980852915,31.971089959736688],[35.876067821011979,31.971320197688108],[35.875981564778378,31.971395897275208],[35.875920014910051,31.971449939928281],[35.875649969657559,31.971639969185908],[35.87505999300987,31.971969949979727],[35.874379983611149,31.972279972846309],[35.873450555177158,31.972686604704695],[35.872940014753432,31.972909933211998],[35.872889027276216,31.972927946367491],[35.872810775031823,31.972955591699542],[35.872600004215037,31.97302996137601],[35.871959961761611,31.973189958352833],[35.871690001849053,31.973259986900953],[35.871632018292395,31.973112282369623],[35.871580007634087,31.972979948192584],[35.871497000606894,31.972818564863854],[35.871399976268023,31.972630003691549],[35.871119982173745,31.971999973235004],[35.870939965180696,31.971599995704366],[35.870870010674558,31.971039943954572],[35.870810016688303,31.970009983808492],[35.87082997096573,31.968219963001864],[35.870809979857391,31.96670994899166],[35.87086000164566,31.96551000027295],[35.870859963018127,31.963679952973525],[35.870854365615571,31.963595427851885],[35.870809966382666,31.963499972181239],[35.870870022352655,31.963229966246033],[35.870879955024755,31.962929992237136],[35.870879974787691,31.961899934868679],[35.870879965804519,31.961740009158866],[35.870861655444116,31.961336821309583],[35.870830014084859,31.960639953708053],[35.87080002832068,31.9604499650268],[35.87079313195423,31.960402161266789],[35.870789998630521,31.960379964904881],[35.870837110775589,31.960383316224267],[35.870930025322075,31.96038995836124],[35.87113999663827,31.960399990874389],[35.8713100225687,31.960409935314772],[35.871410019432865,31.960419931831179],[35.873609980088972,31.960579986991455],[35.874580000695708,31.960639956005558],[35.876029974989059,31.960790005879755],[35.876960008887529,31.960910001795053],[35.877069715641618,31.960920946361814],[35.877160001717563,31.960929987058549],[35.877503786976796,31.960971591866048],[35.877819998448381,31.961009944151133],[35.877989676730799,31.961022682292455],[35.878220023634292,31.961039994000295],[35.878256950680672,31.961043934222651],[35.878316455983409,31.961050337370857],[35.878614762234754,31.961082242058861],[35.878779974093604,31.961099948926055],[35.879230007593065,31.961119934913661],[35.879244888185752,31.961118875764409],[35.879509948686717,31.961099968837811],[35.879588483900463,31.961090163088997],[35.879749983022243,31.961069998655304],[35.879911674383465,31.961028014804281],[35.880019987850524,31.960999953060394],[35.880135194989116,31.960969210882372],[35.880169966078796,31.960959947331339],[35.880610030075239,31.960819959306125],[35.88080374457973,31.960764625259891],[35.880872469292235,31.9607227676312],[35.880909955090722,31.96069991961927],[35.881878827650524,31.961833543681191],[35.882520013659288,31.962789978908752],[35.88292997600886,31.963329945109443],[35.883810009678655,31.964409948302777],[35.883889976806941,31.964510000152156],[35.883509952610794,31.964829925787118],[35.883437523246094,31.96489557885068],[35.882980034628083,31.965309937720299],[35.882199973567971,31.966029931724627],[35.881969955447879,31.966229972016894],[35.88145003840922,31.966690007882388],[35.88125000156176,31.966869983892831],[35.880769055236712,31.967282254665943],[35.88068996935575,31.967349949831618],[35.879930030557993,31.96801998222324],[35.879763473921152,31.968168995313917],[35.879549995582082,31.968360000898386],[35.878773227745803,31.969072597942418],[35.878460010359071,31.969359981654094],[35.878139964877832,31.969629941820934],[35.878080025688838,31.969539979947381],[35.877999960644175,31.96960995004596]]]},"properties":{"OBJECTID":1,"Neighborhood_English_Name":"Um Othyanah Al- Sharqi","Sub_district_English_Name":"Amman Qasabah Sub-district","District_English_Name":"Amman District","Governorate_English_Name":"Amman Governorate","Shape_Length":5256.3156326150529,"Shape_Area":1623555.9689320542}}

But , I need this format of the GeoJSON file

{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[35.88429808616639,31.95883108289363]}}

 

Because the second system is a closed system and the only GeoJSON format is:

{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[35.88429808616639,31.95883108289363]}}

Without the other descriptions:

]]]},"properties":{"OBJECTID":1,"Neighborhood_English_Name":"Um Othyanah Al- Sharqi","Sub_district_English_Name":"Amman Qasabah Sub-district","District_English_Name":"Amman District","Governorate_English_Name":"Amman Governorate","Shape_Length":5256.3156326150529,"Shape_Area":1623555.9689320542}}

0 Kudos
0 Replies