[Proj] Projections with respect to India

Anisha Kaul anisha.kaul at hitechroboticsystemz.com
Sun Jan 10 23:31:32 PST 2010


Many thanks to all of you for bothering to reply !!

Data in my previous mail was missing :
http://lists.maptools.org/pipermail/proj/2010-January/005005.html

Greg Troxel wrote:
> OSM stores data in WGS84 EPGS4326 (in the xml file).  But, osm2pgsql by
> default converts to Google Spherical Mercator EPGS:900913.  If you are
> trying to use this data in a local coordinate system (an Indian TM or
> lambert conformal conic system?), then you are probably better off
> importing in EPSG4326.

Milo van der Linden wrote:
> Which can easily be done with using the -l or --latlong parameter:
> ./osm2pgsql -l -d gis india.osm.bz2 

According to both your suggestions, I droped the database "gis", and recreated it !

Now when I did execute the following command 
____________________________________________________________
./osm2pgsql -l -E EPSG:4326 -d gis ~/mapnik-0.6.0/osmFiles/india.osm.bz2


It resulted in the following output:
____________________________________________________________
osm2pgsql SVN version 0.69-19270

Using projection SRS 4326 (Latlong)
Setting up table: planet_osm_point
NOTICE:  table "planet_osm_point" does not exist, skipping
NOTICE:  table "planet_osm_point_tmp" does not exist, skipping
SELECT AddGeometryColumn('planet_osm_point', 'way', 4326, 'POINT', 2 );
 failed: ERROR:  AddGeometryColumns() - invalid SRID
CONTEXT:  SQL statement "SELECT AddGeometryColumn('','', $1 , $2 , $3 , $4 , $5 )"
PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement

Error occurred, cleaning up

====================================================================
Then I executed the following command:
psql -f 900913.sql -d gis

It resulted in the following output:
INSERT 0 1

====================================================================
Then I executed the following command 
____________________________________________________________
./osm2pgsql -l -E EPSG:4326 -d gis ~/mapnik-0.6.0/osmFiles/india.osm.bz2


and again it resulted in the following output:
____________________________________________________________
osm2pgsql SVN version 0.69-19270

Using projection SRS 4326 (Latlong)
Setting up table: planet_osm_point
NOTICE:  table "planet_osm_point" does not exist, skipping
NOTICE:  table "planet_osm_point_tmp" does not exist, skipping
SELECT AddGeometryColumn('planet_osm_point', 'way', 4326, 'POINT', 2 );
 failed: ERROR:  AddGeometryColumns() - invalid SRID
CONTEXT:  SQL statement "SELECT AddGeometryColumn('','', $1 , $2 , $3 , $4 , $5 )"
PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement

Error occurred, cleaning up


PLEASE HELP, IF YOU CAN !!

-- 
Regards,
Anisha Kaul

-------------------------------------
Hi-Tech Gears Limited, Gurgaon, India







More information about the Proj mailing list