Convert KMZ to GPX

GPX is a common GPS data format for software applications supported by major GPS devices and KMZ is a file format used to display geographic data in Google Earth and Google Maps.

Converting GIS data file from KMZ to GPX format  is just  a few click process with MapOG KMZ To GPX Converter Online.

IGIS Map Converter

IGIS Map converter is an amazing tool for data conversion. With just one click, it can translate KML data, commonly used in software like Google Earth, Fusion Tables, Maps, and GPS devices, into GeoJSON (JSON) format. GeoJSON is widely utilized in software such as MongoDB, Geoserver, CartoWeb, and Feature Server.

It converts GIS/CAD files online without the need for complex and enterprise software such as ArcGIS, QGIS, or AutoCAD. IGIS Map Converter is more user-friendly compared to other conversion software or tools.

IGISMAP to Convert KMZ to GPX

For KMZ to GPX conversion, go to MapOG Converter Tool, after logging in with your registered email and password. If you are a new user, click the Sign Up button in the Login popup and register to IGISMAP by filling the details.

IGISMAP
IGISMAP

There are four main steps for using GIS Converter:

  • Click on Tool Converter
  • Upload the data
  • Choose the format to which it should be converted
  • Download the converted file

Step one is to upload your KMZ file which you want to convert. You can upload your file from system or select from the Recent Files.

Upload KMZ
Upload KMZ

Here we using the KMZ file of Norway Airport Points.

Step two is to select the output format from the dropdown for the converted file, in this case its GPX. You can also set the Coordinate Reference System of your preference. As a default CRS will set to WGS 84 (World) [EPSG:4326]. Click on the Convert File.

Select GPX as an Output Format
Select GPX as an Output Format

Your KMZ file will then gets converted to GPX file after a few seconds and will be available for downloading.

Download GPX File
Download GPX File

You can also choose to style the layer or continue with further conversion process by clicking the Convert Another File button.

Converted Files section from the dashboard contains the list of the details of all the conversion done in your account, providing both input and output data available for download their corresponding formats.

Download free shapefile of various countries.

Create your own shapefile and share with your clients or embed on your website. 

More on Conversion:

Convert KML to Shapefile

In this post we are going to discuss the procedures for KML to Shapefile conversion. KML is the file extensions used in Google applications, specifically Google Earth and Google Maps. Shapefile is a geospatial vector data format for geographic information system (GIS) software. It is developed and regulated by ESRI as a mostly open specification for data interoperability among ESRI and other GIS software products.

Conversion of GIS data like KML to Shapefile can be done easily using

MAPOG Online KML To Shapefile Converter tool.

IGISMAP to Convert KML to Shapefile

For KML to Shapefile conversion go to MapOG Converter Tool, after logging in with your registered email and password. If you are a new user, click the Sign Up button in the Login popup and register to IGISMAP by filling the details.

There are three main steps for using GIS Converter:

  • Upload the data
  • Choose the format to which it should be converted
  • Download the converted file.

Step one is to upload your KML file which you want to convert. You can upload your file from system or select from the Recent Files.

Converter Tool - Upload KML
Upload KML

Here we have uploaded the KML file of New York state in USA.

Step two is to select choose the output format of the converted file, in this case its Shapefile. You can also set the Coordinate Reference System of your preference. As a default CRS will set to WGS 84 (World) [EPSG:4326]. Click on the Convert File.

Converter Tool - Shapefile as Output Format
Select Shapefile as Output Format

Your KML file will then get converted to Shapefile file after a few seconds and will be available for downloading.

Download and Publish Shapefile File
Download and Publish Shapefile File

You can also choose to style the layer or continue with further conversion process by clicking the Convert Another File button.

The Converted File can also be downloaded from the Converted Files section of the dashboard.

Converted Files section from the dashboard contains the list of the details of all the conversion done in your account, providing both input and output data available for download their corresponding formats.

Furthermore:

If you face any problem during implementing this tutorial, please let us know by dropping a mail at support@igismap.com. Feel free to comment in the below comment box.

Convert KMZ to CSV

Do you want to read and write your GIS data easily in excel sheets? Have you extracted and downloaded kml file from Google Earth or Google map and want to Edit or read your data normally in CSV format?. So today  we are discussing on how to convert KMZ to CSV.

