1

From a shapefile I try to export the contained polygons to GeoJSON. This works fine with right click on the layer > Export > Save as ... > Format: Geojson. The exported file then looks like this as MultiPolygon:

{
"type": "FeatureCollection",
"name": "OF17HI10_V1_RAS_T1150175",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::32632" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 441628.995394756493624, 5212788.927086498588324 ], [ 441825.182451149448752, 5212894.554236909374595 ], [ 441794.499120445572771, 5212901.412850558757782 ], [ 441773.815786304883659, 5212908.488715593703091 ], [ 441762.724423202278558, 5212916.206447079777718 ], [ 441744.288585665577557, 5212931.567259262315929 ], [ 441730.757359013718087, 5212942.249006054364145 ], [ 441715.919106941844802, 5212950.041390342637897 ], [ 441693.587076746800449, 5212957.983078581281006 ], [ 441660.488762203836814, 5212969.0546754905954 ], [ 441633.993520404794253, 5212977.079311955720186 ], [ 441625.667099691869225, 5212977.24520524032414 ], [ 441618.272856969211716, 5212982.390361597761512 ], [ 441581.785908511606976, 5212990.614071669988334 ], [ 441555.216012169315945, 5212994.891820881515741 ], [ 441526.955946461064741, 5212997.953786158002913 ], [ 441498.312737350701354, 5213002.689331044442952 ], [ 441485.872872130130418, 5213005.436098675243556 ], [ 441478.095486131845973, 5213012.254835807718337 ], [ 441464.972283214447089, 5213022.511973318643868 ], [ 441421.628287806524895, 5212979.227993131615222 ], [ 441422.746123103366699, 5212951.717618393711746 ], [ 441440.7059956282028, 5212954.275195240974426 ], [ 441442.630002560210414, 5212946.323620168492198 ], [ 441448.650863768532872, 5212934.95852932613343 ], [ 441452.298218154406641, 5212929.888023685663939 ], [ 441457.602562500513159, 5212924.368018323555589 ], [ 441468.168189583404455, 5212932.070753359235823 ], [ 441478.433620720519684, 5212945.610278531908989 ], [ 441484.086340821813792, 5212957.575760236009955 ], [ 441471.512173022550996, 5212974.485740030184388 ], [ 441479.146962999366224, 5212981.413894659839571 ], [ 441493.369825631438289, 5212963.638094075955451 ], [ 441511.838846345199272, 5212949.942558554932475 ], [ 441518.932894509169273, 5212950.634191449731588 ], [ 441534.371542179374956, 5212931.16822421271354 ], [ 441543.240293750772253, 5212916.41450394783169 ], [ 441546.02182721538702, 5212909.695304108783603 ], [ 441561.90168075892143, 5212891.4700070284307 ], [ 441575.341670381021686, 5212876.208725940436125 ], [ 441596.076369248738047, 5212850.806437096558511 ], [ 441610.475012430979405, 5212820.949036684818566 ], [ 441619.277409547648858, 5212802.864750686101615 ], [ 441624.515397687675431, 5212794.014179240912199 ], [ 441628.995394756493624, 5212788.927086498588324 ] ] ] ] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 441827.837973904446699, 5212902.414566847495735 ], [ 441812.566812892444432, 5212909.382601584307849 ], [ 441799.302604989090469, 5212912.562275260686874 ], [ 441785.164281952776946, 5212913.676933617331088 ], [ 441770.709172970440704, 5212919.79573808517307 ], [ 441755.16269862203626, 5212933.84952490683645 ], [ 441738.77528777095722, 5212947.503580668009818 ], [ 441726.818104263395071, 5212953.572618587873876 ], [ 441724.802856447873637, 5212956.944659542292356 ], [ 441700.43898955185432, 5212967.425746960565448 ], [ 441690.447285601636395, 5212967.624818529933691 ], [ 441635.416671478247736, 5212985.797169417142868 ], [ 441598.546581620059442, 5212995.694458100013435 ], [ 441588.987786729063373, 5212996.717877846211195 ], [ 441586.547923160018399, 5212999.681893270462751 ], [ 441564.982174680859316, 5213004.27642753534019 ], [ 441557.038895537436474, 5213002.768742388114333 ], [ 441528.362508916063234, 5213005.839002653025091 ], [ 441498.478631364705507, 5213011.015753032639623 ], [ 441491.426056587079074, 5213012.405726310797036 ], [ 441483.240644318284467, 5213019.649079258553684 ], [ 441480.034496069070883, 5213025.960253574885428 ], [ 441480.608416812028736, 5213033.86205989215523 ], [ 441494.647208613576367, 5213027.751544077880681 ], [ 441498.468751013278961, 5213031.423781525343657 ], [ 441515.962531967787072, 5213031.491724606603384 ], [ 441518.377511425118428, 5213027.278745478019118 ], [ 441548.477050222049002, 5213032.926342503167689 ], [ 441561.524013514455874, 5213039.746664525941014 ], [ 441566.428624505701009, 5213035.067596395500004 ], [ 441558.468755976879038, 5213032.727269498631358 ], [ 441561.167341165360995, 5213021.844859003089368 ], [ 441589.701130243542138, 5213032.521487646736205 ], [ 441607.76053457101807, 5213040.074915045872331 ], [ 441617.760534153901972, 5213040.292163170874119 ], [ 441640.208690812112764, 5213038.178965239785612 ], [ 441642.199054245254956, 5213033.557960634119809 ], [ 441661.183927104342729, 5213024.849984707310796 ], [ 441666.212957954907324, 5213026.415732447057962 ], [ 441708.812001329381019, 5213011.406466855667531 ], [ 441702.801024777814746, 5213002.363530781120062 ], [ 441717.680749569204636, 5212996.652750155888498 ], [ 441726.5976780418423, 5213005.221302497200668 ], [ 441752.185622157994658, 5212993.466367662884295 ], [ 441769.747342670743819, 5212976.040538939647377 ], [ 441786.72684988490073, 5212950.296587031334639 ], [ 441804.97190995013807, 5212925.360394273884594 ], [ 441827.837973904446699, 5212902.414566847495735 ] ] ] ] } }
]
}

