Unable to map coordinates on Google Maps - c#

I have a list of coordinates that I want to plot on Google Maps, but I can't figure out how to do that. The coordinates, depending on how I plot them, appear to be all around the globe, while they should be placed in Trondheim, Norway. (And the application I have extracted them from successfully places them in Trondheim, so I know they are correct.)
A normal Google Maps coordinate from Trondheim looks like this:
63.4304, 10.395069
My coordinates, however, look like this:
long, lat
1154262, 9182277
1143762, 9184473
1157168, 9194133
1157375, 9200167
1164505, 9209786
I believe that these are in some kind of WGS84 format, but as I am a complete novice on this field, I am not completely sure. I think so because of the headers in the XML I have extracted them from:
<rss version="2.0"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
xmlns:georss="http://www.georss.org/georss"
xmlns:gml="http://www.opengis.net/gml"
xmlns:mappoint="http://virtualearth.msn.com/apis/annotate#">
When I try to use this coordinate converter, it returns coordinates in Kazakhstan. I am utterly confused. All other converters I have tried either returns locations in strange countries or in the middle of the oceans, or they fail to convert my data at all.
Does anybody here know what kind of coordinates I have, and how I can convert them to normal latitude and longitude degrees?
A formula is enough, but if there exists any libraries for this, I am using C# as development language. Any other languages would suffice, however, as I am probably able to convert them to my own anyway.

WGS-84 is Spherical Mercator, the projection system used by Google, so the coordinates you have provided are obviously not. Unfortunately for any formula to work you will need to find out the projection that your points are in.
Some more detailed information on projection is available here: http://courses.washington.edu/gis250/lessons/projection/
And a library to convert between common coordinate systems in .net is available at: http://www.doogal.co.uk/dotnetcoords.php.
Would it be possible for you to open the map layer in an GIS program such as: http://www.qgis.org/en/site/ and use the options available to determine the projection of the layer?
Some tips for identifying the coordinate system (written for ARCGIS but the programs are similar): http://resources.arcgis.com/en/help/main/10.1/index.html#//003r00000004000000 https://gis.stackexchange.com/questions/7839/best-practices-for-identifying-the-unknown-coordinate-system-of-a-shapefile

Related

Polygon to line string coverage path

I hope that this is not the wrong place for my question, however, when I don't have anywhere else to go, SO never lets me down.
I am looking for a way to convert any given polygon on a map, to a serpentine line string. I would like to pass the polygon as a geography data type (it could be a poly string) which then takes the polygon, and generates a line string covering the entire area of the polygon.
The below images illustrates perfectly what I want to achieve in the sense that I want to provide the blue polygon and I want the green path to be returned either as a collection of points or a geography data type:
Taken from https://robotics.stackexchange.com/questions/14539/generate-a-coverage-path-given-a-polygon-region
I have scoured the internet and cannot seem to find any code examples around how to get this done. I would like to do this in C# preferable but I am not too fussy about the language. Second to C# I can look at using SQL too or even Python as a last resort.
I have read countless articles on Path planning but they all seem to be overkill in terms of what I want to achieve.
Could anybody point me in any direction as to how I can achieve this? Any information or samples will be highly appreciated.
I have thought about breaking the polygon down to its boundary lines and draw a serpentine line string across it by manually checking if a given point is within the bounds of the polygon. Surely there has to be a more efficient way to achieve this? Maybe a ready made API of some sort?

3D Data Interpolation in C#

I'm looking for a simple function in C# to interpolate my 3D data.
Given is already a list with around 100-150 data sets and 3 double values.
-25.000000 -0.770568 2.444945
-20.000000 -0.726583 2.467809
-15.000000 -0.723274 2.484167
-10.000000 -0.723114 2.506445
and so on...
The chart created by these values looks usually like this, I'm not sure if this counts as scattered or rather still gridded data ...
In the end I want to hand over two double values and get the third then from the interpolation function. It shouldn't flatten the surface, it should still go through all the given data points.
Since I'm not given the time to look into all possible algorithms and lack the mathematical background I'm a bit overwhelmed by all the possibilities that I get thrown at: Kriging, Delauney triangulation, NURBs and many more ...
In addition to that most solutions I found in the net were either for a different language, outdated or are charged by the time (e.g ilnumerics, still not sure if they have the solution)
In matlab there exists a griddata function that does exactly this (and is based on a kriging algorithm as far as I know) but in this case C# is mandatory for me.
Thank you for your help and criticism and suggestions are welcome.