KMZ is a zipped file containing one or compressed KML files. It is a file format used to display geographic data in Google Earth and Google Maps and CSV is a simple file format used to store tabular data, such as a spreadsheet or database. Files in the CSV format can be imported to and exported from programs that store data in tables, such as Microsoft Excel or OpenOffice Calc.  Converting GIS data file from KMZ to CSV format  is just  a few click process with GIS MapOG Converter Online.

KMZ TO CSV

IGISMAP to Convert KMZ to CSV

For KMZ to CSV conversion go to MapOG Converter Tool, after logging in with your registered email and password. If you are a new user, click the Sign Up button in the Login popup and register to IGISMAP by filling the details.

There are three main steps for using GIS Converter:

  • Upload the data
  • Choose the format to which it should be converted
  • Download the converted file.

Step one is to upload your KMZ file which you want to convert. You can upload the file from your system or select from the Recent Files.

Upload KMZ

Here we are uploading the KMZ file of the Washington counties

Step two is to select choose the output format of the converted file, in this case its CSV. You can also set the Coordinate Reference System of your preference. As a default CRS will set to WGS 84 (World) [EPSG:4326]. Click on the Convert File.

Select CSV as Output Format

Your KMZ file will then get converted to CSV file after a few seconds and will be published in the map canvas. You can download the CSV file of Washington state boundary by clicking the Download Converted File button.

Download and Publish CSV File
Download and Publish CSV File

The output CSV file is generated with location information represented in WKT format under the field ‘WKT’ as shown in the following image.

Output CSV File
Output CSV File

You can also choose to style the layer or continue with further conversion process by clicking the Convert Another File button.

Converted Files section from the dashboard contains the list of the details of all the conversion done in your account, providing both input and output data available for download their corresponding formats.

You can also search locations, add new datasets, edit layers and style the map according to your choice and requirements. As IGIS Map Converter Tool provides many benefits other then just conversion of data. This tool provides us to generate this published map in PDF or as image format. You can also share the map on social media and you are able to embed on your website very easily.

Other GIS data Conversions

If you are facing any problem in conversion or login then please let us know by mailing at support@igismap.com or drop comment.

Convert KML to GeoJSON

Have you extracted and downloaded KML file from Google Earth or Google map and want to render it with libraries supporting GeoJSON file format? Are you tired of downloading the same data in different formats? Using Map Tool you can easily convert – KML to GeoJSON. You can also do other GIS Data Conversion using this tool.

KML is a file format used to display geographic data in an Earth browser such as Google Earth. You can create KML files to pinpoint locations, add image overlays, and expose rich data in new ways. KML is an international standard maintained by the Open Geospatial Consortium, Inc. (OGC).

GeoJSON is an open standard format designed for representing simple geographical features, along with their non-spatial attributes. It is based on the JSON format.

Online Converter Tool from KML To GeoJSON

MAPOG Converter Tool

MapOG converter is an incredible tool for conversion of data. It will translate KML data which is widely used in software like Google Earth, Fusion Tables, Maps and GPS devices and convert them by one click to GeoJSON (JSON) format which is widely used in software like MongoDB, Geoserver, CartoWeb and Feature Server. It Convert GIS / CAD files online without using complex and Enterprise Software like ArcGIS, QGIS, AutoCAD etc. IGIS Map converter is much easier to use than any other conversion software or tool. 

Along with conversion from KML to GeoJson, you can also check following conversions like KML to Shp, KML to KMZ, KMZ to KML, KML to DXF, KML to Topojson, KML to GML etc.

IGISMAP to Convert KML to GeoJSON

For KML to GeoJSON conversion, go to MapOG Converter Tool, after logging in with your registered email and password. If you are a new user, click the Sign Up button in the Login popup and register to IGISMAP by filling the details.

IGISMAP
IGISMAP

There are four main steps for using GIS Converter:

  • Click on Tool Converter
  • Upload the data
  • Choose the format to which it should be converted
  • Download the converted file

Step one is to upload your KML file which you want to convert. You can upload your file from system or select from the Recent Files.

Upload KML
Upload KML

Here we using the KML file of Turkey national boundary.

Step two is to select the output format from the dropdown for the converted file, in this case its GeoJSON. You can also set the Coordinate Reference System of your preference. As a default CRS will set to WGS 84 (World) [EPSG:4326]. Click on the Convert File.

