I've got the following gps data
lat
178197561,44201
long
41176829,78193
And I'm not able to map this to any gps coordinates.
The location is somewhere in germany but I don't have an exact location
The format is milliseconds. To get GPS-coordinates the following python function can be used.
from decimal import *
def convert_to_degree(mil):
return Decimal(mil / (60*60*1000))
The comma has to be replaced with a dot beforehand.
For a detailed explanation this post might help
Convert between Degree and Milliseconds
Related
I am working with some data which specifies an installation path, in another data source I have the location of events based on their lat/long location.
The installation location contained in the oracle attribute SDO_ORDINATE_ARRAY does not match any X/Y geographic coordinate system I am familiar with (Lat/Long or UTM). Is there a way to figure out what the data type is that is stored in the SDO_ORDINATE_ARRAY?
Here is an example of the data for a path with 3 (x,y) points:
MDSYS.SDO_GEOMETRY(2002,1026911,NULL,
MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),
MDSYS.SDO_ORDINATE_ARRAY(
1352633.64991299994289875030517578125,
12347411.6615570001304149627685546875,
1352638.02988700009882450103759765625,
12347479.02890899963676929473876953125,
1352904.06293900008313357830047607421875,
12347470.76137300021946430206298828125,
))
The above should be roughly within the proximity to 33.9845° N, 117.5159° W, and I went through various conversions but could not find anything that led me anywhere close to the above.
I read through the documentation on SDO_GEOMETRY from the oracle page and did not find any help in figuring out what the data type is.
https://docs.oracle.com/database/121/SPATL/sdo_geometry-object-type.htm#SPATL494
Alternatively, if there is a way I can type in the lat/long somewhere to see all of the different coordinate types which are equivalent, I might also be able to figure out which format this is.
Looks like there is a typo inside MDSYS.SDO_GEOMETRY(2002,1026911,NULL,
1026911 is supposed to be a SRS - Spatial Reference System.
If we remove the first 1 we have 102691, and that is a very well known SRS code.
ESRI:102691 for NAD 1983 for StatePlane Minnesota North FIPS 2201 Feet
The corresponding WKT gives you all the necessary information to perform any coordinate conversion:
PROJCS["NAD_1983_StatePlane_Minnesota_North_FIPS_2201_Feet",
GEOGCS["GCS_North_American_1983",
DATUM["North_American_Datum_1983",
SPHEROID["GRS_1980",6378137,298.257222101]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Lambert_Conformal_Conic_2SP"],
PARAMETER["False_Easting",2624666.666666666],
PARAMETER["False_Northing",328083.3333333333],
PARAMETER["Central_Meridian",-93.09999999999999],
PARAMETER["Standard_Parallel_1",47.03333333333333],
PARAMETER["Standard_Parallel_2",48.63333333333333],
PARAMETER["Latitude_Of_Origin",46.5],
UNIT["Foot_US",0.30480060960121924],
AUTHORITY["EPSG","102691"]]
I ran into a problem when trying to get percentage values from excel using ExcelReference.getValues(). For 300% it comes back as 3.0 and so on.
Is there any way to distinguish if the value was percentage and formatted to number?
The problem is similar to this one how to convert user input to string in Excel-DNA although it's more formatting problem than calculating formula
You can use the C API GET.CELL information function to get the formatted value of the cell, using info type 53. It returns: "Contents of the cell as it is currently displayed, as text, including any additional numbers or symbols resulting from the cell's formatting."
object contents = XlCall.Excel(XlCall.xlfGetCell, 53, theReference);
I am trying to geo-route 2 Australian (victorian) addresses, if I use the string version of the address I get the results I am expecting, however if I use geo coordinates I get no results.
The url i generated is this...
http://maps.googleapis.com/maps/api/directions/json?origin=145.159293,-37.810449&destination=144.970388,-37.799827&mode=driving
The structure appears correct to me, as this Url with UK addresess in the same structure does return results.
http://maps.googleapis.com/maps/api/directions/json?origin=53.21742417,-2.603484875&destination=53.0,-2.603484875&mode=driving
Edit:
Note the geo codes that are not returning results are equivalent to the following string based address which is returning results...
http://maps.googleapis.com/maps/api/directions/json?origin=2%20heatherlea%20court%2C%20blackburn%20north%2C%20vic%2C%203130&destination=29%20Rathdown%20street%2C%20carlton%2C%20vic&mode=driving
OK, dammit.
I Have the lattitude and longitude around the wrong way.
I'm currently tying to geocode addresses in Austria. From a given postal code and street etc. I want to automatically find latitude and longitude in WGS84 format. My first approach was to use a webservice like OpenStreetMaps Nominatim. Actually this gives decent results.
Still it is mandatory to use a disk with addresses (PAC) and their respective geolocation as a ground truth. Only if I'm not able to match the address within this data I can use the web service approach as a backup solution.
So much for context, now the problem:
On this disk the gelocation is given as X_LAMBERT and Y_LAMBERT and I can't quite figure out how to convert into latitude+longitude.
The diks's data is loaded into an Oracle 11g database with Locator and I'm doing the following:
Step 1:
Creation of spatial geometry object: MDSYS.SDO_GEOMETRY(2003,31287,NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1), MDSYS.SDO_ORDINATE_ARRAY(X_LAMBERT,Y_LAMBERT))
Step 2: Projection from WGS84 to LatLng:
SDO_CS.TRANSFORM( GEOMETRY, 4326) in my Java client I obtain latitude, longitude from the geometry via oracle.spatial.geometry.JGeometry.
Note:
I suspect 31287 to be SRID of the lambert format, I tried 8307 and 3416, but latter give even worse results.Step 2 works fine with other geometry objects, where I know the correct SRID for sure... so I guess the error is somewhere in Step 1.
Do I have to set something in USER_SDO_GEOM_METADATA ? Wrong usage of SDO_GEOMETRY constructor ? Am I still mixing up datum and projection? Maybe you can enlighten me there aswell...
The result of my action and example for input are:
Input: X_LAMBERT 602823, Y_LAMBERT 464397
Resulting Output: WGS84 (48.0469757028535, 16.0542604612583)
Expected Output: WGS84 (48.546363, 16.085735)
Its like almost correct, but still some 100 kilometers off ;-)
I'm trying to use the NDFD (National Digital Forecast Database) to get current temperature and relative humidity given a Lat and Long using their REST based service.
The issue at hand:
I can't match the 'current observation data' WITH the 'results' I get back from the REST-service.
The setup:
Location:
* Apple (1-infinite loop, Cupertino, California)
* Lat = 37.33; Lon = -122.03
If I issue the following REST-call:
http://www.weather.gov/forecasts/xml/sample_products/browser_interface/ndfdXMLclient.php?lat=37.33&lon=-122.03&product=time-series&begin=2009-06-21T17:12:35&end=2009-06-21T17:12:35&appt=appt&rh=rh&temp_r=temp_r&temp=temp
Note 1: I'm passing the begin and end time in UTC. They're the same because I'm
looking for just a single-point-in-time: the latest observed
temp and relative humidity.
AND, then compare it to what is the closet reporting stations (San Jose International Airport, CA - KSJC - 37.37N 121.93W) # http://www.weather.gov/xml/current_obs/KSJC.xml
** I can never get them to MATCH. **
Note 2: The nearest reporting station is return back from the REST call
as well, so I know I'm comparing Location apples to Location apples.
I've had two ideas:
1: I'm doing something wrong with how I'm passing in the begin/end times into the REST call...
2: You can't get 'current observed data' the way I'm trying to...
Lastly:
I've found a solution using outoftime's NOAA ruby lib , [it parses an observation stations YAML file to find the nearest one given Lat/Lng then goes directly to that station via its identifier i.e. http://www.weather.gov/xml/current_obs/KSJC.xml].... but it just feels like I may be missing something obvious here and would like to use the REST-based interface ;)
Any help or pointers would be appreciated!
Thanks!
It looks like the service you are calling isn't for current data. Judging by the URL and the XML results it seems to be for forecasts. You can also put in future dates to get future forecast data. It expects the dates to be in the -0700 time zone according to the response. I'm not sure which service you should be calling to get the data you want though.
I know that this is an old question, but this is what I'm using to get current weather conditions: http://forecast.weather.gov/MapClick.php?lat=43.09110&lon=-79.0162&unit=0&lg=english&FcstType=dwml
Found this api/link yesterday. Its still developmental (operation-mode="developmental"):
http://forecast.weather.gov/MapClick.php?lat=37.33&lon=-122.03&FcstType=dwml
If you want the "current" observation, you use the XML here:
http://w1.weather.gov/xml/current_obs/seek.php?state=or&Find=Find
e.g.,:
http://w1.weather.gov/xml/current_obs/KAST.xml
If you click on the link you'll get a rendered page. However, if you pull from it using normal rest methods or just wget, it delivers an xml file.