Create a gpx file for 100 points between 2 gps coordinates - gps

I own a property that has too much heavy foliage to run a string from property corner to property corner. I need a way to create a gpx file for 100 points between 2 gps coordinates of the property corners. What is the easiest way to do this? Thanks.
I have tried using Garmin Basemap, but it did not give me a gpx file of the points. I would have to transfer the numbers manually.

Related

Place sprites at certain positions using a shader

What I achieved:
I created a shader (based on this code with this plant asset) that takes a black and white reference image (like a height map) and places plants on a grid determined by the darkness/lightness-value of the respective pixel.
Where I am stuck:
I am trying to get a more organic look (instead of looking like a tileset) so I used poisson-disc-sampling to get random-looking coordinates for where I want to place the plants. In "normal" code I'd just loop through the array of the generated coordinates and draw a sprite ... but I have no clue how to do that with a shader.
Question:
Is it even possible to use a shader to place images at certain positions?
(I could obviously generate a static image but I am planning to adjust the shader to simulate wind going over the vegetation like this)
Thanks already in advance for any tip or help!

Align GPS position in GPX path

Lets's imagine this. I have tracking devices sending their coordinates. I have a GPX and the map. Now, between point one and two (blue circle from bottom to top) the GPX have no points. The tracker reports his location, but is not tottally align with the line because of weak GPS signal or anything else. I want to align the marker in the GPX line even with no points.
Can i do it? Can you help guys? All comunication and service are in PHP
This is not a trivial problem but you should be able to solve it by utilizing some premade services. This post on GIS StackExchange lists some services that can do this.

Convert a Lat/Lon coordinate on a map based on preset coordinates

First off, I am not sure if this is the right place so I apologize if this belongs elsewhere - please let me know if it does. I am currently doing some prototyping with this in VB so that's why I come here first.
My Goal
I am trying to make a program to be able to log different types of information for a video game that I play. I would like to be able to map out the entire game with my program and add locations for mobs, resources, etc.
What I have
The in game map can be downloaded so I have literally just stuck this in as a background image on the form (just for now). The map that I get downloaded though is not exactly as the map appears in the game though since the game will add extra water around everything when scrolling around. This makes it a bit tricky to match up where the origin for the map is in game compared to where it would be on the downloaded map.
The nice thing though is that while I am in the game I can print my current coordinates to the screen. So I thought that maybe I can somehow use this to get the right calculation for the rest of the points on the map.
Here is an example image I will refer to now:
In the above map you will see a dotted bounding box. This is an invisible box in the game where once you move your mouse out of the longitude and latitude points will no longer show. This is what I refer to above when I mean I can't find the exact point of origin for the in game map.
You will also see 2 points: A and B. In the game there are teleporters. This is what I would use to get the most accurate position possible. I am thinking I can find the position (in game) of point A and point B and then somehow calculate that into a conversion for my mouse drag event in VB.
In VB the screen starts at top-left and is 0,0. I did already try to get the 2 points like this and just add or subtract the number to the x and y pixel position of the mouse, but it didn't quite line up right.
So with all this information does anyone know if it is possible to write a lon/lat conversion to pixels based on this kind of data?
I appreciate any thoughts and suggestions and if you need any clarification of any information I have posted please let me know and I will be happy to expand on it. I am really hoping I can get this solved!
Thanks!
EDIT:
I also want to mention I am not sure if there is an exact pixel to lat/lon point for the in game map. I.e. the in game map could be 1 pixel = 100 latitude or something. So I might also need to figure out what that conversion number is?
Some clarifications about conversion between the pixel location to 'latitude and longitude'.
First the map in your game is in a geometry coordinate system, which means everything lies in 2D and you can measure the distance between two points by calculate the pixel position.
But when we talk about longitude and latitude, we are actually talking about a geography coordinate system, which is a '3D' model of the sphere oabout the surface of the earth. All the maps on earth are abstracted from 3D to 2D through one step called projection. Like google maps or your GPS. In this projection process, the 3D model converted to 2D model but there is always some part of the map will be tortured, so that same distance in pixels on a map could be different in length in reality.
So if you don't care about the accuracy then you can consider the geometry point as geography point. Otherwise, you need to implement some GIS library to handle the geodesic distance and calculate the geography point based on the projection coordinate system.

Simulating a map with DataVsualization.Chart

VB2010 I am using the DataVisualization.Charting.Chart control and am using it as a very crude map of several geographic points. I have that working and it looks good but am trying to see about adding an image to the chart so that it would simulate the land masses. The problem I see is that I zoom around the chart programmatically, so not sure how i can anchor the image to certain x,y coordinates. I don't want to go the whole GIS component as those types of controls are just too much for this fairly simple app.
Update: Well I sort of resolved it. I generated a full world map based on the WGS84 (some would call geographic) projection. This splits the world into perfect 20d x 20d squares. I added this graphic to the BackImage property of my main Chart. I add my points but force the extents of the graph to x: -180 to 180 and y: -90 to 90. Its crude but its actually spot on for my purposes. The only thing that i cant do is zoom in to my points of interest as the background image is static. I wish there was a way to zoom the background image to anchor parts of the image to coordinates on the graph.

Simple algorithm for tracking a rectangular blob

I have created an experimental fast rectangular object tracking system; it will be used for headtracking and controllling objects in 3D engine (Ogre3D).
For now I am able to show to the webcam any kind of bright colored rectangle (text markers are good objects) and system registers basic properties of this object (hue/value/lightness and initial width and height in 0 degrees rotation).
After I have registered the trackable object, I do some simple frame processing to create grayscale probabilty map.
So now I have 2 known things:
1) 4 corners for the last object position (it's always a rectangle but it may be rotated)
2) a pretty rectangular (but still far from perfect) blob which is the brightest in the frame. I can get coordinates of any point of the blob without problems, point detection is stable enough.
I can find a bounding rectangle of the object without problems, but I have a problem with detecting the object corners themselves.
I need the simplest possible (quick&dirty would be great) algorithm to scan the image starting with some known coordinates (a point inside the blob) and detect new 4 x,y coordinates of a "blobish" rectangle corners (not corners of a bounding box but corners of the rectangular blob itself).
Ready-to-use C++ function would be awesome, but somehow google doesn't like me today :(
I think that it would be overkill to use some complicated function form OpenCV library just to extract 4 points of a single rectanglular blob. But if you know a quick and efficient way how to do it using OpenCV (it must be real-time and light on CPU because I'll run the 3D engine at the same time) then I would be really grateful.
You can apply Hough transform on segmented image to detect lines. Using detected lines you can calculate their intersection to find the corner coordinates of the blob.