Leaflet API - Issue plotting route between long distances - maps

I am using leaflet API. Trying to draw flight paths based on a series of latitude longitudes. Can someone point me to the solution to the issue below? How can I ensure the path drawn is between the shortest pair of the same locations on the map, rather than two fixed locations with an unwanted straight line between the two route parts?

Related

Model Training using a Data Set with CSV files and Images

I'm trying out to retrieve data from vertical bar charts as x, y, x_axis_title, y_axis_title. An example image is as follows.
I am currently creating a dataset with vertical bar charts as above. with a CSV file for each image as follows.
Would it be possible to create a model that can output the titles, and values for both x, and y without using OCR(Optical character recognition) with a certain number of images?
Is there a specific method to build the model? or a better method?
**I was trying to do this using tesseract OCR but it was a bit inaccurate
Any help would be appreciated!
In my personal experience, Paddle OCR works a lot better than Tesseract and can help you identify all the fields. Here is a good article explaining the usage of Paddle. Using this OCR, you will not really face any problem with the text since most of it is clearly visible
I don't think if it will be possible to get the data without that. As for the values of x and y, you can use Open CV and get intersection points of blue and white to get the points and link them with the y axis to get the exact values

React-Simple-Map not scaling / Map is very small

I am attempting to create an interactive map of my home country using react-simple-maps, I am facing an issue where the map I am rendering in is extremely small, I have tried using height/width and scale but I cannot seem to get the map to render larger than scale(8).
Minimum useable code recreation:
https://codesandbox.io/s/zoom-controls-forked-g47m1?file=/src/MapChart.js
I edited your code, you can check solution here.
The problem vas that scale property in your JSON map data was too small.
If you want to make your map even more bigger change scale prop in ComposableMap.

Scanning through camera against a bank of 10 images

I building an app that can use an iPad camera to scan for particular images. There will be a bank of 10 images that will be matched against, and when there is a match on one I need to navigate the app to a specific screen.
I guess you can compare this to a QR scanner, but without QR codes.
Example of one of the images to scan is:
https://imgur.com/a/lhWv8ny
Trouble is, I'm struggling to come up with a solution to scan the images. The other parts, no issue.
I've tried pattern markers with a-frame, I've done a load of research but can't find anything concrete at the moment.
Any direction will greatly be appreciated.
Maybe try to import some machine-learning library and if it's text only extract the text and match it to a dictionary:
https://github.com/zsajjad/react-native-text-detector
Or you could match for similar images with opencv:
Checking images for similarity with OpenCV
https://github.com/brainhubeu/react-native-opencv-tutorial

Online Maps (google, nokia)

Is it possible to highlight a list of countries with a different colors?
I need to display some countries' statistics on the world map.
Now I use an image and fill a region with color (calculated for each country) by country's coordinates. It's a simple solution and it works well. But now I need to specify the countries' name too (and I think it's not the last customization).
There is a polygon solution, but it uses an array of coordinates. I don't think it's a suitable solution to highlight countries's territory.
I haven't found a solution yet. Any suggestions?
Thanks in advance.
Highlighting countries or regions to support statistics is known as Choropleth Mapping
, but unfortunately there usually isn't direct library support for Choropleth maps bundled into an online map API. This means you'll have to create your own framework, but fortunately it is possible to create one - I wrote an example using jQuery + HERE Maps to
answer the question here
Updated WKT solution now available
Access to KML shapes is no longer required, since the Geocoder API now offers an IncludeShapes attribute which returns the shape of a country in WKT format. A WKT parser can be found here.
A simple WKT choropleth example can be found here.
KML Base solution
For any framework you will need to have a file holding the boundaries of the countries or regions you need. The example uses a KML file, but you could also start with polygons if you had them. Country borders are a political minefield, which is the reason I guess most online mapping APIs steer clear of them. As a hint: try starting with something like http://geocommons.com/overlays/119819 and simplify it as much as possible to speed up the rendering- many small wiggles in the coast lines and small outlying islands are unnecessary.
Of course you could also try searching for "create choropleth map" from a search engine of your choice and use an tool to create a static image for your data (potentially at several zoom levels) and then use this as the basis of an map tile overlay. This requires a lot more work up front, but would push all the calculations server side and hence be faster to display.
Working example can be found on GitHub here
You could put the country's name into the image. It's not that difficult to place text into an image. The only tricky bit is if you are using tiles, you need to deal with names that cross tile boundaries by drawing the name once for each tile.

KML file polygon data to db/php?

I'm using gmaps v3 and I am using a kml file to display polygon shapes.
What I want to do, is that if I have a LNG/LAT coordinate, how to find whether it falls on the boundary or inside the shape?
I understand you can do this with V2 maps but not V3. So then my questions are:
Can I import the coordinates into my db in a useful way that I can then do a select statement if the LNG/LAT falls in between?
Can I do something useful on the serverside end since I have all the data to hand anyway?
Any advice appreciated.
Thanks
Solved, I found a way of converting the kml file to lat/lng coordinates which I could then apply to a php function here: derivante.com/files/phpgis.txt

Resources