Skip to content

Instantly share code, notes, and snippets.

@maning
Last active February 9, 2016 04:36
Show Gist options
  • Save maning/093a866fd465ea880032 to your computer and use it in GitHub Desktop.
Save maning/093a866fd465ea880032 to your computer and use it in GitHub Desktop.

Source

http://geohub.lacity.org/datasets/813fcefde1f64b209103107b26a8909f_0

SRS Info

cat Building_Footprints.prj 
PROJCS["NAD83_California_zone_5_ftUS",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],UNIT["Foot_US",0.30480060960121924]]
ogrinfo Building_Footprints.shp Building_Footprints -so
      using driver `ESRI Shapefile' successful.

Layer name: Building_Footprints
Geometry: Polygon
Feature Count: 1122422
Extent: (6359604.840386, 1715123.090378) - (6514567.530460, 1943722.570186)
Layer SRS WKT:
PROJCS["NAD83_California_zone_5_ftUS",
    GEOGCS["GCS_North_American_1983",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS_1980",6378137,298.257222101]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",35.46666666666667],
    PARAMETER["standard_parallel_2",34.03333333333333],
    PARAMETER["latitude_of_origin",33.5],
    PARAMETER["central_meridian",-118],
    PARAMETER["false_easting",6561666.667],
    PARAMETER["false_northing",1640416.667],
    UNIT["Foot_US",0.30480060960121924]]
OBJECTID: Integer (10.0)
CODE: String (80.0)
BLD_ID: String (80.0)
HEIGHT: Real (24.15)
ELEV: Real (24.15)
AREA: Integer (10.0)
LARIAC_SOU: String (80.0)
LARIAC_DAT: String (80.0)
AIN: String (80.0)
STATUS: String (80.0)
CODE_NUM: Integer (10.0)

Convert to EPSG:4326

ogr2ogr -simplify 0.2 -t_srs EPSG:4326 -overwrite output.shp input.shp

screen shot 2016-02-08 at 17 10 51

screen shot 2016-02-08 at 17 10 28

screen shot 2016-02-08 at 17 09 35

Better conversion

ogr2ogr -simplify 0.2 \ -s_srs \ '+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000.000101601 +y_0=500000.0001016002 +ellps=GRS80 +towgs84=-0.9956,1.9013,0.5215,0.025915,0.009426,0.011599,-0.00062 +units=us-ft +no_defs' \ -t_srs \ EPSG:4326 output.shp inout.shp

better-compressor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment