Search Results

Search found 15 results on 1 pages for 'wgs84'.

Page 1/1 | 1 

  • How to transform coordinate from WGS84 to a coordinate in a projection in PROJ.4?

    - by Sanoj
    I have a GPS-coordinate in WGS84 that I would like to transform to a map-projection coordinate in SWEREF99 TM using PROJ.4 in Java or proj4js in JavaScript. Its hard to find documentation for PROJ.4 and how to us it. If you have a good link, please post it as a comment. The PROJ.4 parameters for SWEREF99 TM is +proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs I have tried to use a PROJ.4 Java library and tried this code and values: String[] proj4_w = new String[] { "+proj=utm", "+zone=33", "+ellps=GRS80", "+towgs84=0,0,0,0,0,0,0", "+units=m", "+no_defs" }; Projection proj = ProjectionFactory.fromPROJ4Specification(proj4_w); Point2D.Double testLatLng = new Point2D.Double(55.0000, 12.7500); Point2D.Double testProjec = proj.transform(testLatLng, new Point2D.Double()); This give me the point Point2D.Double[5197915.86288144, 1822635.9083898761] but I should be N: 6097106.672, E: 356083.438 What am I doing wrong? and what method and parameters should I use instead? The correct values is taken from Lantmäteriet. I am not sure if proj.transform(testLatLng, new Point2D.Double()); is the right method to use.

    Read the article

  • Java Simple WGS84 Lat Lon to Pixel X, Y

    - by Cnich
    I've read a multitude of information regarding map projection today. The amount of information available is overwhelming. I am attempting to simply convert lat, long values into a screen X, Y coordinate not using any map. I do not need the values projected onto any map, just on the window. The window itself is representing approx. a 1500x1500 meter location. Lat, Long accuracy needed is to a 1/10th of a second. What may be some simpler ways in converting lat/long representation to the screen? I've read several articles and post regarding translation onto images, but nothing related to the natural java coordinate system. Thanks for any insight.

    Read the article

  • Geodjango: importing data from OSGB_1936, displaying in WGS84?

    - by AP257
    I have some polygon data saved in a PostGIS database with projection SRID 27700. geom = models.MultiPolygonField(srid=27700) I want to display the shapes on OpenStreetMap, i.e. with SRID 900913 (I think?). So, two questions: How do I change the code below to output with the right SRID for OpenStreetMap? How can I change the Django code below to give me a nice json object, ready to display as a polygon? area = get_object_or_404(soa.objects, code=my_code) polygon = area.geom return render_to_response('area.html', { 'area': area }, context_instance = RequestContext(request)) Apologies if this question doesn't make sense - I'm pretty new to GeoDjango.

    Read the article

  • Getting a handle on GIS math, where do I start?

    - by Joshua
    I am in charge of a program that is used to create a set of nodes and paths for consumption by an autonomous ground vehicle. The program keeps track of the locations of all items in its map by indicating the item's position as being x meters north and y meters east of an origin point of 0,0. In the real world, the vehicle knows the location of the origin's lat and long, as it is determined by a dgps system and is accurate down to a couple centimeters. My program is ignorant of any lat long coordinates. It is one of my goals to modify the program to keep track of lat long coords of items in addition to an origin point and items' x,y position in relation to that origin. At first blush, it seems that I am going to modify the program to allow the lat long coords of the origin to be passed in, and after that I desire that the program will automatically calculate the lat long of every item currently in a map. From what I've researched so far, I believe that I will need to figure out the math behind converting to lat long coords from a UTM like projection where I specify the origin points and meridians etc as opposed to whatever is defined already for UTM. I've come to ask of you GIS programmers, am I on the right track? It seems to me like there is so much to wrap ones head around, and I'm not sure if the answer isn't something as simple as, "oh yea theres a conversion from meters to lat long, here" Currently, due to the nature of DGPS, the system really doesn't need to care about locations more than oh, what... 40 km? radius away from the origin. Given this, and the fact that I need to make sure that the error on my coordinates is not greater than .5 meters, do I need anything more complex than a simple lat/long to meters conversion constant? I'm knee deep in materials here. I could use some pointers about what concepts to research. Thanks much!

    Read the article

  • How to reproject a shapefile from WGS 84 to Spherical/Web Mercator projection.

    - by samkea
    Definitions: You will need to know the meaning of these terms below. I have given a small description to the acronyms but you can google and know more about them. #1:WGS-84- World Geodetic Systems (1984)- is a standard reference coordinate system used for Cartography, Geodesy and Navigation. #2: EPGS-European Petroleum Survey Group-was a scientific organization with ties to the European petroleum industry consisting of specialists working in applied geodesy, surveying, and cartography related to oil exploration. EPSG::4326 is a common coordinate reference system that refers to WGS84 as (latitude, longitude) pair coordinates in degrees with Greenwich as the central meridian. Any degree representation (e.g., decimal or DMSH: degrees minutes seconds hemisphere) may be used. Which degree representation is used must be declared for the user by the supplier of data. So, the Spherical/Web Mercator projection is referred to as EPGS::3785 which is renamed to EPSG:900913 by google for use in googlemaps. The associated CRS(Coordinate Reference System) for this is the "Popular Visualisation CRS / Mercator ". This is the kind of projection that is used by GoogleMaps, BingMaps,OSM,Virtual Earth, Deep Earth excetra...to show interactive maps over the web with thier nearly precise coordinates.  Reprojection: After reading alot about reprojecting my coordinates from the deepearth project on Codeplex, i still could not do it. After some help from a colleague, i got my ball rolling.This is how i did it. #1 You need to download and open your shapefile using Q-GIS; its the one with the biggest number of coordinate reference systems/ projections. #2 Use the plugins menu, and enable ftools and the WFS plugin. #3 Use the Vector menu--> Data Management Tools and choose define current projection. Enable, use predefined reference system and choose WGS 84 coodinate system. I am personally in zone 36, so i chose WGS84-UTM Zone 36N under ( Projected Coordinate Systems--> Universal Transverse Mercator) and click ok. #4 Now use the Vector menu--> Data Management Tools and choose export to new projection. The same dialog will pop-up. Now choose WGS 84 EPGS::4326 under Geodetic Coordinate Systems. My Input user Defined Spatial Reference System should looks like this: +proj=tmerc +lat_0=0 +lon_0=33 +k=0.9996 +x_0=500000 +y_0=200000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs Your Output user Defined Spatial Reference System should look like this: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs Browse for the place where the shapefile is going to be and give the shapefile a name(like origna_reprojected). If it prompts you to add the projected layer to the TOC, accept. There, you have your re-projected map with latitude and longitude pair of coordinates. #5 Now, this is not the actual Spherical/Web Mercator projection, but dont worry, this is where you have to stop. All the other custom web-mapping portals will pick this projection and transform it into EPGS::3785 or EPSG:900913 but the coordinates will still remain as the LatLon pair of the projected shapefile. If you want to test, a particular know point, Q-GIS has a lot of room for that. Go ahead and test it.

    Read the article

  • R software : How to extract values from rasterstack with xy coordinates?

    - by Eddie
    I have a rasterstack(5 raster layers) that actually is a time series raster. r <- raster(nrow=20, ncol=200) s <- stack( sapply(1:5, function(i) setValues(r, rnorm(ncell(r), i, 3) )) ) > s class : RasterStack dimensions : 20, 200, 4000, 5 (nrow, ncol, ncell, nlayers) resolution : 1.8, 9 (x, y) extent : -180, 180, -90, 90 (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 names : layer.1, layer.2, layer.3, layer.4, layer.5 min values : -9.012146, -9.165947, -9.707269, -7.829763, -5.332007 max values : 11.32811, 11.97328, 15.99459, 15.66769, 16.72236 My objective is to plot each pixel and explore their behavior over time. How could I extract each pixels together with their x,y coordinates and plot a time series curve?

    Read the article

  • Calculating distance from latitude, longitude and height using a geocentric co-ordinate system

    - by Sarge
    I've implemented this method in Javascript and I'm roughly 2.5% out and I'd like to understand why. My input data is an array of points represented as latitude, longitude and the height above the WGS84 ellipsoid. These points are taken from data collected from a wrist-mounted GPS device during a marathon race. My algorithm was to convert each point to cartesian geocentric co-ordinates and then compute the Euclidean distance (c.f Pythagoras). Cartesian geocentric is also known as Earth Centred Earth Fixed. i.e. it's an X, Y, Z co-ordinate system which rotates with the earth. My test data was the data from a marathon and so the distance should be very close to 42.26km. However, the distance comes to about 43.4km. I've tried various approaches and nothing changes the result by more than a metre. e.g. I replaced the height data with data from the NASA SRTM mission, I've set the height to zero, etc. Using Google, I found two points in the literature where lat, lon, height had been transformed and my transformation algorithm is matching. What could explain this? Am I expecting too much from Javascript's double representation? (The X, Y, Z numbers are very big but the differences between two points is very small). My alternative is to move to computing the geodesic across the WGS84 ellipsoid using Vincenty's algorithm (or similar) and then calculating the Euclidean distance with the two heights but this seems inaccurate. Thanks in advance for your help!

    Read the article

  • Mapscript queryByPoint return no results

    - by lucian.jp
    I have a dynamically generated mapfile made with c# mapscript that is defined like: MAP EXTENT 5.91828 45.63552 5.92346 45.65051 IMAGECOLOR 192 192 192 IMAGETYPE png SIZE 256 256 STATUS ON TRANSPARENT TRUE UNITS METERS NAME "GMAP_TILE" OUTPUTFORMAT NAME "png" MIMETYPE "image/png" DRIVER "GD/PNG" EXTENSION "png" IMAGEMODE "PC256" TRANSPARENT TRUE END SYMBOL NAME "circle" TYPE ELLIPSE FILLED TRUE POINTS 1 1 END END SYMBOL NAME ">" TYPE TRUETYPE ANTIALIAS TRUE CHARACTER ">" GAP -20 FONT "arial" POSITION CC END PROJECTION "proj=merc" "a=6378137" "b=6378137" "lat_ts=0.0" "lon_0=0.0" "x_0=0.0" "y_0=0" "units=m" "k=1.0" "nadgrids=@null" END LEGEND IMAGECOLOR 255 255 255 KEYSIZE 20 10 KEYSPACING 5 5 LABEL SIZE MEDIUM TYPE BITMAP BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE END POSITION LL STATUS OFF END QUERYMAP COLOR 255 255 0 SIZE -1 -1 STATUS ON STYLE HILITE END SCALEBAR ALIGN CENTER COLOR 0 0 0 IMAGECOLOR 255 255 255 INTERVALS 4 LABEL SIZE MEDIUM TYPE BITMAP BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE END POSITION LL SIZE 200 3 STATUS OFF STYLE 0 UNITS MILES END WEB IMAGEPATH "" IMAGEURL "" QUERYFORMAT text/html LEGENDFORMAT text/html BROWSEFORMAT text/html END LAYER NAME "Troncons" PROJECTION "proj=longlat" "ellps=WGS84" "datum=WGS84" END STATUS DEFAULT TEMPLATE "nofile.html" TOLERANCE 100 TOLERANCEUNITS METERS TYPE LINE UNITS METERS CLASS NAME "Troncons" STYLE ANGLE 360 COLOR 0 0 255 SIZE 5 SYMBOL "circle" WIDTH 5 END STYLE ANGLE 360 COLOR 0 0 0 SIZE 12 SYMBOL ">" WIDTH 1 END END FEATURE POINTS 5.91828 45.63552 5.91876 45.63611 5.91898 45.6364 5.91936 45.63701 5.91952 45.63731 5.91968 45.63762 5.91993 45.63825 5.92003 45.63856 5.92018 45.63919 5.92028 45.63983 5.92031 45.64014 5.92033 45.64046 5.92034 45.64077 5.92034 45.64108 5.92034 45.64171 5.92035 45.64234 5.92035 45.6428 5.92037 45.6433 5.9204 45.64394 5.92046 45.64458 5.92056 45.64522 5.92062 45.64554 5.92069 45.64586 5.92077 45.64617 5.92097 45.64679 5.92122 45.64739 5.92136 45.64769 5.92169 45.64828 5.92207 45.64886 5.92228 45.64914 5.92272 45.64969 5.92321 45.65023 5.92346 45.65051 END END END END I try to queryByPoint to retreive the index of the shape clciked near. In the code below I made a specific test function with fixed point instead of points passed by parameter so I am sure the point I use is actually part of a feature. In my case I use the first point of the only feature contained in mapfile. public string GetTronconId() { //_map is my dynamically created mapObj if (_map != null) for (int i = 0; i < _map.numlayers; i++) { layerObj layer = _map.getLayer(i); // Code never pass this point if (layer.queryByPoint(_map, new pointObj(5.91898, 45.6364, 0, 0), (int) MS_QUERY_MODE.MS_QUERY_MULTIPLE, 100) == (int) MS_RETURN_VALUE.MS_SUCCESS) { int numresults = layer.getNumResults(); if (numresults != 0) { layer.open(); for (int j = 0; j < numresults; j++) { resultCacheMemberObj resultat = layer.getResult(j); shapeObj shape = null; if (layer.getShape(shape, resultat.tileindex, resultat.shapeindex) == (int) MS_RETURN_VALUE.MS_SUCCESS) return shape.getValue(0); } } } } return null; } I have a dummy TEMPLATE set, I do not eveen have to use the tolerance since the point is derectly in a shape, but the queryByPoint keep returning me MS_FAILURE. From my searches on the web everything seem to be OK. Any idea?

    Read the article

  • Google maps spatial reference system

    - by JavaRocky
    What is Google map's spatial reference system using when you enter a lat, long into the maps search bar? I've found hints that it might be WGS84 but after converting to that coordinate system, nothing shows up when i paste the coordinates into the google maps search box. I am converting from GDA MGA 56. Sample: Input MGA56 coords: 336301, 6253363 Expected WGS86 coords: -33.8473340793201, 151.230631835944 I get: 16834916.928327594 -4008321.1020318186 Spatial coord systems: EPSG:28356 for MGA56 EPSG:900913 for WGS86 (google maps) I am using geotools to do the transform: CoordinateReferenceSystem crsMga56 = CRS.parseWKT(mga56); CoordinateReferenceSystem crsGmaps = CRS.parseWKT(gmaps); Coordinate coordinate = new Coordinate(336301, 6253363); Point point = new GeometryFactory().createPoint(coordinate); MathTransform transform = CRS.findMathTransform(crsMga56, crsGmaps); Geometry geometry = JTS.transform(point, transform); I know the transform is not correct, as when i use an online tool it gives me the correct coords. http://www.environment.gov.au/cgi-bin/transform/mga2geo%5Fgda.pl?east=336301&north=6253363&zone=56

    Read the article

  • What ellipsoid or geoid for GPX file elevations-and how do you know?

    - by Dan Menes
    I have been poking around and have been unable to find a standard for what ellipsoid or geoid corresponds to "0" elevation in GPX files. Is there a standard? Do I just assume the WGS84 ellipsoid? Or if different standards are used, is there a way of figuring out from the file which one was used? Or making an educated guess? And what is the source for your answer? I would love to have an authoritative reference.

    Read the article

  • Custom Tile Layer Problem

    - by Myra
    Hi,I'm currently implementing logic on custom tile layers via OpenLayers function getTiles() { var res = this.map.getResolution(); var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w)); var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h)); var z = this.map.getZoom(); return ......; } What I need to is to carry this code in Google API v3. As I searched documentation I found this code to work with: var customtile = new google.maps.ImageMapType({ getTileUrl: function (coord, zoom) { .... .... } Unfortonately,I cannot convert logic in OpenLayers code to Google. As I know resolution is 180 * tileSize.w / Math.pow(2, zoom) //where tileSize is 256x256 Since Google projection is same with my tiles WGS84 boundary should be -180,-90,90,180 I need to calculate to extent coordinates,but in function getTileUrl,there are two arguments.One of which is zoom,but the other coord is some x,y pair which I dont understand what that is.What is that exactly ? How can I generalize formula for calculating tile numbers in Google Maps? Thank you Myra

    Read the article

  • Recommendations for a free GIS library supporting raster images

    - by gspr
    Hi. I'm quite new to the whole field of GIS, and I'm about to make a small program that essentially overlays GPS tracks on a map together with some other annotations. I primarily need to allow scanned (thus raster) maps (although it would be nice to support proper map formats and something like OpenStreetmap in the long run). My first exploratory program uses Qt's graphics view framework and overlays the GPS points by simply projecting them onto the tangent plane to the WGS84 ellipsoid at a calibration point. This gives half-decent accuracy, and actually looks good. But then I started wondering. To get the accuracy I need (i.e. remove the "half" in "half-decent"), I have to correct for the map projection. While the math is not a problem in itself, supporting many map projection feels like needless work. Even though a few projections would probably be enough, I started thinking about just using something like the PROJ.4 library to do my projections. But then, why not take it all the way? Perhaps I might aswell use a full-blown map library such as Mapnik (edit: Quantum GIS also looks very nice), which will probably pay off when I start to want even more fancy annotations or some other symptom of featuritis. So, finally, to the question: What would you do? Would you use a full-blown map library? If so, which one? Again, it's important that it supports using (and zooming in and out with) raster maps and has pretty overlay features. Or would you just keep it simple, and go with Qt's own graphics view framework together with something like PROJ.4 to handle the map projections? I appreciate any feedback! Some technicalities: I'm writing in C++ with a Qt-based GUI, so I'd prefer something that plays relatively nicely with those. Also, the library must be free software (as in FOSS), and at least decently cross-platform (GNU/Linux, Windows and Mac, at least). Edit: OK, it seems I didn't do quite enough research before asking this question. Both Quantum GIS and Mapnik seem very well suited for my purpose. The former especially so since it's based on Qt.

    Read the article

1