The issue is:
I have vector/topo/image tiled maps for some places in north america which were published as ArcGIS Server REST service. These maps (A) are based in EPSG26912 projection. Now I wanna use these as basemap for my openlayer web app; besides, I also want to consume other base map sources (B), e.g., OpenStreetmap, Google Maps, ESRI, etc. Since most of these maps are in EPSG900913 which is sphericalMercator projection to my knowledge, if I just add these base map layers into openlayer map component, the group A and group B won't overlay correctly, which means they are displayed as seperate maps. I know this is something related to projection, and might need some code with proj4js, however, as a newbie, I dont really know how to start with.
Basically, I want to put OSM/Google maps as the base map for the whole world in tier 1, then put EPSG26912 base maps for some places in north america in tier 2, and put other WMS or WFS in the top tier.
do I need to transform EPSG26912 to EPSG900913 or opposite? I guess I should use EPSG900913 as the base projection.
Appreciate any replies!
Unfortunately the only solution here is to reproject data from one projection to another. Most logical would be of course to reproject EPSG:26912 to EPSG:900913.
Geoserver can help you out with this as it can reproject both WMS and WFS
Related
I’m using 2 different sets of protobuf layers, one for lands and one for buildings, that I display using leaflet vectorgrid library. I can filter features styles using feature properties of each layer.
But I need the 2 filters to be connected to each other : when I filter lands, I would like buildings contained by the containing lands to be filtered too.
Do you see a way to do so?
Thanks a lot!
Sam
I have a high volume dataset with keys like this:
lat:6.897585,
long:52.785805,
speed:12,
bearing:144
Basically it is a dataset of records of various trips on cars. The data was stored every few seconds during each trip. The main goal of this project is to be able to visualize only u-turns (turn arounds) on a map. But for now, I am trying to at least show the data on specifc roads. For that, I am using Overpass API
With the help of Overpass Turbo, I can get a dataset with all the roads I need.
However, in the dataset, the road's geometry is represented with LineString type.
My question is, How can I get a bounding box(es) of the roads from Overpass API, so later on, I can display events that happened only on the given roads? Or maybe you have a better solution on how to achieve this?
A bounding box wouldn't be very helpful here, as using it to filter your points would show everything that falls within the box (which could include other nearby roads)
It sounds like getting a buffer around a linestring might get you closer, but could still include points that are within the buffer but not on the road you are inspecting.
The smarter way to do this would be to assign each event to a road segment using some logic based on their attributes/properties, so you don't have to depend on a spatial filter.
I have two Open Street Map node IDs. Is there any API provided by Mapbox or Leaflet which could draw a PolyLine or LineString given the two node IDs?
I am not able to find any reference to OSM IDs anywhere in Mapbox documentation, apart from here and it does not detail how to use the OSM IDs for ourselves to draw lines on the map.
What I want to do is given 2 OSM IDs, I want to highlight the road segment connecting those OSM IDs. I can't go for things like Leaflet routing machine since the number of such lines are too many, with small distances. I can't run routing for all the edges.
Since you say "I can't go for things like Leaflet routing machine since the number of such lines are too many, with small distances. I can't run routing for all the edges." I'm excluding all solutions calling an external routing API, instead you can do your own internal routing.
Use the OSM Overpass API to get the long,lat points for those nodes
In Mapbox GL JS fitBounds to those two nodes and do map.querySourceFeatures to get the roads as GeoJSON LineStrings
then compute a network graph from this and use Dijkstra's algorithm to get the shortest path between your two OSM nodes.
I am grabbing maps from bing using their API:
http://msdn.microsoft.com/en-us/library/ff701724.aspx
The largest tile they can return is 900x834. I need at least double that. Is there an easy way to figure out what the adjacent tiles are for any given zoom level and long/lat for a given resolution.
In other words, given a long,lat, zoom level, and resolution what would be the long lat for the 8 surrounding tiles in the same zoom level and resolution. Or is there a better way to get a large map?
Here's my GET request:
http://dev.virtualearth.net/REST/v1/Imagery/Map/Aerial/#{lat},#{long}/#{rand(19)}?mapSize=900,834&format=png&key=MYKEY
It is not possible to do this without breaking the rules set in the Terms of Use, especially the automation regarding your imagery retrieval (or composition).
See: http://www.microsoft.com/maps/product/terms.html
If you want to do this anyway with maybe a dedicated agreement to proceed (if possible), I would recommend to use mapArea parameters rather than using the lat long of the center, see:
http://msdn.microsoft.com/en-us/library/ff701724.aspx
See an example of mapArea imagery retrieval:
http://dev.virtualearth.net/REST/V1/Imagery/Map/road?mapArea=37.317227,-122.318439,37.939081,-122.194565&ms=500,600&pp=37.869505,-122.2705;35;BK&pp=37.428175,-122.169680;;ST&ml=TrafficFlow&key=BingMapsKey
If you want to access tile url in a supported way, you can use the same imagery service to retrieve metadata that will contain tile url. Tile are based on a quadkey model so you will be able to load the tile nearby your current view.
Is there a way to create a heat map in google earth, so areas with higher values (of some specified parameter, such as population) appear as hotspots?
This seems possible.
For instance, take a look at those few links :
Disclaimer : I've tried none of those
HeatMapAPI.com
And an example
But I'm not sure how you'd do it ; seems related to .NET and a dll in some way... so might not be as nice as it seems...
Density Mapping in Google Maps with HeatMapAPI
Heat Maps for Google Maps - (a.k.a GeoIQ mashup)
Using Google Maps to Produce Heat Maps
You've got a couple of links in those articles too ; some might be interesting too.
My colleague developed an open source java program that will generate 3D heat maps (KML) files for Google Earth from simply formatted XML data files. It may be of use. The entire project code is up at https://github.com/Noblis/OSAT You can ignore the bulk of what's there, and focus on GUIMain and the supporting files. There's sample files and documentation. I'd call it about a 0.5 version - it works, we used it in our studies, but there's some rough edges. It was done for transportation accessibility studies, but you can change the parameters you're graphing to anything you want, run from command line, whatever.
You can use the vertical axis to either view the same parameter as is used for the color OR use it to map an entirely different variable.
Here's two screen shots so you can see what it does:
tool interface:
example 3D output:
You can create polygons in a KML file and set the color of them. You can also make the polygons 3D, with height perhaps representing temperature.
There is also http://www.openheatmap.com, which offers free heatmaps on top of OpenStreetMap from a CSV upload.
Try free API heat maps. A really interesting implementation : http://en.tixik.com/tools/heatmaps
HeatmapTool.com can take a CSV file of coordinates and intensity values to generate heat map tiles for Google Maps.