digidem / mapeo-desktop

Local-first mapping and monitoring in remote environments
https://mapeo.app
GNU General Public License v3.0
261 stars 33 forks source link

Some area geometries created in Territory exports as `LineString` #743

Open rudokemper opened 1 year ago

rudokemper commented 1 year ago

Describe the bug In Territory, when an Area is created with a preset that can be mapped only as an area (and not line), the feature type in the GeoJSON export is LineString instead of the expected Polygon. This appears only to be happening for presets that can be created as an area exclusively - for presets that can be mapped as both area and line geometry types, the GeoJSON type is set to the correct geometry.

Can you do the same thing twice? The exact steps to see the problem again.

  1. Import a configuration that has some presets with only the area value, and some presets with both area and line values, in the geometry key (and the same association in defaults.json)
  2. In Mapeo Desktop Territory, create some areas with both of these presets.
  3. Export the data as GeoJSON.
  4. See that the areas created with a preset with only area geometry will be exported as LineString

Expected behavior Areas should always be type: polygon.

Screenshots image

Mapeo Version:

jencastrodoesstuff commented 1 year ago

I'm very sure I know less than you all here but I recall an older instruction for writing preset jsons. That all needed to be points even if they were polygons. I'm pretty sure any of my technical knowledge on the territory date and the config builder is way out of date. @rudokemper can I confirm that you were able to replicate the issue with the default as well? I'm pretty sure that there was no work done on export features recently. All energy is going into the refactor these days so fixing bugs is an easier process for our team. I can flag this issue as part of the export revisioning that we started last year.