Showing posts with label AutoCAD MAP. Show all posts
Showing posts with label AutoCAD MAP. Show all posts

19 August 2011

Coordinate Systems in AutoCAD MAP 2012

AutoCAD MAP 2012 sees a major change from previous versions in the way Coordinate Systems are defined. In terms of AutoChart, these changes have no effect in working with pre-existing definitions, you still choose the Projection CS and the Geographic CS in the same way as always, however, if you need to define a new coordinate system in MAP, the process can now seem quite unfamiliar.

In this Blog post, I hope to give a brief overview of what’s involved in working with the new Coordinate Systems dialogs to create a UTM Zone 47N Projection based on the ‘Batavia’ datum.
Spheroid Bessel 1841
Datum Batavia
Semi-major axis (a) 6 377 397.155 m
Semi-minor axis (b) 6 356 078.963 m
Inverse flattening (1/f) 299.1528128
Projection Parameters
Projection Universal Transverse Mercator (UTM)
Zone 47 North
Latitude of Origin 00° 00’ 00” N (Equator)
Central Meridian 99° 00’ 00” E
Scale Factor at Origin 0.9996
False Easting at Origin 500 000m
False Northing at Origin 0 m
Unit of Measurement International Metres
Datum Transformation From WGS84 to Local Datum
DX plus (+) 377.00 m
DY minus (-) 681.00m
DZ plus (+) 50.00m
Example Transformation
WGS-84 Batavia
Lat : 5° 17’ 58.94133” N Lat : 5° 18’ 02.34112” N
Long : 97° 19’ 46.85008” E Long : 97° 19’ 37.52676” E
Easting : 314 898.576 m Easting : 314 633.300 m
Northing : 586 042.752 m Northing : 586 091.720 m

When faced with working with an unfamiliar coordinate system, we have to start by confirming whether the coordinate system already exists within the AutoCAD MAP definitions.

The easiest way to do this is to start the command called Library (MapCSLibrary)



Now type in the name of the Datum in the search (e.g. “Batavia”) and see which Projections are available which use this datum name:



For a start we see there is no UTM 47N available but there is a datum (Batavia_1) and a datum transformation (Autodesk now calls these "geodetic transformations") (Batavia_1_to_WGS84) that may be useful. If we click on these and select view we can check the values of the datum and the transformation.
Datum:



Transformation (Analytical Formula Transformation Page)



This shows us that the Ellipsoid used within the Datum definition is correct and the transformation parameters match the requirements.

Now we have to make a coordinate system using this Datum. You can leave this command and start the Create Coordinate system command but actually it is probably easier to choose one of the existing UTM coordinate systems and use Duplicate.

Once the new coordinate system has now been created we must change the values, so use the Edit button in the form and change the Code, Description and values on each page to the correct values.







Once all of the various parameters have been set up, choose Save.

Now you just need to check the definition woks correctly by using the AutoChart commands.

Start the point command – type in the Batavia E/N. Change the point type and zoom extents.
Start the AutoChart|Inquiry|Point Id|Single command



Snap to the node of the point and the LL84 Lat/Longs will be displayed and can be checked against the supplied values.

If a suitable Datum definition doesn't already exist, a new Datum can be created in a similar way to creating a Projection. Once the Datum has been defined, a Geodetic Transformation can then be created to specify the Datum Shift parameters to or from WGS84.

19 January 2011

Importing contours from a SHP File

I've previously covered using the MAP Query command to transform a drawing between coordinate systems however the same Query command can also be used to set the elevation properties of a set of contours that have been imported from a SHP file.
The process involves importing the SHP file data with the contour elevations being saved to MAP Object data and then running a MAP Query to Alter Properties in order to set the polyline elevations to the appropriate value stored in the object data field.
The complete process is shown in the video below:
For a full description of the steps, please read on...

7 June 2010

Listing the coordinates of Polygons/Closed polylines in AutoCAD MAP

In my last post, I discussed the process involved in exporting a listing of polygon positions through ArcGIS. So how could you export the same information using AutoCAD MAP?