Slect GeoJSON as output Format
Select GeoJSON as output Format

Your KML file will then gets converted to GeoJSON file after a few seconds and will be available for downloading.

Download GeoJSON file
Download GeoJSON file

You can also choose to style the layer or continue with further conversion process by clicking the Convert Another File button.

Converted Files section from the dashboard contains the list of the details of all the conversion done in your account, providing both input and output data available for download their corresponding formats.

Download free shapefile of various countries.

Create your own shapefile and share with your clients or embed on your website. 

Convert KMZ to KML

In this post we are going to discuss that how can we convert KMZ to KML data format. Both KML and KMZ are file extensions used in Google applications, specifically Google Earth and Google Maps. A person using these two Google applications can encounter a lot of file formats, including KML and KMZ.

A KML file is a text based file composed of Tags similar to .XML or .HTML. KML files can also be converted to a .KMZ file. KMZ is a zipped file containing one or compressed KML files. KMZ data which is used in software like Google Earth and GPS devices can be converted with one click to KML format used in software like Google Earth, Fusion Tables, Maps and GPS devices with the help of IGISMAP Converter.

Online Converter Tool To Convert KMZ to KML

Conversion of GIS data like KMZ to KML can be so easy with the help of online conversion IGIS Map tool. You can also check Convert KML to DXF. KML to KMZ, KML to SHP, KML to CSV, KML to GML, KML to GeoJSON, KML to TopoJSON etc.

IGISMAP to Convert KMZ to KML

IGIS Map Converter also supports more other vectors and raster GIS/CAD formats and more than 4000 coordinate reference systems. If the coordinate system of your input data is not present or not recognized correctly, it is possible to assign the correct one. IGIS Map Converter makes it possible to transform your data to any other coordinate reference system.

Here are some of the main process in converting KMZ to KML using IGIS Map Converter.

Go to MapOG Converter Tool, after logging in with your registered email and password. If you are a new user, click the Sign Up button in the Login popup and register to IGISMAP by filling the details.

There are three main steps for using GIS Converter:

  • Upload the data
  • Choose the format to which it should be converted
  • Download the converted file.

Step one is to upload your KMZ file which you want to convert. You can upload the file from your system or select from the Recent Files.

Upload KMZ
Upload KMZ

Here we are uploading the KMZ file of the Washington counties layer

Step two is to select choose the output format of the converted file, in this case its KML. You can also set the Coordinate Reference System of your preference. As a default CRS will set to WGS 84 (World) [EPSG:4326]. Click on the Convert File.

Select KML as Output Format

Your KMZ file will then get converted to KML file after a few seconds and will be available for downloading.

Download and Publish KML File
Download and Publish KML File

You can also choose to style the layer or continue with further conversion process by clicking the Convert Another File button.

Converted Files section from the dashboard contains the list of the details of all the conversion done in your account, providing both input and output data available for download their corresponding formats.

You can also search locations, add new datasets, edit layers and style the map according to your choice and requirements. As IGIS Map Converter Tool provides many benefits other then just conversion of data. This tool provides us to generate this published map in PDF or as image format.

Other GIS data Conversions

If you are facing any problem in conversion or login then please let us know by mailing at support@igismap.com or drop comment.

Convert KML to DXF

Are you looking for converting your KML data file into DXF format for your GIS project or uploading in the CAD system? Have you extracted and downloaded KML file from Google Earth or Google map and want to render it with your geo library which support DXF format? You can carry out this process using any GIS or Design specific desktop software. There are also a number of online tools to perform this conversion. but If you don’t want to spend so much time just on conversions and want an easy way for conversions. Here is an amazing tool for converting your data files within a minute, i.e. MapOG Converter.

MapOG Converter

IGIS Map converter is an incredible tool for data file conversions. It will translate an AutoCAD file (in DXF format) to a shapefile or KML format. It can also convert from KML format to shapefile, or KML to DXF, or Shapefile to DXF.  It Convert GIS / CAD files online without using complex and Enterprise Software like ArcGIS, QGIS, AutoCAD etc. IGIS Map converter is much easier to use then any other conversion software or tool.

MAPOG to Convert KML to DXF

