Leaflet to coordinates gps - leaflet

sorry if I'm asking the question in the wrong place. I have a problem, is it possible to extract - transform the coordinates of a polygon written on the map using "leaflet"? i need to store them in geojson or other. Attached is a screen with the most important data in my opinion.
I am a complete novice when it comes to programming.

Related

Use game engine to simulate real air traffic

I want to simulate something similar to an ATC radar display.
it needs to plot a lot of points and ways that I have their geographic positions and also plot the moving objects on the map then update their position as soon as their new positional data arrive.
I used leaflet.js without any realworld map or image as background(which is not even required for me), but there were two issues. first is I need to plot too much objects and polylines and polygons and some moving objects, ans second is leaflet.js requires the use of a browser which affects the performance.
I think maybe using a game engine would result in better performance, but I'm not a c++ or c# programmer so I went for Godot and couldn't find anything about how to plot geographic coordinates in that environment(neither for Unity).
could anyone give me any idea how to program such an app?

Custom tiles yet geo accurate in LeafletJS

I'm interested in custom map tiles, and using advice from here and here, I've experimented with exactly that. For a prototype I did a very geeky map of the Star Trek Federation, with episode links moving you around the planets/systems etc.
While that's all fine and dandy for fantastical locations, I'd also be interested in using heavily stylised renditions of real world locations, yet still using real lat,lng points. So, for example, a bespoke, yet mostly geo accurate, map of London, chopped into tiles, but if you passed in lat,lng coords for Camden Tube (51.53911 -0.14235), you would move to that location.
Any ideas how you configure LeafletJS to do this, without going the route of using Google Maps with custom tiles?
If I understand correctly, you have 2 different applications:
Your Star Trek map, for which you are satisfied.
Stylised map of real world, for which you would like real lat,lng coordinates to be accurate?
Then your question is how to create your custom tiles, so that Leaflet shows the stylised view of London when passed the real London coordinates?
In that case, it would be probably just a matter of correctly numbering your tiles. Or the reverse, modifying the tile numbers used by Leaflet to build the tiles URL. For the latter solution, see Specifying Lat & Long for Leaflet TileLayer
I'm not quite sure what you mean by "mostly geo accurate". It sounds like you probably just want to generate your own map tiles from some kind of source like OpenStreetMap. In that case, TileMill (although kind of obsolete) is probably the easiest way to go.
There are basically three parts:
Generate some map tiles (eg TileMill)
Host them (eg TileStream)
Point Leaflet at them

How to convert shapefile to tile based file

I am developing a Map based iPhone application where I have to draw a map of any specific region depending upon the current location of that device.
Client is supplying me the .shapefile consisting of all the co-ordinates and data to draw the map.
We can store the shape file on the server and i think to draw the map on device with the data presented on .shapefile I need the tiles with different zoom level. So on the server side I have to convert the .shapefile into tile based file.
But I don't know how to do that conversion.
Can anyone please guide me?
Thanks in advance.
Ritz
Its a lot of work.
First, shapefiles only define the geometry - you need to decide what the features are going to look like. Are they points, lines, or polygons? Do you want them all in the same colour, or depending on their attributes?
Then get mapnik or TileMill and learn how to use that. Do you just want to present the shapefile, or do you want that on a base map? In which case you'll have to generate a transparent tile set and do raster image overlays in your application.
Is it the whole world? And to the same resolution as Google Maps zooms? Get a big bank of disk storage.
http://mapbox.com/tilemill/
http://mapnik.org/
Personally I'd look into converting the shapefile into a vector form that you could render on the client - GeoJSON perhaps. Then serve that.

How to geolocalize on custom maps iphone and android

My client would like me to implement geolocation in a mobile application. He want me to use a map which is quite deformed (definitely not a google-like map). Is it an easy way to transform the GPS coordinates into the coordinates on that deformed map?
I get the coordinates (X0,Y0) from the GPS -> I need the location on my client's map (X1,Y1)
Dude, you should try http://trimaps.com. It does exactly what you are looking for!
You need to know the mapping from the client map to real world co-ordinates. Either ask your client, or perhaps you could overlay it on a google map of the same area in photoshop and work out how much you need to stretch it by in each dimension, this might get you close enough if the distortion is linear.

iPhone: GPS on custom map + CATiledLayer

Really hope someone can help me as I'm a bit stuck :S
I have a custom map of an event using the CATiledLayer so users can zoom in and scroll around the map. What I would like to do now is add the functionality to let the user know where they currently are on the map. I know it can be done as I've seen an app do this before. I'm not sure how to go about doing it though, maybe I need to convert lat/lon into pixels but I'm not sure if thats possible (depending on how big the image is, etc).
On another site it was mentioned to find out the boundaries of the map and then I can add pins to the map, but I'm not sure how to go about doing this? Will I need to find every coordinate (lat/lon) within the boundary so I can add the pin of where the user is currently?
If anyone can give me with any advice or pointers, I'd much appreciate it
You can use the route-me library by adding your own map source class. A good article that explains how to do it is here http://mobilegeo.wordpress.com/2010/07/07/route-me-native-iphone-mapping-framework/
I'm facing a challenge right now in trying to map GPS coords to a map that's an artist's rendition. In particular this is for a ski mountain, so the artist's rendition is a "trail map". The trail map is not accurate in that the whole mountain has been squeezed onto the one view, yet the actual topology of the mountain doesn't conform to the drawing.
I've tried several approaches:
1) Triangulation using known GPS coordinates of the lift stations. This is fairly simple to implement, yet this is not accurate enough and the algorithm fails if the rendition differs enough from the GPS map.
2) Creating a uniform grid for both the GPS map and the Trailmap, then doing a mapping from cells in the GPS map to the Trailmap. The downside to this is it can be a lot of busy work with no easy UI for doing it.
3) Calculating the vectors of each lift (being a straight line), find the closet lift station to a given GPS point, and calculate the estimated Trailmap location using this vector.
I'm considering #2, which is essentially the simplest solution. But if you've found a better way, I'd love to hear it.