Possible to set geofence around specific points saved in database by an application? - geofencing

I am working on an application which I can use to create custom geo-fence.
For that, I want to get the coordinate of the location (latitude, longitude) and save that in the backend database using the app.
Now for each point saved, I want to create a geo-fence around each of those points, say with 10-KM radius.
The entry and exit action for all of them will be same.
How to accomplish this ? Can be be done ?

Related

How to get Windows.Point from Lat/Long

I am using the Bing Map Control for wpf on Windows 10. Given a Lat/Long location I need to get the Windows.Point value for that location. It should be relative to the map itself, namely, the upperleft corner (0,0). I use the Map.ViewportPointToLocation to go from a mouse location to the corresponding Lat/Long. Now I need the inverse function; I have not been able to find anything via web searches.
Try the maps TryLocationToViewportPoint or LocationToViewportPoint methods.
https://learn.microsoft.com/en-us/previous-versions/bing/wpf-control/hh709346(v=msdn.10)
https://learn.microsoft.com/en-us/previous-versions/bing/wpf-control/hh709336(v=msdn.10)

How to load geo-localised informations based on map configuration and interaction

I'm currently creating a new website based on geo-localised information to display on a map. I've never done this kind of development before, and my researches don't lead me to a decent result.
What I want to do is load a few POI on the map, say 15 by 15 until all POI are loaded on the map (This is to show the user that data is loading progressively).
I know how to load said POI 15 by 15 based on their update date in a scrollable list (Using limit and offset, but this implies that we have the same reference as a starting point), and now I want the same kind of behaviour, but based on their location instead of the timestamp.
What I'd like to do is trigger the update based on the center of the map when it moves, so that it starts loading POI in the displayed area, but without reloading what was already loaded.
I can't figure out how to do that.
Say the user moves the map to the side, but keeps some POI on the map, it should reload from the center to the edge of the map without re-adding the POI.
Also, when the user zooms out, it should load around the already present POI, as the center was already loaded on previous zoom.
The only think I was able to find and understand is how to sort POI based on a distance, with the Haversine formula from here:
http://www.plumislandmedia.net/mysql/haversine-mysql-nearest-loc/
But it doesn't cover the part where you interact with the map and need to load new data to add it to what's already there.
I'm using Leaflet to show information on the map and listen to events.
Any guidance welcome.

Setting up coordinate system in Map Tiler

I am creating Map tiles based on Map Image using Map Tiler software.
Now in that as a first step i selected Map Image from system.
Than i have to set the coordinate system for that i have following options :
See this image:
I choose second option from it. that is WGS84 - Latitude and longitude (EPSG:4326)
In that i have this type of algo to fill up with the coordinate values :
GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84", 6378137,
298.257223563, AUTHORITY["EPSG","7030"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4326"]]
But its not working for me. The tiles are creating well but when i am trying to create the database using Map2Sqlite software than it takes always static lat-long although i specified the Lat-Long of particular region.
Can anyone suggest which of the option mentioned in above Image should i choose ?
Also if there is any alternate way to create tiles & convert it to Sq Lite db than please suggest me.
As i checked map2sqlite is working well. But when i create tiles at that time passing the coordinates is somewhere wrong.
So anyone can please suggest me while creating tiles from Map image how to pass Coordinates of our region.
Any suggestions or hints will be highly appreciated.
Thanks.
Have a look at this video:
https://www.youtube.com/watch?v=eJxdCe9CNYg
It shows a step by step guide how to overlay an image on top of Google Maps or OpenStreetMap.
MapTiler (http://www.maptiler.com/) generates tiles compatible with the popular global mercator system automatically - these are compatible with most of the API and SDKs.

Using d3.js to display a gps route on OpenStreetMap?

I'm thinking of using d3.js to display a gps route using OpenStreetMap as map.
I would like to be able to click anywhere along the route and get the corresponding location and timestamp. The gps locations can be anywhere around the world.
I'm new to the geo thing and not sure how to start or if this is a good approach.
/Lars

generate geo tiles from vector data

i am facing this problem : I have in my database some vector data (polylines ...) which describe many world/country/region/cities boundaries.
I would like to have an interactive map on thoses areas.
When i render those data in the browser (data are sent in geojson) this is slow (i'am not surprised).
The next reason, is to generate some raster tiles to represent the areas at different zoom level and to have a way to make the relation between a click on a area and the area selected (to display more info).
I am a newbie in geo tiles :
What is the best tool to generate png/jpg tiles from vector data?
How to make relation between an area clicked and a "id" in database?
I know my questions are very large, but if you have some advices ...
Thanks!
I recently wrote a blog posting on how to improve the rendering speed of raster tiles:
http://blog.webfoot.com/2013/03/12/optimizing-map-tile-generation/
As for connecting a click to a jurisdiction ID, I don't think there is a shortcut: you need to translate the click into lat/lng (or Vast Coordinate System, as I describe in the blog post) and then do a point-in-polygon check. If you are using PostGIS, then you can do an ST_Intersects.
NOTE: if you are using MySQL, the intersection is done with bounding boxes, not the polygons. It still is possible: you just need to grab a point-in-polygon function from somewhere to check which polygon if a bounding-box check gets you more than one.
Here is an example of dots you can click on:
http://maps.webfoot.com/demos/CanadianStimulus/CanadianStimulus.html
Note that because people aren't precise with clicking (especially with tiny dots), I actually make a few pixels around the dots "live" as well as the single-pixel dots. You can also click away from the dot, and then it will show the polygon (which in this example's case, is the federal electoral district).
There is a MongoDB Plugin datasource for Geoserver, a full featured WebGIS Server. You can use it to build up a map rendering service (a WMS actually) ofyour data. Then use Geowebcache to generate tiles of your map.
This way you can use fully featured WebGIS stack, which allows you to manage additional datasources, and easy tile subset recreation if portions of your data get updated.
Also querying features on a map (relation map position to element in database) is provided through Geoservers WFS implementation.