<span style>Thanks for the feedback regarding 4326.</span><div><span style><br></span></div><div><span style>></span><span style>You can't load projected coordinates into geography, you'll need to</span><div><span style>>load to geometry, then re-project to 4326 and cast to geography if you</span></div>
<div><span style>>really want to use geography (why do you want to if your data is all</span><br style><span style>>neatly contained in Belgium and already projected?)</span><br>I have data throughout the world and I then associate it with administrative boundaries using shapefiles from various sources including IGN France, IGN Belgium, OSM, etc...<br>
<br></div><div>I was under the impression that geometry was only to be used over small areas. Am I wrong ? Should I really be using geometry and not geography ? I usually use ST_covers and plane to use ST_intersection and ST_area</div>
<div><br></div><div>Thanks</div><div><br><div class="gmail_quote">2012/4/10 Philippe <span dir="ltr"><<a href="mailto:watcherfr@gmail.com">watcherfr@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<div>I'm running into an issue loading data from the Belgium IGN.</div><div>I can transform a shapefile into Postgis loadable data with Geometry but not Geography. I can't imagine why. Any ideas ? Thanks</div>

<div><br></div><div><br></div><div>The following works</div><div>/usr/lib/postgresql/9.1/bin/shp2pgsql -WLATIN1 -s3812 -d -I /home/postgres/warehouse/shapes/BE/vector/Shape_L08/commune_polygon.shp be_ign > /tmp/be_ign.sql</div>

<div><br></div><div>The following fails</div><div>/usr/lib/postgresql/9.1/bin/shp2pgsql -WLATIN1 -s3812 -G -d -I /home/postgres/warehouse/shapes/BE/vector/Shape_L08/commune_polygon.shp be_ign > /tmp/be_ign.sql</div><div>

<br></div><div>with</div><div><div>       "Shapefile type: Polygon</div><div>       Postgis type: MULTIPOLYGON[2]</div><div>       Invalid SRID for geography type: ee4"</div></div><div><br></div><div>Although 0xee4=3812 which is the EPSG for the Lambert 2008 projection used by that file. And my spatial ref table contains it:</div>

<div><div><br></div><div>public=# select * from spatial_ref_sys  where auth_srid=3812;</div><div>srid      | 3812</div><div>auth_name | EPSG</div><div>auth_srid | 3812</div><div>srtext    | PROJCS["ETRS89 / Belgian Lambert 2008",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49.83333333333334],PARAMETER["standard_parallel_2",51.16666666666666],PARAMETER["latitude_of_origin",50.797815],PARAMETER["central_meridian",4.359215833333333],PARAMETER["false_easting",649328],PARAMETER["false_northing",665262],AUTHORITY["EPSG","3812"],AXIS["X",EAST],AXIS["Y",NORTH]]</div>

<div>proj4text | +proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=50.797815 +lon_0=4.359215833333333 +x_0=649328 +y_0=665262 +ellps=GRS80 +units=m +no_defs</div></div><div><br></div>
</blockquote></div><br></div></div>