How to add Tile-source with different projection to Map? - projection

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

Related

Is there a javascript library to reproject a geojson so that mapbox gl will render it looking like 'Plate-Carrée'?

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.

Rendering non-simplified Mapbox Vector Tile using mapbox gl js

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.

How to use equirectangular projection in TileMill?

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.

How i can make point in coordinates from lat long

I have a working system with Google map API v2. I need migrate it on v3. I use some projections and point, which stored in own projection. So i need convert this points to latlong. How i can do this? Or i need set some options in the map and use needed projection?
for example I have point with coordinates x: 332525.708620, y: 389976.561487 in 27700 projection.
Use these functions...
fromPointToLatLng()
fromLatLngToPoint()

QGis: How to import svg or raster images into Quantum GIS?

these vector or raster files being classic files without geocoordinates. They are lat/long projection, I want to import them into QGIS, scale them up/down, place them to their right place, and they become reusable shp or raster geocoordinated layers.
Edit: I'am from the wikipedia Graphic Lab>Map workshop, we want to work more using GIS. We litteraly have hundreds maps to migrate to GIS technologies....
File:Chinese_plain_5c._BC-en.svg
File:Vignobles_basse_loire.svg
Partial Solution: load SVG into Inkscape, Save as DXF file, then you can load this into QGIS. This should at least get you most of the linework into QGIS.
However, it won't yet be properly georeferenced or styled, and different layers may be in different places because the SVG has some scaling and translating operators on parts of the map data that QGIS or Inkscape is ignoring. You'll probably need to work with a layer at a time. This probably isn't a problem since maybe you are only interested in the added data on the map, and not the base map (country outlines etc) since you will probably want to overlay your data onto standard map base layer (natural earth, OpenStreetMap tiles).
The only way I see to do the transformation at present is to work out the affine transformation parameters and use the QgsAffine plugin, but that does require you to work out the parameters beforehand by fitting known source coordinates to known target coordinates.
But to do hundreds? You might be better off writing some custom SVG parsing code for each one...
If you only want to display it in the correct place, scale and rotation treat it as an SVG icon.
1. create a point layer and put a single point at the georeferenced centre of the SVG you will load.
2. edit the symbology and load the SVG as an icon
3. set the size units to map units
4. supply the appropriate dimensions
5. rotate as necessary
The redraw is very slow and painful, but if you use Project>import/Export>Export map as image you can make a georeferenced raster.

Resources