Go to MapOG Converter Tool, after logging in with your registered email and password. If you are a new user, click the Sign Up button in the Login popup and register to IGISMAP by filling the details.

There are three main steps for using GIS Converter:

  • Upload the data
  • Choose the format to which it should be converted
  • Download the converted file.

Step one is to upload your KML file which you want to convert. You can upload the file from your system or select from the Recent Files.

Converter Tool - Upload KML
Upload KML

Here we using the KML file of New York state boundary.

Step two is to select choose the output format of the converted file, in this case its DXF. You can also set the Coordinate Reference System of your preference. As a default CRS will set to WGS 84 (World) [EPSG:4326]. Click on the Convert File button.

Converter Tool - DXF as Output Format
Select DXF as Output Format

Your KML file will then get converted to DXF file after a few seconds and will be published in the map canvas. You can download the DXF file of New York state boundary by clicking the Download Converted File button.

Download and Publish DXF File
Download and Publish DXF File

You can also choose to style the layer or continue with further conversion process by clicking the Convert Another File button.

Converted Files section from the dashboard contains the list of the details of all the conversion done in your account, providing both input and output data available for download their corresponding formats.

Conclusion

IGIS Map Converter Tool provides many benefits other then just conversion of data. This tool provides us to generate this published map in PDF or as image format.

InfoGISMapOG supports most of the commonly used GIS or AutoCAD files like Shapefile SHP, KML, KMZ, CSV, TopoJSON, GeoJSON, GML, DXF, GeoTIFF, NetCDF, GRIB, HDF5, OSM, PBF, and many more raster and vector files, along with that it support more than 4000 Coordinate Reference System.

IGIS Map Converter is a online tool for converting GIS data files from one format to another. which helps you in easy data conversion and beautiful and incredible map creation in no time. IGIS Map converter online tool is recommended for better and easy conversions.  If you want you can also use ogr2ogr offline conversion tool for convert KML to DXF format.

Need Sample data for research and study – Download Shapefile of Countries

If you face any problem during implementing this tutorial, drop a mail at support@igismap.com, also feel free to comment in given comment box.

KML to SHP Shapefile – Convert

Convert kml to shp shapefile. Have you extracted and downloaded kml file from Google Earth or Google map and want to render it with your geo library which support shapefile? Do you have KML data given from third party and want to give a proper representation of data over map by converting the same in shapefile? If so, here is an article to convert kml to shp using command line tool ogr2ogr or using php code. While if you use QGIS tool, you can look over kml to shp convert using QGIS or else continue using this article.

Here is the online Tool To Convert KML To SHP Shapefile

KML (Keyhole Markup Language) is very popular GIS format. It is available in text format containing tags such as Placemark, SimpleField, SimpleData and ExtendedData etc. It contains whole information in tag. But when you need to see the geometry you may require Shapefile. This conversion can be done using Ogr2ogr utility from GDAL (Geospatial Data Abstraction Library) and other GIS software such as QGIS, ArcGIS etc.

Convert kml to shp – Look Details For KML (Keyhole Markup Language) structure with Line feature-

<Schema name="India_roads" id="India_roads">
 <SimpleField name="MED_DESCRI" type="string"></SimpleField>
 <SimpleField name="RTT_DESCRI" type="string"></SimpleField>
 <SimpleField name="F_CODE_DES" type="string"></SimpleField>
 <SimpleField name="ISO" type="string"></SimpleField>
 <SimpleField name="ISOCOUNTRY" type="string"></SimpleField>
 <SimpleField name="Length_km" type="float"></SimpleField>
 <SimpleField name="Latitude" type="string"></SimpleField>
 </Schema>
 <Folder><name>India_roads</name>
 <Placemark>
 <Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle><fill>0</fill></PolyStyle></Style>
 <ExtendedData><SchemaData schemaUrl="#India_raods">
 <SimpleData name="MED_DESCRI">Without Median</SimpleData>
 <SimpleData name="RTT_DESCRI">Secondary Route</SimpleData>
 <SimpleData name="F_CODE_DES">Road</SimpleData>
 <SimpleData name="ISO">IND</SimpleData>
 <SimpleData name="ISOCOUNTRY">INDIA</SimpleData>
 <SimpleData name="Length_km">0.3</SimpleData>
 </SchemaData></ExtendedData>
 <LineString><coordinates>77.8277403975188,35.5012774951028 77.8257523065223,35.4995003281062</coordinates></LineString>
 </Placemark>
 <Placemark>

