Tag Info

7

There is a JavaScript from Convert between Latitude/Longitude & OS National Grid References which converts between easting/northings to lon/lat, which could be helpful. It is also available in GitHub

5

To get the coordinates of the points you can use these equations: Delta Y = Distance * Cos (Azimuth) Delta X = Distance * Sin (Azimuth) New Y = Y + Delta Y New X = X + Delta X First you'll have to get the coordinates of B using these equations then go from there to C.

5

I'd recommend using something like the proj4 library, which has wrappers in several languages, including JavaScript - Proj4JS. For C#, there's proj4net It has the advantage you can translate between all sorts of projections, not just OSGB. I'm not a great JS developer, but something like this should do the trick to convert OSGB back to WGS84 EDIT oops.. ...

4

Looks like you're trying to add data to the insert cursor one column at a time. Cursors think about the world one row at time. I recommend the following code. A few other notes... Python code runs in order, so make sure you declare your outpath variable before you set your env.workspace to outpath. Also, this code is going to create a shapefile with the ...

3

Original layout: Script: import arcpy, os, traceback, sys,time import numpy as np from math import radians,sin,cos try: def showPyMessage(): arcpy.AddMessage(str(time.ctime()) + " - " + message) def Rotate(xM,yM,angle,xc,yc): x=xM-xc;y=yM-yc a=radians(angle) xN=cos(a)*x+sin(a)*y yN=-sin(a)*x+cos(a)*y ...

3

Here is a tested solution: Install comtypes and snippet102 (How do I access ArcObjects from Python?) with your python installation use the following python function (based on comtypes). Make sure ArcMap is open. It is tested with rotated dataframes. Python code: def MapCoord_2_PageCoord(mapX,mapY): from snippets102 import GetLibPath, InitStandalone, ...

3

I think the first thing I would do is trace the original source of the data and ask for the original CAD data used to create the drawings. If it was done by a third-party under contract to your organisation, then they may have an obligation to supply the data. Even if it was done by a third-party, a polite phone call often works wonders. Even if all they ...

3

Select ST_Transform(geom, 27700) AS newGEOM FROM TABLENAME Will get you the transformed geometry called "newGEOM". Using this, you could add other commands such as ST_X() for getting the X-Coordinate: Select ST_X(ST_Transform(geom, 27700)) AS XCoordinate FROM TABLENAME

3

The EPSG: 3857, WGS 84 / Pseudo Mercator in QGIS is called WGS84 Web Mercator (Auxiliary Sphere) in ArcGIS. You are simply not using the right projection.

3

Your assumption of linear conversion is wrong. In Transverse Mercator, only the central meridian is straight northward, all others are bended. So 11.5 vs 12 degrees makes a difference. Besides Gabon 2010, there is a Gabon 2011 coordinate system, with this proj.4 parameter string: +proj=tmerc +lat_0=0 +lon_0=11.5 +k=0.9996 +x_0=1500000 +y_0=5500000 +datum=...

3