Again, it's a fairly simple operation, the main trick being how to easily get the centre points of the polygons or closed polyline entities and this involves using the AutoCAD MAP Create Centroids command.

So, the first step is obviously to have your source data that you want to export the positions from. This could be an existing set of entities (with or without object data) or you can use the MAP->Import command to bring in a shp file of polygon objects and their associated object data. When you import the data in this way, you can also choose to convert all of the polygon entities to closed polylines.

Once the data is in AutoCAD, you can then use the Create Centroids command on either selected entities or on all closed objects within the drawing. This will create a point entity at the centre of each polygon that also contains the associated object data. Once the centroids have been created, save and close the drawing and start up a new drawing in which to run a Report Query in order to output the point data coordinates to a text file.

Select the MAP->Define query command and use the Drawings button to attach the drawing created above. Under the Query type, click the Location button and set the Boundary Type to All. Then click the Property button, select the Object Type radio button, make sure the Operator is set as '=' and click the Values button to choose the POINT object type. This will ensure that only the point objects representing the centres of the polygons will be included in the output.

Back in the Define Query dialog, set the Query Mode to Report and click the Options button to access the Report Options dialog. Click the Expression button, expand the Object Data folder to select the required Object Data field and click OK to return to the Report Options Dialog and click the Add button to add the expression to the Report Template list. Repeat the above steps for any other object data fields you want included in the listing. To include the Eastings and Northings in the Listing, again use the Expression button, but this time expand the 'Properties' folder and select X1. Press OK and then use the Add button to include it in the template. This gives the Eastings of the point objects so repeat the operation to select Y1 to add the Northings to the Listing.

Once the Report Template is set up as required, use the Browse button to define the output name and location for the listing and press OK to return to the main Define Query Dialog.
Finally, click the Execute Query button to generate the report. The data will be output as a comma delimited file that can be opened in Excel.

The entire process is illustrated in the video below:

22 January 2010

Transforming a drawing between Coordinate Systems

Following on from last month’s post about defining a Coordinate System, this time I’m going to explain how to make use of AutoCAD MAP’s geodetic functionality to transform a drawing between coordinate systems using the AutoCAD MAP Query command.

The first step is to assign the coordinate system to the source drawing using Map->Tools->Assign Global Coordinate System, save and close the drawing. Then open a new drawing and assign the destination datum to this using the same command.

With the required coordinate system set in the new drawing, set up the transformation operation using the Map->Query->Define Query menu. Under Query Type, Click the Location button and set the option to ALL and click OK. Under Query Mode set the option to DRAW. Under Options, click the Drawings button and in the next Dialog click Attach. Browse to your source drawing and add it to the selected drawings list. Click OK till you get back to the Define Query Dialog and then click Execute Query. When you then zoom extents you then should see your data in the new coordinate system.



While the source drawing is attached in the query definition you cannot open both drawings at the same time. To stop this happening,  use Map->Drawings->Define/Modify Drawing Set and Detach the Source drawing.

22 December 2009

Defining a Coordinate System in AutoCAD MAP

As you may know, AutoChart uses the geodetic functionality of AutoCAD MAP/Civil 3D to perform any geodetic calculation (such as drawing Grids and Graticules, calculation Geodetic distances and Kps or for coordinate transformations). AutoCAD has a multitude of pre-defined coordinate systems but sometimes (particularly with some obscure offshore areas) the correct definition will have to be made by the user to suit the project geodetic parameters.

Setting up a Coordinate System is a relatively easy exercise once you understand how AutoCAD defines them, although at first impression the process can appear a little daunting. We are always happy to set up a coordinate system definition for our customers given the appropriate geodetic information and a trial point. It is however a good idea to try and familiarise yourself with the process, even if it is just to check the pre-defined coordinate systems to find the one with the correct parameters.

To Define or Check an AutoCAD MAP Co-ordinate System, use
MAP->Tools->Define Global Coordinate System.