In the above given example, attribute fields are given with their data type. In style tag geometry style shown with color. Extended Data encloses attribute field name with values. In the last coordinates are given for particular line string. In similar way other lines, point and polygon are given in KML.

You may also look over converting Shapefile to kml using QGIS or shp to kml using ogr2ogr tool.

KML to SHP Shapefile – Convert

    • Go to MapOG Tool  and login with email id or if you are new user then register with a valid email id.
    • After login next step is to  Tap on Switch To and select Converter.
    • Next screen will be opened. Upload your data from system or drag & drop.
    • After uploading your data select the output data. For KML to Shapefile select SHP.
    • If you want your output in different coordinate reference system then click on change CRS.
    • Your converted file is directly published on the map. Download your converted file by clicking download icon.

For step by step approach check the video given below:

Convert from Keyhole Markup Language KML to SHP Shapefile using ogr2ogr utility-

For using this utility you need to install it in your system. To install this utility you can follow given commands,

KML to SHP Shapefile - Convert
KML to SHP Shapefile – Convert

If you already have install this utility or you want to check availability of this utility you can type ogr2ogr in terminal.

KML to SHP Shapefile - Convert

For conversion the given command need to be executed on terminal-

--- ogr2ogr -f 'ESRI Shapefile' Output_sahpefile.shp Input_KML.kml

Here -f defines the output file format and ‘ESRI shapefile’ is driver available.

PHP code for converting KML to SHP shapefile-

If you want the conversion using programing or don’t want to use terminal then this can also be done using PHP. You can create a function that defined this command as string and can give this string in shell_exec() method to execute. Shell_exec() actually execute the command and returns output as string.

public function KML_to_shp($KMLfilepath,$output){
 $query="ogr2ogr -f 'ESRI Shapefile'  $output.gml  $KMLfilepath";
 shell_exec($query);
 }

Generated output in QGIS software-

KML to SHP Shapefile - Convert
KML to SHP Shapefile – Convert

Change Coordinate System of shapefile generated from kml-

Changing coordinate system of output file can be done with this same ogr2ogr utility. It has various option for SRS (Spatial reference system), given below

-a_srs srs_def:

Assign an output SRS

-t_srs srs_def:

Reproject/transform to this SRS on output

-s_srs srs_def:

Override source SRS

These option can be used in command as-

— ogr2ogr -f ‘ESRI Shapefile’ -t_srs EPSG:32643 (new EPSG) -s_srs EPSG:4326 (old EPSG) shpchange.shp output1.kml

Generated shapefile from kml after changing coordinate system in QGIS software-

Convert- KML to Shapefile - Keyhole Markup Language

Hence, we get our shapefile. Furthermore, try our tool MAPOG Tool if you want to conversion in single click.

You also can visit Shapefile to GeoJSON, Shapefile to TopoJSON, Shapfile to geopackage, KML to shapefile conversion using QGIS etc.

If you face any problem during implementing this tutorial, please let us know. Feel free to comment in given comment box.

Even more try your hands on our Conversion Tool

SHP to GML – Convert Shapefile to Geography Markup Language

Shape file shp to GML conversion is required when you carry data from one place to another. Shapefiles are heavy as compared with GML (Geography Markup Language). On the other hand we can say that GML makes you able to do many of the same things that you would do with heavyweight desktop GIS files.

For a more in-depth guide on this topic, be sure to check out our accompanying video tutorial, where we walk you through each step visually and provide practical demonstrations.

Convert SHP to KML using MapOG Tool Converter

GML (Geography Markup Language) is about describing kinds of geographic objects. This is XML based language that contain two part- the schema that describes the document and the instance document that contains the actual data. GML schema allows users and developers to describe generic geographic data sets that contain points, lines and polygons. Using this schema user can differentiate between geometry primitives.

GMl format composed of geometry property and attribute detail in feature member tag. Here geometry defines which primitive is available in data. Whether it is point, line or polygon. These can be multilinestring or multipolygon. The given line of GMl defines the lineString, contains attributes as MED_DESCRI, RTT_DESCRI, F_CODE_DES, ISO and ISO_country in ogr tag. The srsName(Spatial reference system name) is given is file for each geometry as EPSG number.