Cartesian Coordinate Smoothing With C#

we are trying to develop an application with RFID readers and using speedway readers so i'm using octane sdk. when we get coordinates from each tag, we need to calculate coordinates. But sometimes we get wrong coordinates and we have to recalculate.
For this calculation, i need an algorithm which is filtering and correcting the multiple points(array of x-y). it should calculate wrong coordiantes with correct coordinates.
I've searched lots of algorithm like kalman, least squares, levenberg-marquardt but i think the problem is i don't have any model for tags and i can't fit any value to it.
I know for this case i have to apply some mathematics but i can't find.

pattern recognition inside a matrix

say I have these boxes, some of which are black and some white.
The image shows a U shape drawn with the black boxes. Now say I have a matrix of 1s and 0s (it can be a huge matrix) like this:
111111111111111111
111111111111111111
111111111111111111
111111111101111111
111111111101111111
111011111101111111
111011111101111111
111011111101111111
111011111101111111
111011111101111111
111011111101111111
111100000011111111
111111111111111111
which shows zeros forming roughly the shape shown in the image. The image and the matrix are just examples. The image is a screen shot of a software where we should draw patterns, which would then need to be located in given matrices (inside simple text files).
What I'm looking for is a guidance on how to get started on this, cuz I have never programmed anything related to pattern recognitions, which this problem clearly seems to be related to. This is all that I have to do, a pattern given, to be matched with matrix of 0s and 1s. I dont think I can write it on my own in a few days, I'm writing code in c# vs 2013, so hoping I can find some libraries that would let me achieve this with minimal dependencies. Thanks
I think you need to provide a bit more information on what exactly you're looking for. Are the shapes all letters or arbitrary shapes?
Whatever you're looking for I'd start with emguCV. It's a pretty comprehensive library that isn't too difficult to use.
EmguCV has a lot of OCR (optical character recognition) functions which should be able to pick out letters pretty well.
I don't have as much experience using it for arbitrary shape detection but I think SURF detection, something which emguCV also does, might be a good way to go. It attempts to match a given image with features in another image.
People never draw at the exact same place and scale as your stored data.
The things you want are often done with neural networks (its also in aforge).
But it might be hard to A understand it and B use it in your code.
So maybe you could try it like this, get the first position, then record the delta position.
Try to find long lines, and their next direction; store the general direction changes.
above sample would be "down right up", you might also store some length info.
Then there is some math to check how much different sets are, for example string comparisons distance of strings (like in php the levenshtein function); cant think of a levenshtein func in c# dough i dont think c# is that rich with string functions but once you see that i'm sure you can derive something for C#.

Image Skeletonization using Medial Axis Transform

My requirement is something like this:
Lets take there is a Bitmap with a big letter 'A'.
The Bitmap is two colors (Either Black or White).
I need to skeletonize the big 'A'. (see: http://en.wikipedia.org/wiki/Topological_skeleton)
Using "Medial Axis Transforming" algorithm.
I tried my best in googling but i ended up being lost in finding a C#, C++ or at least pseudo code implementation of this algorithm.
I would like if someone could help me on this.
This page http://www.cs.sunysb.edu/~algorith/files/thinning.shtml has some sources you may wish to review.
The following two articles are the ones where the Medial Axis Transform was first proposed, so I think that you can find the algorithm to implement there. Do not expect a C++/C# implementation though.
A transformation for extracting new descriptors of shape
Shape description using weighted symmetric axis features
For the first one I was able to find a URL to a pdf. For the second one you will have to have access to ScienceDirect to download.
Another approach that you can use to extract the skeleton of a shape is by the Image Foresting Transform (IFT). It consists in representing the binary image as a graph. I made an implementation of the skeletonization by IFT in Matlab using the following article:
Multiscale skeletons by image foresting transform and its applications to neuromorphometry

Categories

Resources