Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yohanboniface opened this issue Mar 24, 2015 · 10 comments
Open

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

yohanboniface opened this issue Mar 24, 2015 · 10 comments

Comments

@yohanboniface
Copy link
Member

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
Copy link
Member Author

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

@joostschouppe
Copy link

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

@yohanboniface
Copy link
Member Author

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
Copy link

joostschouppe commented Jun 22, 2017

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:

  • the geojson contained an attribute with the layer name
  • a single layer could be exported to a single geojson
  • I would be able to open a umap file in QGIS
  • I would be smart enough to write a .umap parser in 15 minutes

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
Copy link
Member Author

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
Copy link

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

@stevage
Copy link

stevage commented Dec 4, 2018

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
Copy link

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

@yohanboniface yohanboniface reopened this Dec 8, 2018
@yohanboniface
Copy link
Member Author

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

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

@yohanboniface
Copy link
Member Author

Given it's also possible to download one layer in geojson (through avdanced actions for now), I'm not sure this needs still exist.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants