Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

According to this answer I can read in a .lyr file via OGR as long as it was made with ArcGIS version 10.

I have such a file (from the ArcGIS Maps & Data page) but I can't quite make R's readOGR function work with it.

Directory contents after decompressing the .lpk file:

[1] "ESRI_Zip_Codes_Dec2011.lpk" "iteminfo.xml" "item.pkinfo" "thumbnail.png" [5] "USA_Zip_Codes.lyr" "zip_poly.prj" "zip_poly.sdc" "zip_poly.sdc.prj" [9] "zip_poly.sdc.xml" "zip_poly.sdi"

And then trying to open the various components:

ogrInfo( dsn=mypath, layer="zip_poly" )

Error in ogrInfo(dsn = file.path(shapedir, "zipcodes", "ESRI_Zipcodes"), : Cannot open file

ogrInfo( dsn=mypath, layer="USA_Zip_Codes" )

Error in ogrInfo(dsn = file.path(shapedir, "zipcodes", "ESRI_Zipcodes"), : Cannot open file

How do I open these things? I would normally take the easy way out and convert to Shapefile it via ArcGIS, but my annual license expired and my new one hasn't arrived yet.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Unfortunately there is no way to convert an LPK file (packaged with a file geodatabase inside) to a shapefile or file geodatabase using open source software. If you rename the LPK to ZIP, you can open the zip archive and see a large SDC file. This is basically the file geodatabase in ESRI's proprietary 'Spatial Data Compression' format.

OGR can work with a file geodatabase but is unable to work with an LPK or an SDC file.

Perhaps you could get to the data if the LPK file was created from one or more shapefiles.

share|improve this answer
    
Ok, I guess I'll have to trek over to the GIS lab and do it on one of their copies of Arc then. Thanks for the clarification. –  Ari B. Friedman Sep 27 '12 at 12:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.