LineString as Example of GML file Describing feature – Know Before performing shp to gml convert

<gml:featureMember>
 <ogr:India_raods fid="India_raods.0">
 <ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>77.8277403974823,35.5012774951288 77.8257523064861,35.4995003281321</gml:coordinates></gml:LineString></ogr:geometryProperty>
 <ogr:MED_DESCRI>Without Median</ogr:MED_DESCRI>
 <ogr:RTT_DESCRI>Secondary Route</ogr:RTT_DESCRI>
 <ogr:F_CODE_DES>Road</ogr:F_CODE_DES>
 <ogr:ISO>IND</ogr:ISO>
 <ogr:ISOCOUNTRY>INDIA</ogr:ISOCOUNTRY>
 <ogr:Length_km>0.30</ogr:Length_km>
 </ogr:India_raods>
 </gml:featureMember>

This also contains the bounding box of whole data with four corner latitude longitude.

<gml:boundedBy>
 <gml:Box>
 <gml:coord><gml:X>68.49822243392609</gml:X><gml:Y>7.92528433268866</gml:Y></gml:coord>
 <gml:coord><gml:X>97.33479210700925</gml:X><gml:Y>35.50128146412876</gml:Y></gml:coord>
 </gml:Box>
 </gml:boundedBy>

Convert shapefile Shp to GML (Geography Markup Language) using Ogr2Ogr –

For converting shapefile in GML format you need to have ogr2ogr utility in your system. If this is not available you can follow the given procedure.

Convert Shapefile shp to GML - Geography Markup Language
Convert Shapefile shp to GML – Geography Markup Language

After installing, you can check the availability of ogr2ogr in terminal by typing ogr2ogr, then you will be able to see the following result.

Convert- Shape file to GML

Command Line conversion – shp to gml-

Now, to convert Shapefile to GML you need to execute the following command-

Convert- Shape file to GML

In this command -f is the output file format i.e. GML then specify the output file name with .gml extension and after that input shapefile name with .shp extension.
Note- while executing this command you must check for .shx file, which contains the positional index for geometry objects.

Code- Convert shp to GML

If you want the conversion using programing or don’t want to use terminal then this can also be done using PHP. You can create a function that defined this command as string and can give this string in shell_exec() method to execute. Shell_exec() actually execute the command and returns output as string.

public function shptogml($shpfilepath,$output){
$query=”ogr2ogr -f GML $output.gml $shpfilepath”;
print_r($query);
shell_exec($query);
}

The GML output file will be something like this-

Convert Shapefile shp to GML - Geography Markup Language

Change coordinate system of GML file from shp-

Many of times, we need the output file in other coordinate system. For this we can use options of ogr2ogr utility. It has

-t_srs srs_def:

Reproject/transform to this SRS on output

-s_srs srs_def:

Override source SRS

So using these option, we can get the data in required coordinate system. So for this you can write the query as-

–> ogr2ogr -f GML -t_srs EPSG:32643 (new EPSG) -s_srs EPSG:4326 (old EPSG) newGmlFile.gml InputFile.shp

You also can visit Shapefile to GeoJSON, Shapefile to KML, Shapefile to TopoJSON, Shapfile to geopackage etc.

If you face any problem during implementing this tutorial, please let us know. Feel free to comment in given comment box.

Shp to KML KMZ – Convert Shapefile to Keyhole Markup Language

Shapefile Shp to KML KMZ Convert. Many times you may want to render your shapefile directly in Google Map and check the view. Or you may want to convert the shapefile shp to KML so that it becomes easy to program with Google Map API. You can also check the file with Google Earth by loading KML converted from Shapefile.

KML is keyhole markup language file format, used to display geographic data on earth browser such as google earth and ArcGIS Explorer etc. This is XML tag-based structure. It is a highly portable single file that can contain all of a layer or map’s elements, such as feature geometry, imagery, symbology, descriptions, attributes, imagery, and other related content. Similarly .kmz  is spatial format, which is a compressed or zipped file of KML extension. In GIS vector and raster data formats are saved differently where as KML composed of including elements as line point polygon and imagery. While shapefile is a Vector file, comprised of three files i.e .shp, .shx and .dbf extension.

