I need to get an equirectangular projected map out of TileMill (http://en.wikipedia.org/wiki/Equirectangular_projection).
I found a tutorial online explaining how to get a different projection by altering the project's setting in the 'project.mml' file.
(http://blog.kartena.se/using-tilemill-without-spherical-mercator/)
And I found what I thought to be a description of the necessary srs code for an equirectangular projection:
"srs": "+proj=longlat +ellps=WGS84 +no_defs"
However, the map no just shows a long thin line of water, nothing else, so clearly that's not quire right.
I've been scouring for more detail about how to set this up but I'm totally stumped.
The Web Mercator projection is no good for my purposes.
Anyone know how to do this?
Thanks so much.
S
This won't be possible in TileMill itself: the software is designed to output Spherical Mercator tiles only. Your best option would be to export Mapnik XML from TileMill, modify it to support EPSG:4326, and then serve the tiles from something like TileStache.
Related
I'm building a web application using Angular and mapbox-gl-js as map library.
The map tiles are projected using EPSG:4326 Plate-Carrée and the dataset is GeoJson (WGS84).
Since mapbox supports only web mercator projection, the data is not displayed in the correct position on map.
Any suggestions how to reproject the dataset so mapbox is able to display the data in the correct location?
Thanks.
If I understand your question correctly, you have some raster tiles which are "projected" (well, not really) in EPSG:4326, and you would like to display them in Mapbox-GL-JS. You also have another dataset, in GeoJSON, also provided in EPSG:4326, which you would like to overlay.
As you note, Mapbox-GL-JS only supports the EPSG:3857 (Web Mercator) projection. It projects datasets (but not raster tiles) from EPSG:4326 to EPSG:3857 in order to display them.
Your good options are:
Find a different basemap in Web Mercator
Find a web service which can reproject the tiles you have on the fly
Maybe there's some way where you could let Mapbox-GL-JS think it's displaying your tiles in EPSG:3857, then somehow adjust the coordinates of your overlaid dataset so that when they're reprojected from EPSG:4326 to EPSG:3857 they end up in the right positions. But I can't think how to achieve that.
You could try asking at gis.stackexchange.com.
I am trying to render a mvt (Mapbox Vector Tile) containing OSM data using Mapbox GL js, but I keep getting some ugly polygons like they were simplified (like in the Simplification section of this documentation!). I don't want those polygons to be simplified. At least I would like the best resolution to be as close as possible from reality.
First, I checked if it could come from OSM data. But OSM data is good.
So I looked into the tile server and more precisely into the mvt encoder (code). The extent value, which controls how detailed the coordinates are encoded in the vector tile, is 4096. 4096 is a very good value. So I don't understand why I don't get proper polygons.
I suppose that this issue comes from Mapbox GL js which might perform an additional simplification.
What extent value could I use in the encoder?
Is there a way to configure a resolution with mapbox gl js ?
I would appreciate some help !
Thanks!
Mapbox GL JS does not do any additional simplification on vector tile sources. If you are seeing simplified geometries, this is most likely done during vector tile generation.
I was finding the same thing. I got better results when, rather than importing the polygons as a geojson as I had been doing, I converted the file to a shape file, zipped it, and imported that into mapbox. There was then no simplification to the shape.
I use EPSG:3857 projection for View in Map. I can easily add OSM to my map.
When I use EPSG:3395 projection for View, I can easily add tile-layer with source in EPSG:3395(world mercator) projection.
But how to combaine on map tile-layers with different source projection(3857 and 3395) ? Is it possible in openlayers-3 ?
Thanx!
Not yet possible, should be possible around october when raster reprojection work has been finished.
https://github.com/openlayers/ol3/issues/3785
I would like to find out what projection is google map using is it EPSG:4326 or P900913 ? Also if you use the drawing tools what projection coordinates are generated?
EPSG3857 is the official designation.
Interactive web maps are using "Spherical Mercator" system which uses Mercator projection on
the sphere instead of WGS84 ellipsoid.
More information
Google Maps uses the Mercator projection for this purpose
https://developers.google.com/maps/documentation/javascript/maptypes#WorldCoordinates
Is there any C# library which can take a shapefile as an input with projection information defined (e.g, EPSG 3011) and return a new shapefile with user specified projection (e.g, EPSG 4326) ?
When it comes to projections, the de-facto standard is PROJ4. A simple google search of "proj4 c# wrapper" resulted in some promising results, like this one:
http://osgeo-org.1560.n6.nabble.com/C-NET-wrapper-updated-td3841800.html
library lives in http://ftp.dfg.ca.gov/Public/BDB/Tools/proj4/
I haven't personally tested though.