#MAPSERVER IRC Log - 2009-11-04

For logs after Feb 3, 2007, all times are GMT-8. Prior logs are GMT-9.
Back to Logs
01:30:46 CIA-8: tbonfort * r9516 /trunk/mapserver/ ( HISTORY.TXT mapsymbol.c ): Fix vector symbol size calculation ( #2896 )
04:08:52 AlanB: Hi tbonfort, Does the last commit fix the Pattern problem of Havard ?
04:09:03 tbonfort: yes
04:09:08 AlanB: good new.
04:09:57 AlanB: I think there is a circle symbol too but not sure. Will check the Steve example before.
04:10:22 tbonfort: I'm waiting on steve for the outline width stuff
04:11:33 AlanB: I was too. guess it's not useful to both work on that
04:11:44 AlanB: will setup the havard map/data instead.
04:39:29 CIA-8: tbonfort * r9517 /trunk/mapserver/ ( HISTORY.TXT mapagg.cpp ): don't apply scalefactor to polygon outline widths ( but apply the resolutionfactor )
04:47:09 CIA-8: aboudreault * r9518 /trunk/mapserver/shp2img.c: Fixed a small memory leak in shp2img
04:49:05 AlanB: tbonfort: cool, your 2 last commit fixed the two major issue of havard too
05:12:27 CIA-8: tbonfort * r9519 /trunk/mapserver/ ( HISTORY.TXT mapagg.cpp ): apply a minimum width on label outline ( new outlines were too thin by default )
05:24:47 AlanB: tbonfort: Shouldn't a symbol LINECAP be ignored if it's not cartoline?
05:25:27 tbonfort: no, cartoline is deprecated, or at least not supported in agg
05:26:22 AlanB: the behavior of LINECAP != butt is strange, it disable completely a pattern
05:28:31 tbonfort: yes, the caps take up some space, that can eat into a tight pattern
05:28:53 AlanB: ok
06:01:46 AlanB: tbonfort: I'm modifying the symbol_pattern scaling to use resoltionfactor
06:02:41 tbonfort: it's already done, no ?
06:02:58 tbonfort: line 1592
06:03:06 tbonfort: in mapagg.cpp
06:03:19 AlanB: it uses scalefactor
06:03:50 AlanB: that caused a side effect in the case of havard
06:03:52 tbonfort: yes scalefactor is ok I think for this case
06:04:39 tbonfort: actually what would be best in this case is to scale by the line width directly
06:04:46 AlanB: all dashed lines disappeared..... I made the test and mutiplying by the resolutionfactor rather than the scalefactor fixed the issue.
06:04:57 tbonfort: i.e. PATTERN 1 1 will always give you dots, whatever the width of the line
06:06:51 tbonfort: pattern scaling was already messed up
06:07:08 AlanB: let me show you the behavior with an image, 2 mins
06:07:09 tbonfort: I'd favor as said scaling by the actual width of the line
06:10:54 AlanB: http://dl.mapgears.com/pattern-hav-before.png
06:11:06 AlanB: http://dl.mapgears.com/pattern-hav-after.png
06:12:10 AlanB: We don't see that in the link posted by Havard because he uses Linecap, which make the tight pattern simply disappear
06:12:23 tbonfort: what's the pattern definition for the redish-pink line ?
06:13:40 AlanB: http://pastebin.ca/1656774
06:13:41 sigabrt: Title: pastebin - Something - post number 1656774 ( at pastebin.ca )
06:15:23 tbonfort: try scaling with width, I'm pretty sure you'll get something ok
06:15:44 tbonfort: not applying the scalefactor is definitely not the right solution
06:19:57 AlanB: scaling with "style->width" ?
06:21:11 : * AlanB tries blindly
06:21:55 AlanB: looks good yes
06:21:56 tbonfort: no, the actual line width, i.e. width
06:24:45 : * tbonfort curses the mixed use ellipse symbols to draw thick lines
06:25:17 tbonfort: s/the mixed use/the use of/
06:28:15 AlanB: What would be the proper type for thick lines ?
06:29:48 tbonfort: STYLE WIDTH 3 PATTERN 2 2 END COLOR 0 0 0 END
06:31:46 tbonfort: the problem is that in the case of an ellipse symbol, it's the style's SIZE that is used, whereas in the straightforward case it's the WIDTH. This means that the original pattern has to be scaled by a different value depending on the type of symbol being used
06:32:50 AlanB: hmm.. I see
06:58:25 AlanB: tbonfort: I was using a similar symbol ( type ellipse too ) in another map, why that problem didn't show up? ( even with resolution 72 or 300 )
06:59:41 tbonfort: with a pattern and scale-dependant rendering ?
06:59:47 AlanB: in that case, the scalefactor scaling was ok.
07:01:13 AlanB: scale-dependant rendering, you mean if layers use minscale/maxscale?
07:04:30 AlanB: that might be the reason, not sure if the scale changed really in the tests
07:15:05 AlanB: tbonfort: Is your suggestion to Havard supposed to work? Because the pattern is still multiplyed by the scalefactor, so..
07:15:57 tbonfort: it's supposed to work if scaling by "width", i.e. pattern[i]=pattern[i]*width
07:17:13 tbonfort: I'm not sure what to do with this for 5.6 :/
07:17:32 AlanB: tried yes, unfortunatly no :/
07:18:19 tbonfort: you tried replacing the symbol, and scaling by width ?
07:18:53 AlanB: I don't know really neither, the only good result I got is the replacement of the *scalefactor by only the resolution factor... but that can't be done.
07:19:25 AlanB: tbonfort: yes, width ( which is the style->width*scalefactor )
07:19:54 tbonfort: *and* replacing the symbol in the correesponding style block ?
07:20:11 AlanB: yep, there is no more symbol used for the line
07:21:28 AlanB: let me double verify
07:23:28 AlanB: http://pastebin.ca/1656854
07:23:29 sigabrt: Title: pastebin - Miscellany - post number 1656854 ( at pastebin.ca )
07:23:48 AlanB: this results by no pattern at all
07:25:21 tbonfort: and in your code you have symbol_pattern[i] = MS_NINT( symbol->pattern[i]*width ); right ?
07:25:56 AlanB: line 1592, yes
07:26:57 AlanB: If I re-active the symbol, I see the pattern.
07:28:54 AlanB: ( fyi, the *width is not correct, the pattern is much smaller )
07:47:01 tbonfort: ok, found the problem ...
07:48:12 AlanB: What is it?
07:50:40 tbonfort: the gap/pattern/caps etc have moved from symbol to style, but this was not ported to the AGG renderer
07:53:21 AlanB: ha
07:56:27 AlanB: Is it ported to the GD renderer ?
07:56:43 tbonfort: no
07:56:47 AlanB: Ok
07:57:08 tbonfort: only the plugin stuff uses it for now
07:57:29 AlanB: Should we do that for 5.6 ?
07:57:46 tbonfort: I'd say no
07:58:01 tbonfort: I've checked the docs, and this isn't documented either
07:59:42 AlanB: k
07:59:54 : * tbonfort is off home
09:16:12 zl2tod: in a class object defined in a map file SYMBOL == 1, if I create a similar object using php mapscript SYMBOL is 0 ... what does it do anyway ? I note that the SYMBOL keyword in either case ends up setting SYMBOLNAME in the data structures
09:29:05 AlanB: Is there a way to get mapserver log on every request? Currently the log file is wrote only the first request after apache started.
09:29:16 AlanB: ( fastcgi, sorry )
09:31:10 AlanB: and that first log doesn't seem to be complete: [Wed Nov 4 18:41:38 2009].803086 msOracleSpatialLayerNextShape on layer 0x828c218, row_num: 319
09:31:16 FrankW: AlanB: the debug message msDebug( "CGI Request %d on process %d\n", nRequestCounter, getpid( ) ); should be issued for each cgi request to a fastcgi.
09:31:25 AlanB: [Wed No < last line
09:31:45 FrankW: Is it possible you have two fastcgi processes running? When they write to a common log file it causes many problems to have more than one active.
09:32:14 AlanB: only on mapserv.fcgi is currently running
09:32:17 AlanB: *one*
09:32:46 FrankW: There is also the issue that output isn't necessarily flushed right away.
09:32:51 FrankW: Is the fastcgi process still alive?
09:33:46 AlanB: yes it is. It waits for other requests I presume
09:33:56 FrankW: Skimming the mapio.c and mapdebug.c code I believe that debug output is not normally flushed till application termination.
09:34:16 FrankW: Perhaps the mapio mechanism should be upgrade to include a flush mechanism for debug output.
09:34:50 FrankW: Perhaps if you send a -HUP or other gentle kill signal to the fastcgi it will flush out the remaining debug output and shut down.
09:38:00 AlanB: FrankW: thanks, with the -HUP I can see the log I wanted.
09:40:42 FrankW: cool
10:21:22 mdev: Hi, I'm working on configuring mapserver with mapscript on php, anyone that could help?
10:23:23 mdev: I installed mapserver and mapscript without much trouble... I've been going through the docs but I have a really stupid question.... where do I get the map data??
10:24:02 AlanB: map data?
10:24:29 AlanB: All client/user have their own data. ie. the name,point of all the cities of their region.
10:24:43 mdev: right, but where do I start for that?
10:25:08 AlanB: Depends of what you want to do, what's your need ?
10:25:11 mdev: basically I'm developing an application for a travel agency to show maps of their destinations on the website,
10:25:22 mdev: was hoping to run it dynamically with php
10:25:31 mdev: create a database of destinations and their coordinates
10:25:40 mdev: and have them plot on a map in realtime or cached
10:26:18 mdev: so if there was a trip that goes from london to paris to berlin... the 3 cities would show up and a line between each to show the trip
10:26:31 mdev: I thought mapserver could help me create this?
10:27:28 AlanB: MapServer cannot really help you to "create" the data. MapServer is a Map renderer.
10:27:37 mdev: I understand that
10:27:40 AlanB: It takes the data and disply them like you want
10:27:47 mdev: exactly what I want to do
10:28:01 mdev: but where do I get the base map data?
10:28:15 mdev: seems like the documentation assumes you have the data already?
10:28:36 AlanB: the documentation use "example" data, like the gmap demo.
10:28:57 mdev: I think I tried that but URL was no longer valid, let me check again
10:29:37 AlanB: but the gmap demo is only north america ( I think )
10:29:46 zl2tod: you might find "shape files" for your area with a net search
10:29:52 AlanB: Maybe you could try OSM ?
10:30:15 mdev: what is OSM?
10:30:29 zl2tod: opemstreetmap.org
10:30:33 zl2tod: openstreetmap.org
10:30:34 mdev: ah that one
10:31:48 mdev: would mapserver be accessing date from them in real time or is it possible to download the entire data set?
10:32:29 mdev: basically I just need the outlines of countries around the world, I don't need extreme detail
10:33:51 AlanB: I think you can download different dataset for areas.
10:34:19 mdev: do you have to use postgresql to use osm?
10:34:39 AlanB: http://trac.osgeo.org/mapserver/wiki/RenderingOsmData
10:34:41 sigabrt: Title: RenderingOsmData - MapServer - Trac ( at trac.osgeo.org )
10:34:55 AlanB: mdev: mdev not sure
10:35:32 mdev: sorry I'm so stupid about this stuff... I'm more of a PHP developer and don't know so much about maps
10:36:04 mdev: I got the mapserver installed and understand most of the scripting examples... just having difficulty with the map data aspect
10:36:40 AlanB: You'll need a mapfile too.
10:36:56 AlanB: It's not only php programming.
10:37:18 mdev: yeah... I was hoping to only work on front end stuff for this
10:37:24 mdev: I'm confused about the backend
10:38:12 AlanB: A possibility would be to use OpenLayer + Google map.
10:38:27 AlanB: If you only need to place points of lines on a map.
10:38:43 mdev: but if you use google map, it maintains all their logos on map I think
10:39:22 mdev: mapserver seems like a great way to do it, I just wish there was some easy way or a generic world map to start on
10:39:24 AlanB: In OpenLayer, there is a small "Google" copyright at the bottom of the map.
10:41:06 mdev: if I want to do it with mapserver... what are the steps involved after it is installed?
10:41:27 mdev: I would assume it is low: load data, create scripts, display online?
10:44:01 AlanB: Prepare data, create a Mapfile, create all your definition ( layer, class, style, symbol ), create mapscript scripts, display
10:44:42 zl2tod: depends on how much you want it to do, have you worked through the tut at http://mapserver.org/tutorial/index.html ?
10:44:43 sigabrt: Title: MapServer Tutorial MapServer 5.4.2 documentation ( at mapserver.org )
10:45:39 mdev: I must have looked at a different one
10:45:44 mdev: I think it was the php tutorial
10:45:58 mdev: and the installation one
10:54:16 mdev: im going to try to run through the example with great lakes in tutorial to see if that makes this stuff clear to me
11:06:50 zl2tod: FrankW, did my question earlier make any sense ?
11:09:36 : * FrankW scans back.
11:10:03 FrankW: What question?
11:10:11 zl2tod: in a class object defined in a map file SYMBOL == 1, if I create a similar object using php mapscript SYMBOL is 0 ... what does it do anyway ? I note that the SYMBOL keyword in either case ends up setting SYMBOLNAME in the data structures
11:10:35 FrankW: Hmm, not an area I know a lot about. Let me skim the code.
11:14:19 zl2tod: you can look at the two variation's outputs at http://zl2tod.net:81/araneo/lines.php and http://zl2tod.net:81/araneo/map.php?site=99 ... layer Sites in the former is equivalent to layer pop in the second they each have one class and on style ( and I meant style object in the original question )
11:14:25 sigabrt: Title: LINES - New Zealand NZMS260 ( at zl2tod.net:81 )
11:14:34 zl2tod: shu bot :P
11:17:07 mdev: I'm trying to get the example map to load and I wrote a test php script and it works, but the resulting PNG comes out as a 300x400 blank
11:17:18 mdev: $map = ms_newMapObj( "../mapfiles/example1-1.map" );
11:17:18 mdev: $image=$map->draw( );
11:17:18 mdev: $image_url=$image->saveWebImage( );
11:17:18 mdev: ?>
11:17:47 mdev: anyone know what I screwed up?
11:18:13 FrankW: zl2tod: The code for reading a symbol in a mapfile is:
11:18:15 FrankW: http://trac.osgeo.org/mapserver/browser/trunk/mapserver/mapfile.c#L2134
11:18:22 sigabrt: Title: /trunk/mapserver/mapfile.c - MapServer - Trac ( at trac.osgeo.org )
11:19:06 FrankW: I see that symbol and symbolname are initialized to 0/NULL in initStyle( ).
11:19:18 FrankW: I'm afraid I don't follow the implications of the image( s ) you point to.
11:19:40 zl2tod: big structure dumps underneth the images
11:20:32 zl2tod: mdev, are all the data files referenced in the .map file found by mapserver ?
11:20:41 FrankW: zl2tod: So is the core of your issue that in php you areunable to set the style->symbol?
11:21:12 mdev: I think so, it's the example file, i downloaded the complete ZIP, I thought it was self contianed?
11:21:50 mdev: http://mapserver.org/tutorial/example1-1-map.html#example1-1-map
11:21:51 sigabrt: Title: Example1-1.map MapServer 5.4.2 documentation ( at mapserver.org )
11:22:03 mdev: this one but I downloaded it and the example data set to my server
11:22:05 FrankW: zl2tod: Anyways, I don't seem to have any special knowledge of the symbol stuff - I'm just digging through the code blind.
11:22:11 FrankW: I think I'd better stay out of this topic.
11:22:56 mdev: I changed the shap path to reflect the actual data path ( actually just changed it to a relative path ../data )
11:23:14 zl2tod: FrankW, thanks anyway ... I'me trying to figure out why it doesn't behave the same through mapscript as it does using a map file to make the same definition ... I don;t know whetyher the value for SYMBOL ( )/1 ) is the reason or not
11:23:27 zl2tod: ( 0/1 )
11:25:25 mdev: does mapserver load the map data in realtime or does it have to be re-cached or initiated?
11:27:23 zl2tod: haven't noticed any problems due to caching, if it happens
11:27:43 zl2tod: might be worth using explicit paths
11:27:52 FrankW: In normal ( cgi ) use, mapserver does not cache data between requests.
11:29:21 mdev: any idea why my PNG file with map is coming up white?
11:29:41 FrankW: mdev: I have not been following your issue, sorry.
11:30:16 mdev: I'm attempting to make the example1 file as per the tutorial but I am not using CGI but rather the mapscript for php
11:30:37 mdev: I resolved most failure issues and it seems to be executing now but the .png map comes up blank
11:31:13 mdev: this is the map file except I changed the shapepath to ../data
11:31:13 mdev: http://mapserver.org/tutorial/example1-1-map.html#example1-1-map
11:31:14 sigabrt: Title: Example1-1.map MapServer 5.4.2 documentation ( at mapserver.org )
11:31:29 zl2tod: anything in syslog or the webserver logs ?
11:31:50 mdev: I can check, what would get logged??
11:32:54 mdev: I was getting an error initially but I resolved it by chmoding 777 the web directory for now
11:33:04 mdev: but no errors beyond that
11:33:29 zl2tod: tried an explicit path for the data ?
11:34:02 mdev: you think that should matter? is the relative path relative to the map file?
11:35:44 zl2tod: dunno ... i've been using explicit paths, the example uses explicit paths
11:37:14 mdev: ok, trying that
11:37:32 mdev: same issue
11:37:33 mdev: blank PNG
11:37:44 mdev: when I initially had the wrong path, it just failed
11:37:58 zl2tod: there's a field in mapobj which sets the path to the data
11:37:59 mdev: but since I put relative or absolute, it works but returns blank PNG
11:38:38 mdev: BTW, in this part:
11:38:39 mdev: http://mapserver.org/tutorial/example1-1-map.html#example1-1-map
11:38:40 sigabrt: Title: Example1-1.map MapServer 5.4.2 documentation ( at mapserver.org )
11:38:40 mdev: woops
11:38:42 mdev: LAYER # States polygon layer begins here
11:38:42 mdev: NAME states
11:38:42 mdev: DATA states_ugl
11:38:42 mdev: STATUS OFF
11:38:42 mdev: TYPE POLYGON
11:38:56 mdev: does that DATA field have to have the file extension?
11:39:07 mdev: or does mapserver try the various accepted extensions itself automatically
11:39:35 zl2tod: status on might help
11:39:51 mdev: what does status do?
11:39:57 zl2tod: turns the layer on
11:40:01 zl2tod: so to speak
11:40:06 mdev: Ah, no kidding...
11:40:26 mdev: works now!
11:40:37 mdev: I thought the stuff in the example would have been on by default
11:41:23 mdev: perhaps the Status should be set to on in the example files so idiots like me wouldn't panic about it in the future?
11:41:47 zl2tod: i expect that cost me a day or two's head scratching too
11:45:41 zl2tod: mdev, here's a php function I've been using to explore some of the underlying data structures: http://pastebin.ca/1657292
11:45:42 sigabrt: Title: pastebin - mapserver php mapscript mapObj d - post number 1657292 ( at pastebin.ca )
11:47:15 zl2tod: http://mapserver.org/mapscript/php/index.html is essential ( if somewhat terse in spots ) reference too
11:47:16 sigabrt: Title: PHP MapScript MapServer 5.4.2 documentation ( at mapserver.org )
11:50:22 mdev: yeah, that one is helpful
11:50:32 mdev: the PHP stuff isn't so bad for me, I'm having more trouble with the back end stuff
12:26:38 CIA-8: dmorissette * r9520 /trunk/mapserver/ ( HISTORY.TXT mapserver.h ): Update for 5.6.0-beta5
12:27:53 CIA-8: dmorissette * r9521 /tags/rel-5-6-0-beta5/: Creating rel-5-6-0-beta5 release tag
12:28:07 CIA-8: dmorissette * r9522 /tags/rel-5-6-0-beta5/mapserver/: Tagging source as rel-5-6-0-beta5
12:29:00 CIA-8: dmorissette * r9523 /tags/rel-5-6-0-beta5/msautotest/: Tagging msautotest as rel-5-6-0-beta5
12:30:27 mdev: anyone from where the example maps pull the information for the map labels?
12:31:02 mdev: how would I change the labels if let's say I wanted to have a different language for the labels or manipulate the state names in some other way?
12:31:25 mdev: in the example, how can I chance Wisconsin to say foo?
12:48:42 CIA-8: dmorissette * r9524 /branches/branch-5-4/docs/download.txt: Added link to 5.6.0-beta5 download
12:51:12 CIA-8: dmorissette * r9525 /trunk/mapserver/HISTORY.TXT: Re-inserted 'current version' heading
13:31:48 zl2tod: mdev, that'll be in the data files, or perhaps you can manipulate the data with the methods in the mapscript docs I linked above, though that could be non-trivial
13:32:26 mdev: ok
13:32:47 mdev: right now I'm trying to work on loading a shapesfile that isn't the example and it's failing
13:32:52 mdev: I downloaded italy as an example
13:33:10 mdev: and I have files like italy_administrative.dbf, .prj, .shp, .shx
13:33:22 mdev: italy_coastline, italy_poi, italy_water
13:33:34 mdev: i'm working on setting up a map file
13:33:39 mdev: but for some reason it's coming out with a blank map or failing
13:33:43 mdev: Status is YES
13:34:39 mdev: I did:
13:34:42 mdev: >ogrinfo -summary italy_coastline.shp italy_coastline
13:34:48 mdev: to get the extent
13:34:52 zl2tod: there are lots of things to go wrong, have you set the extents sanely? what's the datum/projection of the data ?
13:34:53 mdev: ( 7.558719, 36.653076 ) - ( 18.513108, 47.094615 )
13:35:01 mdev: so i set:
13:35:37 mdev: EXTENT 7.558719 36.653076 18.513108 47.094615
13:36:08 mdev: i set the path to the directory that contains the files
13:36:17 mdev: and for DATA I set italy_coastline
13:37:01 mdev: mapfile has:
13:37:03 mdev: IMAGETYPE PNG^M
13:37:04 mdev: EXTENT 7.558719 36.653076 18.513108 47.094615^M
13:37:04 mdev: SIZE 400 300^M
13:37:04 mdev: SHAPEPATH "../italy"^M
13:37:04 mdev: IMAGECOLOR 255 255 255^M
13:37:13 mdev: LAYER # States polygon layer begins here^M
13:37:13 mdev: NAME italy^M
13:37:13 mdev: DATA italy_coastline^M
13:37:13 mdev: STATUS ON^M
13:37:13 mdev: TYPE POLYGON^M
13:37:32 mdev: basically I'm just changing stuff around from the example1 file to my new map but it's not working out for me
13:38:24 zl2tod: you'll probably get a lot of that, I do ; )
13:39:00 zl2tod: did the ../ work for you with the example data ?
13:39:04 mdev: yes
13:39:14 zl2tod: good to know
13:39:23 mdev: yeah so I got the example data to work
13:39:34 mdev: so i was trying to replace the data with some data I can download
13:39:39 mdev: and all I changed was paths
13:39:48 mdev: and extent
13:39:52 mdev: why doesn't work then?
13:41:10 mdev: does this mean anything to you?
13:41:12 mdev: Warning: [MapServer Error]: msDrawMap( ): Failed to draw layer named 'italy'. in /var/www/users/trainedparrot.com/www/dev/ms4w/apps/tutorial/htdocs/italy2.php on line 11
13:41:25 mdev: Warning: [MapServer Error]: msDrawShape( ): Only polygon shapes can be drawn using a POLYGON layer definition. in
13:42:02 zl2tod: there's a bunch of different layer types for holding different types of data
13:42:08 mdev: ah
13:42:12 mdev: how do i know what type?
13:42:17 zl2tod: nfi
13:42:28 mdev: is there a list of types in the docs?
13:43:19 mdev: nvmd, i think i foudn it
13:43:56 mdev: BINGO
13:43:59 mdev: changed to point and it worked
13:44:01 zl2tod: fairly comprehensive outline of layerObj here http://mapserver.org/mapscript/php/index.html#layerobj-class
13:44:02 sigabrt: Title: PHP MapScript MapServer 5.4.2 documentation ( at mapserver.org )
13:44:07 mdev: really badly but point worked
13:44:32 zl2tod: must go and bury this rat ...
14:57:11 mdev: the shape files I downloaded from OSM are not polygon for the outline of the country
14:57:28 mdev: does anyone know of a free/open repository of broad shape files for worldwide?
15:33:32 CIA-8: dmorissette * r9526 /branches/branch-5-4/docs/include/announcements.inc: Added 5.6.0-beta4 announcement
15:38:07 jmckenna: danmo: cool, will do a beta5 package, so we can hopefully get feedback
15:38:49 danmo: xcellent! thx
18:08:06 Schuyler: someone please remind me how to calculate cartographic scale from image resolution. if a sat image is 30m resolution, what's the maximum scale it can be rendered at without pixelation?