zhikrullah / pyshp

Automatically exported from code.google.com/p/pyshp
MIT License
0 stars 0 forks source link

No import of polygons into Google Earth? #54

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. The following file:

import shapefile as sf 
filename = 'testpoly'  
# create the shapefile 
w = sf.Writer()
w.poly(parts=[[[-121.1,49.0],[-121.1,49.1],[-121.0,49.1],[-121.0,49.0],[-121.1,4
9.0]]], shapeType=sf.POLYGON) 
w.field('ID','N','40')
w.record('0','Polygon') 
w.save(filename)  

# create the PRJ file 
prj = open("%s.prj" % filename, "w") 
epsg = 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 
84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.01745329251994
33]]' 
prj.write(epsg) 
prj.close()

2. Drag .shp to google earth

What is the expected output? What do you see instead?
Expected: a box
Actual: "Found zero features in file: testpoly.shp

What version of the product are you using? On what operating system?
1. Python 3.1 on Windows 7

Please provide any additional information below.

Original issue reported on code.google.com by justinmr...@gmail.com on 8 Aug 2013 at 1:20

GoogleCodeExporter commented 8 years ago
This issue is fixed in PyShp version 1.1.9.  Please upgrade.  I tested your 
sample verbatim in Python 3.2.2 and Google Earth Pro (trial) 7.1.1.1888 to 
produce the attached image and shapefile.

Original comment by geospati...@gmail.com on 8 Aug 2013 at 2:57

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks - That'll do it. I found pyshp 1.1.9 here:
https://pypi.python.org/pypi/pyshp#downloads
which of course is a great place to find it. However, I originally downloaded 
from here:
http://pyshp.googlecode.com/svn/trunk/shapefile.py
which is still 1.1.7.

Original comment by justinmr...@gmail.com on 8 Aug 2013 at 3:13

GoogleCodeExporter commented 8 years ago
Whoops!  Thanks for the reminder. The trunk is updated now.  

Original comment by geospati...@gmail.com on 8 Aug 2013 at 3:35