Martin,

Thoughts:

1) This query string example below works perfectly for me when hitting the ogcserver configured to read in the XML example from: http://trac.mapnik.org/wiki/XMLGettingStarted . It produced the attached image (population_ogcserver.png).


http://localhost/cgi-bin/mapnikwms.py?LAYERS=countries&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=-180.0000000000001,-90,119.46385052802589,209.463850528026&WIDTH=256&HEIGHT=256


<<inline: population_via_ogcserver.png>>




2) So what do you get in your browser if you keep your filters in place (e.g. keep the example exactly like the tutorial) and then paste that url string into its own browser window?

3) You say that you've ...


I've attached the shapefiles for the population.xml example and the mapnikwms.py file below.


But that is surely not the tutorial since your 'world_styles2.xml' is not reading from the shapefiles you attached. You've hacked the styles and they look associated only with your postgis layers.

Unless you want to *waste my time* helping can you please try to test filters using the actual tutorial example?

4) In your 'world_styles2.xml' file I notice several other problems that will prevent your map from working: a. your map srs="+init=epsg:31297" so you need to make WMS requests with SRS=EPSG:31297 *not* SRS=EPSG:4326
  b. you need to set the srs parameter for your layers
c. you should not both set the extents manually and specify estimate_extents=true. Do one or the other. d. usually 'root' is not supposed to access the postgres server - are you sure that works? e. the query you are using in the layer which references the style 'value' in which you are trying to filter on looks doomed to debug to me - can't to try on some table a bit more simple? :) f. the 'value' query is clearly failing to return any records as I can see in the debug output: 'SELECT AsBinary("") AS geom,"value" from'
  g.

5) In your 'trace_output' it is good to see that many of the layers 'intersect' with the map, but that is only happening with nik2img because nik2img is not requesting your map be reprojected into EPSG: 4326 (which is happening when you issue the WMS query like you have pasted). You should emulate the WMS query by doing:

  $ nik2img.py -m world_styles2.xml -o test.png -p epsg:4326

Here you will see that because you have not specified srs parameters for your layers the map will likely fail to render them because Mapnik assumes all layers are in epsg:4326 while your layers are not.

6)
Concerning my second problem:


How about we try to address your first problem, first? I think I may be misunderstanding which is which because I now see that your attachment may only apply to problem 2, and I've responded as if it applied to problem 1. So , can you help me help you and try to get the first one figured out? Start by setting the right srs for your layers.

The output with the "-v" option seems ok.
I added a .tar.gz file to attachment (my_example.tar.gz) - there are 3 files in the archrive: the file "trace_verbose.txt" is with option "-v" and the other one "normal_trace.txt" is the output without using option "-v". The third file is my xml file (world_styles2.xml).

If you could have a look at it I would be very glad.


Dane


_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to