but I need it to look like this as Polygon:

{
"type": "FeatureCollection",
"name": "OF17HI10_V1_RAS_T1150175",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::32632" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 441628.995394756493624, 5212788.927086498588324 ], [ 441825.182451149448752, 5212894.554236909374595 ], [ 441794.499120445572771, 5212901.412850558757782 ], [ 441773.815786304883659, 5212908.488715593703091 ], [ 441762.724423202278558, 5212916.206447079777718 ], [ 441744.288585665577557, 5212931.567259262315929 ], [ 441730.757359013718087, 5212942.249006054364145 ], [ 441715.919106941844802, 5212950.041390342637897 ], [ 441693.587076746800449, 5212957.983078581281006 ], [ 441660.488762203836814, 5212969.0546754905954 ], [ 441633.993520404794253, 5212977.079311955720186 ], [ 441625.667099691869225, 5212977.24520524032414 ], [ 441618.272856969211716, 5212982.390361597761512 ], [ 441581.785908511606976, 5212990.614071669988334 ], [ 441555.216012169315945, 5212994.891820881515741 ], [ 441526.955946461064741, 5212997.953786158002913 ], [ 441498.312737350701354, 5213002.689331044442952 ], [ 441485.872872130130418, 5213005.436098675243556 ], [ 441478.095486131845973, 5213012.254835807718337 ], [ 441464.972283214447089, 5213022.511973318643868 ], [ 441421.628287806524895, 5212979.227993131615222 ], [ 441422.746123103366699, 5212951.717618393711746 ], [ 441440.7059956282028, 5212954.275195240974426 ], [ 441442.630002560210414, 5212946.323620168492198 ], [ 441448.650863768532872, 5212934.95852932613343 ], [ 441452.298218154406641, 5212929.888023685663939 ], [ 441457.602562500513159, 5212924.368018323555589 ], [ 441468.168189583404455, 5212932.070753359235823 ], [ 441478.433620720519684, 5212945.610278531908989 ], [ 441484.086340821813792, 5212957.575760236009955 ], [ 441471.512173022550996, 5212974.485740030184388 ], [ 441479.146962999366224, 5212981.413894659839571 ], [ 441493.369825631438289, 5212963.638094075955451 ], [ 441511.838846345199272, 5212949.942558554932475 ], [ 441518.932894509169273, 5212950.634191449731588 ], [ 441534.371542179374956, 5212931.16822421271354 ], [ 441543.240293750772253, 5212916.41450394783169 ], [ 441546.02182721538702, 5212909.695304108783603 ], [ 441561.90168075892143, 5212891.4700070284307 ], [ 441575.341670381021686, 5212876.208725940436125 ], [ 441596.076369248738047, 5212850.806437096558511 ], [ 441610.475012430979405, 5212820.949036684818566 ], [ 441619.277409547648858, 5212802.864750686101615 ], [ 441624.515397687675431, 5212794.014179240912199 ], [ 441628.995394756493624, 5212788.927086498588324 ] ] ] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [  441827.837973904446699, 5212902.414566847495735 ], [ 441812.566812892444432, 5212909.382601584307849 ], [ 441799.302604989090469, 5212912.562275260686874 ], [ 441785.164281952776946, 5212913.676933617331088 ], [ 441770.709172970440704, 5212919.79573808517307 ], [ 441755.16269862203626, 5212933.84952490683645 ], [ 441738.77528777095722, 5212947.503580668009818 ], [ 441726.818104263395071, 5212953.572618587873876 ], [ 441724.802856447873637, 5212956.944659542292356 ], [ 441700.43898955185432, 5212967.425746960565448 ], [ 441690.447285601636395, 5212967.624818529933691 ], [ 441635.416671478247736, 5212985.797169417142868 ], [ 441598.546581620059442, 5212995.694458100013435 ], [ 441588.987786729063373, 5212996.717877846211195 ], [ 441586.547923160018399, 5212999.681893270462751 ], [ 441564.982174680859316, 5213004.27642753534019 ], [ 441557.038895537436474, 5213002.768742388114333 ], [ 441528.362508916063234, 5213005.839002653025091 ], [ 441498.478631364705507, 5213011.015753032639623 ], [ 441491.426056587079074, 5213012.405726310797036 ], [ 441483.240644318284467, 5213019.649079258553684 ], [ 441480.034496069070883, 5213025.960253574885428 ], [ 441480.608416812028736, 5213033.86205989215523 ], [ 441494.647208613576367, 5213027.751544077880681 ], [ 441498.468751013278961, 5213031.423781525343657 ], [ 441515.962531967787072, 5213031.491724606603384 ], [ 441518.377511425118428, 5213027.278745478019118 ], [ 441548.477050222049002, 5213032.926342503167689 ], [ 441561.524013514455874, 5213039.746664525941014 ], [ 441566.428624505701009, 5213035.067596395500004 ], [ 441558.468755976879038, 5213032.727269498631358 ], [ 441561.167341165360995, 5213021.844859003089368 ], [ 441589.701130243542138, 5213032.521487646736205 ], [ 441607.76053457101807, 5213040.074915045872331 ], [ 441617.760534153901972, 5213040.292163170874119 ], [ 441640.208690812112764, 5213038.178965239785612 ], [ 441642.199054245254956, 5213033.557960634119809 ], [ 441661.183927104342729, 5213024.849984707310796 ], [ 441666.212957954907324, 5213026.415732447057962 ], [ 441708.812001329381019, 5213011.406466855667531 ], [ 441702.801024777814746, 5213002.363530781120062 ], [ 441717.680749569204636, 5212996.652750155888498 ], [ 441726.5976780418423, 5213005.221302497200668 ], [ 441752.185622157994658, 5212993.466367662884295 ], [ 441769.747342670743819, 5212976.040538939647377 ], [ 441786.72684988490073, 5212950.296587031334639 ], [ 441804.97190995013807, 5212925.360394273884594 ], [ 441827.837973904446699, 5212902.414566847495735 ] ] ]  } }
]
}

For further processing of the GeoJSON I need the format of the second output as Polygons, not MultiPolygons. Is there a way in QGIS to get directly to this?

3 Answers 3

1

Run Multipart to Singleparts from the processing toolbox, then export the result as GeoJSON.

2
  • This works perfectly and i get 'Polygon'. But i would like to have multiple 'Polygon' in one file. Is there as well a possibility?
    – Milap
    Commented Aug 18, 2022 at 11:01
  • 1
    Ahhhh, i got it! I used the 'Iterate over this layer, ...' button. Which resulted in a single layer for each polygon. If i do not press the button, it does exactly what i needed. Thank you very much for insisting again!
    – Milap
    Commented Aug 18, 2022 at 11:22
0

Try to use Multipart To Singlepart tool

0

You first need to convert your shapefile from multipart to single part, in "Vector"-->"Geometry tools".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.