Is it possible to write a python code for convert shape file to kml? Please give me the advice and way to do.Thank you
There are existing tools in arcmap and ArcGIS Pro
KML conversion tools, Layer to KML
Sample code exists on geonet
https://community.esri.com/thread/167881
Dear Sir,
Actually, I want to run a python program independently. But it says a error
'No module named arcgisscripting'
Let me know to fix it.
Regards,
Kanchana
You have to have a version of ArcMap installed on the computer you are running it on.
Dr Google has some examples of code snippets that require QGIS if you don't have an Arc* product installed
Hi Kanchana,
If you don't have a version of ArcGIS installed on your computer you won't be able to access the arcpy module with python.
An other really easy way to convert spatial formats with python is to use GDAL/OGR.
This link will walk you through how to write to kml:
Geometry — Python GDAL/OGR Cookbook 1.0 documentation
Thanks for your advice.By the way, how can I get the arcgisscripting
library for my project.Because when I run the standalone query,it says this
library is missing.But it is in the ARCGis installation folder.Without the
ARCGis installation,I cannot run the standalone program
you need the full installation of ArcMap, the arcgisscripting checks this, so work on a machine that has a legit version of ArcMap or ArcGIS PRO. A receiving computer also needs it.
Hi,Yes without installation,can I get the resolve the arcgisscripting
problem?
Hello, Thanks for the details. Can we write python code without using the
arcpy library for shapefile to kml conversion?
never seen a pure python library, since you need at least a library to deal with the shapefile part
Hello,Can we make a library of arcgisscripting using python code?
Without ArcGIS installed.... geo_file_conv/shp_to_kml.py at master · cleder/geo_file_conv · GitHub But you will have to trackdown the additional modules and install them in your environment.
Please help me to find these additional modules.Because I am new to this
python coding.Thanks a lot
I am sure the module owner would help you get started cleder (Christian Ledermann) · GitHub
------------
GitHub - cleder/pygeoif: Basic implementation of the __geo_interface__
GitHub - cleder/fastkml: Fast KML processing for python
GitHub - GeospatialPython/pyshp: This library reads and writes ESRI Shapefiles in pure Python.
Yes.Thanks for your help.Actually, I need the conversion python code.(Shape
file to KML)
Kanchana,
You have be given many different ways on approaching your problem. All of them valid and workable. There is no direct magic code to perform what you want directly. If you wish to script such code that would require advance coding and gis knowledge. Using some else's, code does require you to install and download all required modules the code requires (You have been given this).
Searching Youtube I did find a lot of videos describing some of the techniques mention in this thread by other people... so maybe one of these video will help you?
List of videos describing how to covert a shapefile to KML:
convert shapefile to kml - YouTube
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.