Checkout Online tool To convert Shapefile to KML or KMZ

KML File Format To Know Before Converting from Shapefile or SHP

Before taking a look on Converting Shapefile to KML or KMZ file, lets first look over how KML file look like. This is essential as if kml file is corrupted then conversion is not possible. And if you know file format, you can correct the same as we can edit the kml in text editor. If you already know the file format of KML, you may skip this step and look directly for Convert Shapefile shp to KML using ogr2ogr tool. Every geographic element such as point line or polygon is specified by different tags.

SHP to KML Conversion IGIS Map Tool

shp to kml

  • You can directly upload from your database or from Google drive or else from dropbox.

shp to kml

  • We are using google drive.  Once file upload is complete, select the output format. We tap on KML for output.

shp to kml

  • Click on Convert file button.

shp to kml

  • Here is your Converted Shp to Kml file. Tap on published button.

Download World Shapefile for project

Point Data KML file format – shp to kml

It contains geographic location, title and description as latitude and longitude.

<Placemark>
 <name>Simple placemark</name>
 <description>Attached to the ground. Intelligently places itself
 at the height of the underlying terrain.</description>
 <Point>
 <coordinates>-122.0822035425683,37.42228990140251,0</coordinates>
 </Point>
 </Placemark>

Line Data KML file format – shp to kml

Using style tag you can specify the color and width for lines.

<Style id="yellowLineGreenPoly">
 <LineStyle>
 <color>7f00ffff</color>
 <width>4</width>
 </LineStyle>
 <PolyStyle>
 <color>7f00ff00</color>
 </PolyStyle>
 </Style>
 <Placemark>
 <name>Absolute Extruded</name>
 <description>Transparent green wall with yellow outlines</description>
 <styleUrl>#yellowLineGreenPoly</styleUrl>
 <LineString>
 <extrude>1</extrude>
 <tessellate>1</tessellate>
 <altitudeMode>absolute</altitudeMode>
 <coordinates> -112.2550785337791,36.07954952145647,2357
 -112.2549277039738,36.08117083492122,2357
 -112.2552505069063,36.08260761307279,2357
 -112.2564540158376,36.08395660588506,2357
 -112.2580238976449,36.08511401044813,2357
 -112.2595218489022,36.08584355239394,2357
 -112.2608216347552,36.08612634548589,2357
 -112.262073428656,36.08626019085147,2357
 -112.2633204928495,36.08621519860091,2357
 -112.2644963846444,36.08627897945274,2357
 -112.2656969554589,36.08649599090644,2357
 </coordinates>
 </LineString>
 </Placemark>

The <tessellate> tag breaks the line up into smaller chunks, and the <extrude> tag extends the line down to the ground.

Polygon Data KML file format – shp to kml

<Placemark>
 <name>The Pentagon</name>
 <Polygon>
 <extrude>1</extrude>
 <altitudeMode>relativeToGround</altitudeMode>
 <outerBoundaryIs>
 <LinearRing>
 <coordinates>
 -77.05788457660967,38.87253259892824,100
 -77.05465973756702,38.87291016281703,100
 -77.05315536854791,38.87053267794386,100
 -77.05552622493516,38.868757801256,100
 -77.05844056290393,38.86996206506943,100
 -77.05788457660967,38.87253259892824,100
 </coordinates>
 </LinearRing>
 </outerBoundaryIs>
 <innerBoundaryIs>
 <LinearRing>
 <coordinates>
 -77.05668055019126,38.87154239798456,100
 -77.05542625960818,38.87167890344077,100
 -77.05485125901024,38.87076535397792,100
 -77.05577677433152,38.87008686581446,100
 -77.05691162017543,38.87054446963351,100
 -77.05668055019126,38.87154239798456,100
 </coordinates>
 </LinearRing>
 </innerBoundaryIs>
 </Polygon>
 </Placemark>

There are many option tags in KML.

Convert Shapefile SHP to KML KMZ

In this article we will have a look on how shapefile can be converted in KML. For conversion ogr2ogr command has used which should be written on terminal (command promt). You need to install ogr2ogr tool, which is open source tool and can be installed in Windows, Ubuntu, Mac or any other linux system.

