[solved]Problems converting shp to osm

Hello,

I’m trying to convert a shp file to osm, here’s the file in question : ftp://gisftp.hicentral.com/Layers/Structures_Facilities/Structure_NGA.zip

It’s a shapefile of buildings in Honolulu, i would like to convert it to .osm so i can use it with a software that can’t read .shp.

I’m following this topic on the wiki http://wiki.openstreetmap.org/wiki/Using_OS_Shapefiles , using exallpoly.py , but i’m having bad lat/long results with the shp file i’m using .

It seems that this file has a weird projection or something like that, when i load it into ogr2gui it doesn’t show the current projection (mapwindow couldn’t identify projection too), so i think that the conversion to wgs84 i’m doing before using exallpoly is bad.

Here’s the content of the prj file:


PROJCS["NAD_1983_HARN_StatePlane_Hawaii_3_FIPS_5103_Feet",GEOGCS["GCS_North_American_1983_HARN",DATUM["D_North_American_1983_HARN",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",1640416.666666667],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-158.0],PARAMETER["Scale_Factor",0.99999],PARAMETER["Latitude_Of_Origin",21.16666666666667],UNIT["Foot_US",0.3048006096012192]]

Thanks a lot for you help :slight_smile:

Hi,

The projection seems to be ESRI:102263. Use GDAL for conversion. I had a try with GDAL 1.9.0 on Windows installed from
http://www.gisinternals.com/sdk/Download.aspx?file=release-1500-gdal-mapserver\gdal-19dev-1500-core.msi

First a quicklook at the shapefile:

Z:\temp>ogrinfo -al -so Structure_NGA.shp
INFO: Open of Structure_NGA.shp' using driver ESRI Shapefile’ successful.

Layer name: Structure_NGA
Geometry: Polygon
Feature Count: 123141
Extent: (1600299.046871, 32270.090523) - (1755739.098983, 128115.769460)
Layer SRS WKT:
PROJCS[“NAD_1983_HARN_StatePlane_Hawaii_3_FIPS_5103_Feet”,
GEOGCS[“GCS_North_American_1983_HARN”,
DATUM[“NAD83_High_Accuracy_Reference_Network”,
SPHEROID[“GRS_1980”,6378137.0,298.257222101]],
PRIMEM[“Greenwich”,0.0],
UNIT[“Degree”,0.0174532925199433]],
PROJECTION[“Transverse_Mercator”],
PARAMETER[“False_Easting”,1640416.666666667],
PARAMETER[“False_Northing”,0.0],
PARAMETER[“Central_Meridian”,-158.0],
PARAMETER[“Scale_Factor”,0.99999],
PARAMETER[“Latitude_Of_Origin”,21.16666666666667],
UNIT[“Foot_US”,0.3048006096012192]]
OBJECTID: Integer (10.0)
MINHT_M: Real (13.2)
MAXHT_M: Real (13.2)
BASE_M: Real (13.2)
ARA2D: Real (11.0)
HGT2D: Real (11.0)
LEN2D: Real (11.2)
WID2D: Real (11.2)
ID: Real (11.0)
SHAPE_area: Real (19.11)
SHAPE_len: Real (19.11)

Next convert to EPSG:4326

Z:\temp>ogr2ogr -f “ESRI Shapefile” -t_srs epsg:4326 Structure_NGE_4326.shp Structure_NGA.shp

JRA,

Thanks a lot for your answer, looking at the generated osm file it seems to be perfect (can’t try the file with my app right now to confirm, but lat/long values look like what i’m expecting).

Thanks!

Ben