[OSM-dev] generate_xml.py is not running

Graham Jones grahamjones139 at gmail.com
Sun Jan 30 10:08:29 GMT 2011


Parveen,
It sounds as though either the osm2pgsql import did not work, or you
imported the data into a different database to the one mapnik is using (I
did that once and got very confused...).

I would check what is in your database with a few simple queries from the
command line.
Try:
psql -d gis   <assuming gis is the database you used for the osm2pgsql
import>
\d

\d should list all the tables in the database - on my computer I get:
          List of relations
 Schema |        Name        |   Type   | Owner
--------+--------------------+----------+--------
 public | contours           | table    | graham
 public | contours_gid_seq   | sequence | graham
 public | geometry_columns   | table    | graham
 public | planet_osm_line    | table    | graham
 public | planet_osm_nodes   | table    | graham
 public | planet_osm_point   | table    | graham
 public | planet_osm_polygon | table    | graham
 public | planet_osm_rels    | table    | graham
 public | planet_osm_roads   | table    | graham
 public | planet_osm_ways    | table    | graham
 public | spatial_ref_sys    | table    | graham
(11 rows)

(but you will not have the contours ones).

If you do not have something like this, then osm2pgsql has failed - I would
try the import again with a very small area - just download a bit of a local
town and import that so it is quicker than a whole country - and look out
for any errors.

If the tables do exist you can do some simple queries like:
select osm_id,name from planet_osm_polygon where leisure='playground';

to see if the data looks reasonable.

Regards


Graham.


On 30 January 2011 08:58, Parveen Arora <parveenaroraosm at gmail.com> wrote:

> On Sun, Jan 30, 2011 at 2:01 PM, H.S.Rai <hardeep.rai at gmail.com> wrote:
> > On Sun, Jan 30, 2011 at 12:50 PM, Parveen Arora
> > <parveenaroraosm at gmail.com> wrote:
> >> On Sun, Jan 30, 2011 at 12:46 PM, yvecai <yvecai at gmail.com> wrote:
> >>> Try:
> >>>
> >>> $./generate_xml.py osm.xml --dbname gis --user parveen --accept-none
> >>
> >> $./generate_xml.py --dbname gis --user username --accept-none
> >> ran successfully
> >> but
> >> $./generate_image.py     is giving error:
> >>
> >> Traceback (most recent call last):
> >>  File "./generate_image.py", line 37, in <module>
> >>   mapnik.load_map(m,mapfile)
> >> RuntimeError: PSQL error:
> >> FATAL:  Ident authentication failed for user "parveen" (encountered
> >> during parsing of layer 'leisure')
> >
> > Authentication issue.
> Sir I am using Super user
>
> > Visit: http://wiki.openstreetmap.org/wiki/Mapnik and search for
> > "authentication failed for user".
> I have followed it still following problem in
> ./genrate_image
>
> Traceback (most recent call last):
>  File "./generate_image.py", line 37, in <module>
>    mapnik.load_map(m,mapfile)
> RuntimeError: PSQL error:
> ERROR:  relation "planet_osm_polygon" does not exist
> LINE 4:        from planet_osm_polygon
>                    ^
> Full sql was: 'select * from
>      (select
> way,aeroway,amenity,landuse,leisure,man_made,military,"natural",power,tourism,name,highway,
>       case when religion in ('christian','jewish') then religion else
> 'INT-generic'::text end as religion
>       from planet_osm_polygon
>       where landuse is not null
>          or leisure is not null
>          or aeroway in ('apron','aerodrome')
>          or amenity in
>
> ('parking','university','college','school','hospital','kindergarten','grave_yard')
>          or military in ('barracks','danger_area')
>          or "natural" in
> ('field','beach','desert','heath','mud','wood','sand')
>          or power in ('station','sub_station','generator')
>          or tourism in
> ('attraction','camp_site','caravan_site','picnic_site','zoo')
>          or highway in ('services','rest_area')
>       order by z_order,way_area desc
>      ) as leisure
>       limit 0'
>  (encountered during parsing of layer 'leisure')
>
> Is there any problem in data file which I have for India
> Last time there was some problem in that file so that was not working
> --
> With Kind Regards
> Parveen Arora
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>



-- 
Graham Jones
Hartlepool, UK.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20110130/746b134a/attachment.html>


More information about the dev mailing list