Note that for converting shapefile to KML you must have shp along with shx file and dbf file. As shx file contains the positional index of the feature geometry whereas shp format contains geometry itself and dbf contains the data associated with the feature.

Command Format for using ogr2ogr tool to convert to kml :

---- ogr2ogr -f KML outputfilename.kml inputfilename.shp

Here is an example command line, to show how i had use ogr2ogr tool to convert the shp to kml file.

convert-shapefile to kml/kmz

Similarly you can convert shapefile to KML using QGIS tool.

Convert SHP to KML or KMZ using coding-

To convert in KMZ format you can just change the extension of output file from .kml to .kmz format. The option -f (output file format) remain same for both.

In PHP you can use this command using shell_exec() method. Here a function is created in which shapefile and Output file name is taken from user.

public function shptokml($shpfilepath,$output){
 $query= "ogr2ogr -f KML $output.kml $shpfilepath ";
 shell_exec($query);
 }

Similarly for KMZ, you can have a function as given below-

public function shptokmz($shpfilepath,$output) {
 $query="ogr2ogr -f KML output.kmz $shpfilepath";
 shell_exec($query);
 }

The converted output will contain all attribute details with their geographic location in latitude longitude form.

convert-shapefile to kml/kmz

Note-

KML only supports EPSG: 4326 i.e. +proj=longlat +datum=WGS84 . So you can not change the coordinate system of KML. But you can change the coordinate system of shapefile before converting it in KML.

Similarly you may also look for converting shapefile to GeoJSON, Shapefile to Topojson, Shapefile to Geopackage, Shapefile to Postgresql, shapefile to CSV etc. Also you can look for reverse convert the same i.e from KML to shapefile using QGIS or ogr2ogr tool.

Hope you enjoyed this article and successfully converted shapefile into KML. If you find any difficulty during execution of this article please let us know by commenting below in the box provided.

Convert Shapefile to kml by QGIS

Convert Shapefile to kml by QGIS. Shapefile is ESRI based Vector file, While KML or Keyhole Markup Language is file which models and stores geographic features for display in Google Earth or Google maps. Many times you may require to convert the required shapefile to KML file, so that you can deploy the same over Google Earth for some reason. QGIS (Quantum GIS) is an open source GIS (Geographic Information System) tool, which let you upload the Shapefile and convert the same to KML file. Similarly ogr2ogr is also an open source tool, which let you to convert between GIS data formats. Look over shp to kml convert using ogr2ogr tool which can be marked as an alternative to this article. You can also see to convert Kml to Shapefile and also Shapefile to GeoJSON in QGIS.

You can also try Online conversion instead of QGIS MAPOG Online converter tool

You can also go through other tutorial in QGIS.

Free SHP to KML conversion using GIS Converter Tool in one click.

Here are the steps to convert shapefile to kml:

Convert Shapefile to kml in QGIS

Convert Shapefile to kml by QGIS
Convert Shapefile to kml by QGIS

Convert Shapefile to kml in QGIS:

1.) Open up the installed QGIS.
2.) In the menu bar, select Layer and press Add Vector Layer. Now select the source type in the pop up window opened as File and browse the source Shapefile(Note:Your shapefile .shp, .dbf and .shx file should be in same folder). Press open.

Convert Shapefile to kml by QGIS
Convert Shapefile to kml by QGIS

Select the coordinate reference type system if coordinate reference window appears and press ok.

3.) Right click on the name of Shapefile layer Appearing in the Left upper side and select save as:
or
You can select layer from the menu, and click on save as. (Image below provide demonstrate both the options with the indicator displayed)

Convert Shapefile to kml by QGIS
Convert Shapefile to kml by QGIS

4.) In the Save vector layer as window, Select the format from the drop down box as Keyhole Markup Language(KML) and browse the folder in which you want to save the KML file . Name it and Press OK.

Convert Shapefile to kml by QGIS
Convert Shapefile to kml by QGIS

Your KML file will be Exported in the directed folder. You can Verify the generated KML file for its validity by uploading the generated KML file to QGIS or uploading KML file in Google map. You may soon find the tool and the coding for the same on this site.

You may check in converting Geojson to Topojson and Shapefile to TopoJSON file. Hope this may help you in converting Shapefile to KML file easily. If you still find problem in converting the file, do let me know by commenting below.

Introduction of QGIS 3.2.1