Here is an example for fortran: Variables in explanation: long1 is the longitude varying from -180 to 180 or 180W-180E long3 is the longitude variable from 0 to 360 (all positive) To convert longitude from (0-360) to (-180 to 180) Matlab and fortran long1=mod((long3+180),360)-180 Matlab long1=rem((long3+180),360)-180 Fortran long1=modulo((...

3

If you know for certain that your input longitudes range between 0 and 360, then yes: just subtract 360 from values that are greater than (or equal to) 180. If there is any possibility of "crazy" values (less than -180 or greater than 540) you might consider using the IEEE_REM function: fixed_longitude = IEEE_REM(longitude, 360.0) This will gracefully ...

2

Yes you can get them to work together. Below is a sample of code from a php page I coded that uses proj4js, mine is slightly different going from a state plane into wgs84 but the concept is the same. (The syntax is a little off as I had problems pasting it into a code block and my code is sort of spread all over the place in a couple php files but I think ...

2

NSRS 2007 and CORS 96 are functionally equivalent. The NAD(CORS96) realization only includes the CORS stations. The passive marks were subsequently re-adjusted based on GPS observations from the CORS using CORS96 positions. This re-adjustment of the passive marks is referred to as NSRS2007. The current realization is NAD(2011). In many places the ...

2

self.coordTransform = self.coordinateTransformation(4326,3309) It looks like you have your source and destination coordinate systems mixed up.

2

Oh Canada! Your strange and awkward projections! It looks like your data is actually in MTM (Modified Transverse Mercator) projection. Not since Gauss-Kruger has a Transverse Mercator projection caused so much confusion with UTM. You probably reprojected the data, because those XY coordinates in your attributes with the UTM 8 projection would put your ...

2

ArcMap has this wonderful feature called on-the-fly transformation. Once your first layer is added to a blank fresh map (e.g. a new MXD), the map takes the layer coordinate system (more precisely spatial reference). Any layer added after the first layer, will be automatically transformed to the map spatial reference, in order to overlay with the first layer. ...

2

use QgsGeometry.transform( QgsCoordinateTransform tr ). for example after created your instance of QgsCoordinateTransform with source and dest crs, for each geometry instance do: tr = QgsCoordinateTransform(sourceCrs, destCrs) myGeometryInstance.transform(tr) http://qgis.org/api/classQgsGeometry.html#a46fd84e518cae4368aadeeac89574dfa beware that the ...

2

What you need is affine transformation and it should be easy to do with Python: You'll need GDAL GeoTransform (and it seems like you have all you need for it): gt[0] /* top left x */ gt[1] /* w-e pixel resolution */ gt[2] /* 0 */ gt[3] /* top left y */ gt[4] /* 0 */ gt[5] /* n-s pixel resolution (negative value) */ And then having your x,y: geo_x = gt[...

2

If you don't know the datum or coordinate system for a pair of latitude/longitude coordinates, then the coordinates are ambiguous. Ambiguous coordinates means any transform or comparison between them will most likely have incorrect results.

2

First you need to drop the srid constraint you have on your table. Even with an unconstrained geometry type, you can have the srid check in the typmod column definition so no need to resort to constraint ALTER TABLE jake DROP CONSTRAINT enforce_srid_geom; ALTER TABLE jake ALTER COLUMN jake_geom geometry(Geometry, 2163) USING ST_Transform(...

2

As @mkennedy says the LayerFile is a "pointer" to the actual data but it can hold stuff like symbology, definition queries and basic metadata. You can set up the IMapGeographicTransformations or how about doing away with the whole problem by projecting your data into OSGB, create a LayerFile for your data (now in OSGB) and load that? I suggest this ...

2

I set the data frame projection to WGS84 Web Mercator (Auxiliary Sphere) as suggested by Nahas and this didn't change the end result. However looking at the previous thread supplied by Vince (QPJ files on ESRI software) the answer at the bottom suggested deleting the prj. and .qpjs files then bringing the data in. I did this, assigned projection to WGS84 ...

2

To align your geometries I would investigate Spatial Adjustment (rubbersheeting): Within the editing environment, the spatial adjustment tools provide interactive methods to align and integrate your data. Spatial adjustment supports a variety of adjustment methods and will adjust all editable data sources. It's often used when you've imported data ...

2

I can't help with C# but I must warn you: what you believe to work correctly from the command line does not because you have comma as decimal separator. See the following examples: gdaltransform -s_srs epsg:4326 -t_srs epsg:3857 11,4110511566842 -16,3912563064512 1224514.39872601 -1804722.76625729 0 11.4110511566842 -16.3912563064512 1270272.40417808 -...

2

The EPSG Geodetic Parameter Registry has two coordinate reference systems that match that well-known text. The first that I looked at was MGI 1901 / Balkans 7, EPSG:3909. The other one was Macedonia State Coordinate System Zone 7, EPSG:6316, which has the same definition. Using that information, I was able to find that the data is in Skopje, Macedonia. ...

2

The transverse Mercator Projection is conformal and preserves angles. So the square should still be a square. Area will change though.

2

There are no default transformations in the EPSG Geodetic Parameter Registry. Sometimes you can use the remarks and or the accuracy value to determine which is the currently accepted transformation as defined by the government or the most accurate transformation. For instance, in Belgium, there are two transformations between BD72 and ETRS89: 1652 and ...

2

Try with other zone it has no problem, I guess GDAL cannot wrap it outside. gdalwarp -t_srs '+proj=utm +zone=12 +datum=WGS84 +units=m +no_defs' test.tif test_utm1.tif

2

In ArcGIS you should load the CAD data first and use the Georeferencing toolbar to establish world file coordinates before converting to a shapefile as explained in the Georeferencing CAD datasets help. There are several related help links in this section that explain how you can apply a transformation, but that generally means that the local coordinates ...

Only top voted, non community-wiki answers of a minimum length are eligible