Professional Documents
Culture Documents
KML2SHP V2 3 Instructions
KML2SHP V2 3 Instructions
1. Download and unzip file named AS14988.zip; 2. Copy file named kml2shpv2_2.avx to ArcView 3.x extensions
folder, normally C:\ESRI\AV_GIS30\ARCVIEW\EXT32; 3. Open a new ArcView 3.x project (or any existing *.apr ArcView 3.x project); 4. Open Extensions window by clicking menu FILE ->
6. Open a view DOC GUI (e.g.: View1); 7. Note that a new button was added to button bar, with a K icon; 8. Click this button to open a new window named Choose KML file to convert to Shape File 9. Note that folder C:\ is ordered in a peculiar way, normally showing the contents of folder C:\ESRI\
10. To reorder the contents of folder C:\, YOU MUST DOUBLE-CLICK on the folder C:\ icon, as shown below:
Double-click here
11. After double-clicking over the folder C:\ icon, folders will be reordered, as shown in this window:
12. Roll down the folder list until you find the folder where your KML file is:
(You are encouraged to create a folder under C:\ to keep your KML files, like C:\KML Files)
13. Now double-click over the folder C:\KML Files to open this folder:
Double-click here
14. When you double-click over C:\ KML Files, you will get this, supposing that you created a KML file on Google Earth, named cam5.kml:
16. Now you are asked to give a name to the shapefile that will result from the KML file conversion (or you can accept the proposed name):
17. When you click OK, the KML file will be converted to a 3D shapefile, named 3D_shp12.shp (or any other name you have chosen), and, next, you will be asked if you want to open this shapefile on the current View of the ArcView 3.x project:
18. Next again, the extension asks the user for a shapefile conversion from 3D to 2D the reason for this will be explained on the last page of this manual.
19. If you press YES, a conversion from a 3D Shapefile to a 2D Shapefile will take place, and steps 16. and 17. will be repeated, but now for the 2D Shapefile.
20. Please note that a new View, named Geographic coordinate View, was created automatically, to store the converted KML files, which are shapefiles in the WGS84 Geographic Coordinate System Latitude/Longitude, Decimal Degrees.
Please remember: on ArcView 3.x, do not open, on the same View, shapefiles in Lat/Long coordinates (decimal degrees), along with projected ones (X/Y, meters, feet, etc).
If you save Plant1.kml you will obtain a mixed-feature KML file, containing, in the same KML file, the 3 types of features: points, polylines (or lines) and polygons, altogether. This ArcView extension cannot manage such a multi-feature KML file. To avoid this, you must save each feature-type KML file at a time, and will obtain the following 8 KML files:
Water1.kml Water2.kml Fences.kml Build1.kml Build2.kml Store1.kml Store2.kml Workers.kml
Of course that this is for explanation purposes, and you could have arranged the KML files another way, creating a sub-folder for each feature type, like this: Plant1 WaterPoints
Water1 Water2
(containing both feature points)
Buildings (containing all polygon features on the same folder) Build1 Build2 Store1 Store2 Workers Fences (containing the only existing polyline feature)
This Google Earth sketch looks like next picture, and, in this case, you only need to convert 3 KML files (instead of 8 KML files as above)1:
Waterpoints.kml which you may convert to Waterpoints.shp Fences.kml which you may convert to Fences.shp Buildings.kml which you may convert to Buildings.shp
To save any folder or sub-folder on Google Earth, simply select that folder and right-click the mouse, choosing Save As...
If you take a closer look to these attribute tables (see next picture), you will find that the name you have entered on the Google Earth New window, now appears on the column Name of the attribute tables, as shown:
On the left side the user can find a list of Geographic Coordinate Transformations. Each record is a combination of a Datum name and its transformation variant, according the EPSG Geodetic Parameter Data Set, Version 6.18, released 12/Nov/2008 2 : European Datum 1950
Datum name
(1)
Transformation variant
This list box shows only those DATUM/Transformation variants that have an area of use compatible with the active theme geographic extension, according the Are of Use form of the EPSG dataset. On the right side you get the Area of Use for the selected Datum Name/Transformation variant combination, and the Ellipsoid name used in conjunction with the selected Datum; on the lower side you get the transformation parameters for the selected transformation variant, in meters. All codes are according to EPSG. Lets remind that this extension only use the Geocentric Translations transformation method, and the formula used to achieve this transformation is Standard Molodensky.
Tip: to select a Datum name, just click any name on the list, and then key in the first letter of the datum name you are looking for.
REMEMBER: this tool transforms only in one direction from WGS84 Datum to a local Datum 3. Let us remind again that KML files are always in WGS84 Datum, geographic coordinates (Latitude/Longitude, degrees). When the user clicks OK, a new dialog box appears:
On the dialog box title you can see that the tool is transforming a shapefile named 2d_shp22.shp from WGS84 Datum to European Datum (1) local Datum (using transformation variant number 1), and is proposing, for the new transformed shapefile, the name 2d_shp22_trf.shp. It will be very useful to use this dialog box to make a small change in the transformed shapefile: in place of _trf you can write _Eur_Dt_1 and therefore always remember the Datum of the new shapefile (2d_shp22_Eur_Dt_1.shp).
The Log dialog box Note that between the OK and the Exit buttons there is a Log button, which opens the following dialog box:
For bi-direction transformations download extension datum_transform_v10.avx at: http://arcscripts.esri.com/details.asp?dbid=15967; if you need to unproject a projected theme, download Projector_EPSG extension at: http://arcscripts.esri.com/details.asp?dbid=16218
This dialog box contains all the information for the selected Datum/Transformation variant combination, and the Copy & Close button allow you to copy this information to the clipboard, so that it can be pasted onto any text processor (Notepad, Wordpad, WORD, etc.).
From Version 2.1 on, the extension writes a projection file for the 3D and 2D shapefiles directly converted from KML files, of the type [name of shapefile].prj with the following parameters4:
GEOGCS["GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["WGS_1984",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295]]
This projection file will permit the new 8.x/9.x ESRI family georeference a converted shapefile easier.
For now, the projection file is only for the WGS84 shapefiles; maybe, at a later time, the extension will be able to write the projections files for the transformed shapes, also.
Clicking Yes on this message box, the following window will show up:
Now the user may select the most appropriate5 Coordinate Reference System for the map projection; in this example there is only one choice, but on other cases there may be several different map projections for the same geographic coordinate shapefile. Note that, in some cases, there are no available Map Projections for a specific Datum AND a specific location; if this happens, try to use another destination Datum for the Datum transformation. Clicking OK on the above window, will start the projection of the transformed geographic shapefile, attaching the suffix _prj to the geographic shapefile name, as in the following example:
Geographic coordinate shapefile: 2d_shp22_trf.shp Projected shapefile: 2d_shp22_trf_prj.shp
The extension opens a new View for each Coordinate Reference System (CRS), identified as follows:
CRS Datum
Map Projection
Ellipsoid name
Prime Meridian
If the user performs several map projections for the same CRS, the resulting shapes will be shown at the same Projected View.