Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

KML/GPX support broken on Windows #1473

Closed
wilhelmberg opened this issue Oct 6, 2015 · 7 comments
Closed

KML/GPX support broken on Windows #1473

wilhelmberg opened this issue Oct 6, 2015 · 7 comments
Assignees
Milestone

Comments

@wilhelmberg
Copy link
Contributor

Since 0.2.8 it is not possible to open KMLs anymore (verified with 0.2.7 and 0.3.1).

They fail with

Error: OGR source missing extent

I tracked it down to the mapnik-omnivore function getExtent where

  var tranformation = new gdal.CoordinateTransformation(
    this.gdalLayer.srs,
    gdal.SpatialReference.fromEPSG(4326)
  );

fails with Unable to open EPSG support file gcs.csv. Try setting GDAL_DATA.:

image

GDAL_DATA is set correctly and the directory, that GDAL_DATA points to contains gcs.csv.

Using mapnik-omnivore alone (not in the context of Mapbox Studio Classic) digest() works as expected and returns the correct extent.

Maybe postinstall step npm dedupe messes something up.

Investigating ...

/cc @amyleew

@wilhelmberg wilhelmberg self-assigned this Oct 6, 2015
@springmeyer springmeyer added this to the v0.3.3 milestone Oct 28, 2015
@springmeyer springmeyer changed the title KML regression with +0.2.8 KML/GPX support broken on Windows Oct 28, 2015
@snowpong
Copy link

Is there a workaround for existing users of 0.3.3 for Windows? It fails with the same error.

@wilhelmberg
Copy link
Contributor Author

@snowpong not at the moment, but the underlying issue has been resolved and next Studio Classic version (#1491) should contain the fix.

In the meantime you could use QGIS or ogr2ogr to convert the KML to a shapefile and work with that.

ogr2ogr -f "ESRI Shapefile" out.shp YOUR.kml -t_srs EPSG:3857

@mannylopez
Copy link

Also happens on Mac when trying to upload run.gpx. I also get Error: OGR source missing extent.

I was able to upload the same file via the uploads page so the data is good.

@springmeyer
Copy link
Contributor

@mannylopez - yes, this is fixed in mb-pages branch, but needs to get released still for users.

@synergywp
Copy link

Anything new with this? Thanks.

@springmeyer
Copy link
Contributor

This should be fixed in v0.3.4 now that we have upgraded to latest node-gdal (v0.8.0) with this fix: naturalatlas/node-gdal#134. Keeping open until either me or @mapsam confirms via manual testing.

@springmeyer
Copy link
Contributor

confirmed via local testing that KML is now working in v0.3.4 and GPX is working except for GPX with <time> element. That fix will need to wait on #1543.

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

No branches or pull requests

5 participants