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

gol query fails to escape newlines when writing GeoJSON #101

Closed
docentYT opened this issue Aug 26, 2023 · 1 comment
Closed

gol query fails to escape newlines when writing GeoJSON #101

docentYT opened this issue Aug 26, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@docentYT
Copy link

gol query ../poland na[building] -f=geojson > ../buildings.geojson command creates an invalid json file because it creates a string consisting of multiple lines.

For example something like this:

{
	  "type": "Feature",
	  "id": "W437355969",
	  "geometry": {"type":"Polygon","coordinates":[[[14.2877616,53.9050536],[14.287761,53.9050445],[14.2877587,53.9050047],[14.287596,53.9050081],[14.2875989,53.905057],[14.2877616,53.9050536]]]},
	  "properties": {
	  	  "addr:city": "Świnoujście",
	  	  "addr:housenumber": "2A",
	  	  "addr:postcode": "72-602",
	  	  "addr:street": "Heleny Modrzejewskiej",
	  	  "building": "yes",
	  	  "name": "ABC",
	  	  "note": "ABC 04943-01 Posiada mini bistro 
DARIUSZ NAJDUSZYŃSKI 
NIP 8551024791
REGON 810847353",
	  	  "shop": "convenience",
	  	  "source": "https://www.sklepyabc.pl/Nasze-sklepy/"
	  }
},

The note property contains new lines.

@clarisma clarisma transferred this issue from clarisma/geodesk Aug 26, 2023
@clarisma clarisma added the bug Something isn't working label Aug 26, 2023
@clarisma clarisma changed the title Get query creates invalid geojson file gol query fails to escape newlines when writing GeoJSON Aug 26, 2023
@clarisma
Copy link
Owner

Thanks for reporting this issue!
Working on a fix...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants