umap-project / umap

uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site.
https://umap-project.org
Other
1.17k stars 225 forks source link

[wishlist] Please export layer information in .geojson #174

Open yohanboniface opened 9 years ago

yohanboniface commented 9 years ago

Originally reported by: BitBucket: maniacbug, GitHub: maniacbug


Layers are a great organizational technique for markers/etc. Unfortunately, they are lost when exported. Perhaps the layer name could be included in the "properties" for each point.


yohanboniface commented 7 years ago

There is now a "umap" format to export data and metadata.

joostschouppe commented 7 years ago

The umap format does not fix this (afaik) if you want to re-use your data in another setting, say in QGIS.

yohanboniface commented 7 years ago

Can you clarify what you want to do and what is missing for this?

Situation: there is an "all data" geojson export and a uMap one (indeed dedicated for reuse in uMap)).

joostschouppe commented 7 years ago

I made a umap instance with about 1000 objects to verify in the field. I put these objects in a layer called "to verify". Then I made two empty layers ("verified", "special cases"), to which the terrain worker could move these objects. I now want to use this data for statistical analysis, so I'm working towards a structured table. I was trying to do this by exporting the geojson, then exporting the attribute table to a flat format like csv. But to get this to work, I had to manually fill an a new field.

It would have been fine for me if:

Come to think of it, I could have taken the umap file, and use it to make a new umap instance. Then empty all the layers except one, then export as geojson.

EDIT: I don't know if I changed something, but when I make layers invisible now, I do get an export of visible layers only. So that is in fact good enough for me.

yohanboniface commented 7 years ago

a single layer could be exported to a single geojson

This is possible (but a bit click greedy): when exporting in geojson, only the visible layers will be considered, so you can export layers one by one by only showing them one by one.

Does it help?

joostschouppe commented 7 years ago

Yes, as I indicated in my edit, this is OK for me. It just didn't work the first time I tried.

stevage commented 5 years ago

I also would find it valuable if the layer name was included in the GeoJSON export. Either like this:

properties: {
    _layer: "myLayer"
}

or like this:

{
   type: "Feature",
   layer: "myLayer",
   properties: {...},
   geometry: {...}
}

Having it only in the "umap" format means you then need to convert that into GeoJSON.

almereyda commented 5 years ago

@stevage Since this issue is closed since almost two years, I would suggest to open a new one.

yohanboniface commented 5 years ago
{
   type: "Feature",
   layer: "myLayer",
   properties: {...},
   geometry: {...}
}

Sounds legit, I'll have a try on it.