#MAPSERVER IRC Log - 2009-11-20

For logs after Feb 3, 2007, all times are GMT-8. Prior logs are GMT-9.
Back to Logs
03:47:01 strk: playing with PHPMapScript for the first time here. Can't do a simple thing: change status of a layer
03:47:28 strk: I open the map, $layer=$map->getLayerByName( 'xxx' ); $layer->status = MS_ON;
03:47:37 strk: then $map->draw( ) and output
03:47:56 strk: I've verified I can read the status before setting and it changes after setting ( 0 for OFF, 1 for ON )
03:49:39 strk: any idea what am I missing ?
03:54:32 strk: $map->save( ) also doesn't find the layer status changed
03:56:21 strk: $layer->updateFromString( 'LAYER STATUS ON END' ); // <--- fixed
03:57:00 strk: http://mapserver.org/mapscript/php/index.html#layerobj-class
03:57:01 sigabrt: Title: PHP MapScript MapServer 5.4.2 documentation ( at mapserver.org )
03:57:21 strk: it isn't clear from the document above.... ( that assigning to layerObj properties have NO effect.. )
03:57:52 strk: also, fetching $layer->status *after* using ->updateFromString( 'LAYER STATUS ON END' )
03:57:59 strk: shows that value is NOT changed
03:58:05 strk: pretty confusing to me
04:47:05 ue: strk, here ?
04:47:40 ue: you do not assign the property correctly, $layer->set( 'status', MS_ON );
05:05:37 CIA-80: aboudreault * r9557 /trunk/mapserver/maporaclespatial.c: Fixed segmentation fault when oracle OCILogon( ) fails
05:57:51 mdev: is Scaledenom relative to the map extent or the zoom level?
05:59:11 mdev: if I set a broad extent and then $map->zoompoint to something smaller, then how come this doesn't work?
05:59:14 mdev: $layer->set( "symbolscaledenom", 200 );
06:05:34 ue: mdev, property symbolscaledenom does not exist
06:05:46 mdev: oh what did i say
06:05:49 mdev: I meant maxscaledenom
06:05:59 mdev: but that samd problem though
06:06:26 mdev: $layer->set( "maxscaledenom", "50" );
06:06:41 mdev: even when set to 0 or 1 the layer continues being drawn at any scale
06:06:45 ue: maxscaledenom - will turn off the layer after a certain scale
06:07:03 ue: in your it will turn it off after 1:50 and I really doubt that 50 is the value you want
06:07:10 mdev: I know it should... when I made mapfiles it did
06:07:15 mdev: but in mapscript it keeps showing up
06:07:35 mdev: if I put 50, it means the layer should dissapear at most realistic scales... but it still shows up
06:07:41 jmckenna: mdev: personally, the best advice i could give to someone to understand scale is to add a [scaledenom] control in a very simple CGI template ( http://www.mapserver.org/cgi/controls.html )...then you will be able to see the MapServer scale and understand it ( this is how I came to understand it, anyway )
06:07:42 sigabrt: Title: MapServer CGI Controls MapServer 5.4.2 documentation ( at www.mapserver.org )
06:07:44 mdev: I'm trying to start by getting it to dissappear and then working the scale in
06:08:07 mdev: the thing is it worked for me in mapfile and I understood it
06:08:12 mdev: btu in mapscript it's failing
06:08:15 mdev: it doesn't do anything
06:08:22 mdev: that's why I can't understand
06:08:32 ue: 50 is by the the most unrealistic scale, it means in 1cm on map is 50cm in the real world
06:08:59 mdev: I know that... I will set the value later but if it worked then it shouldn't show up at all but it does
06:09:01 ue: *by far
06:09:03 jmckenna: well that's my advice : )
06:09:11 mdev: assefa my man...
06:09:16 jmckenna: lol
06:09:22 mdev: we're trying to figure out why $layer->set( "maxscaledenom", "50" );
06:09:28 mdev: isn't making the layer dissappear
06:10:18 ue: echo $this->scaledenom; //$layer->set( "maxscaledenom", "50" );
06:10:34 ue: and see at what scale you are currently viewing
06:10:46 mdev: doing that already
06:10:54 mdev: 23682878
06:11:03 ue: see no 50
06:11:05 ue: *bot
06:11:07 ue: *not
06:11:07 mdev: so why wouldn't the layer always dissapear if i set 50
06:11:08 ue: damn
06:11:24 mdev: or 1 or 0 or whatever
06:11:29 ue: cuz you are setting: Show the layer only if scale is SMALLER then 50
06:11:36 ue: and your scale is bigger then 50
06:11:52 mdev: yes... so why does it keep showing the layer!
06:12:25 ue: oh : )
06:12:49 mdev: I know... it's pissing me off
06:12:55 jmckenna: what happens in a CGI simple viewer with maxscaledenom 50 set?
06:12:59 mdev: cause I tried min and max and different nums
06:13:03 ue: can you pastebin the php code ?
06:13:09 jmckenna: or, shp2img?
06:13:13 mdev: it's kinda long
06:13:20 jmckenna: what does your layer look like?
06:13:20 mdev: let me see if I can cut down to relative stuff
06:13:27 ue: reduce it too a small test case
06:13:32 mdev: well there's different ones
06:13:36 mdev: but some of them are cities
06:13:40 mdev: a point with a label
06:13:49 mdev: and I don't want them showing up if you zoom out
06:14:13 jmckenna: and what happens with shp2img at a very zoomed in extent?
06:14:28 jmckenna: ( or zoomed out, whatever u are trying for )
06:14:28 mdev: dunno what is shp2img
06:14:42 jmckenna: shp2img is your saviour
06:14:45 jmckenna: mine anyway ha
06:15:01 jmckenna: commandline utility that comes with mapserver
06:15:08 mdev: oh
06:15:12 mdev: what do you do with that?
06:15:19 jmckenna: http://www.mapserver.org/utilities/shp2img.html
06:15:20 sigabrt: Title: shp2img MapServer 5.4.2 documentation ( at www.mapserver.org )
06:15:29 jmckenna: i use it for all testing
06:15:33 jmckenna: and debugging
06:15:44 jmckenna: for problems like yours, on client machines
06:15:46 mdev: oh
06:15:51 mdev: but that doesn't debug mapscript
06:16:05 mdev: I got all the macscaledenom stuff working just fine directly from a mapfile
06:16:22 jmckenna: but it debugs what should be happening...makes sure...well i can't force you
06:16:22 mdev: it's only a problem from mapscript
06:16:24 jmckenna: no worries
06:16:32 jmckenna: carry on : )
06:16:39 ue: mdev, if all works fine in cgi mode, most likely you are making some kind of error in your php code
06:16:48 jmckenna: exactly my point
06:16:49 mdev: probably
06:16:53 mdev: but everythign else works
06:16:54 jmckenna: but whatever : )
06:16:55 ue: *by cgi I mean just read from map file
06:16:59 mdev: everything but scaeldenom is working fine
06:17:13 ue: if you paste a test case of the php code
06:17:24 ue: where it does not work, we can look at it and help with the error
06:17:40 mdev: ok, that may take me a while to prep cause everything is in functions and going from DB so I gotta recompile into a static script
06:17:54 mdev: so gimme a few mins to get that ready
06:18:25 assefa: mdev: maybe after you have done setting the scales with php you could save your map file. It might give you a hint. and you could use tools like shp2img to see what is wrong
06:18:49 mdev: you mean to make mapscript output what it is doing into a mapfile?
06:19:06 mdev: is there a way to do that?
06:19:16 assefa: use mapscript to map->save( "mymapfile.map" )
06:19:26 mdev: I thought save saves to image?
06:20:08 assefa: you can save the map object into a map file using map script
06:20:19 mdev: cool, i'll try that first
06:20:23 Lucent-S: i have an LCC raster with four points for its corners and no embedded georeference. i can't use EXTENT because i need to specify 8 different numbers rather than just 4
06:21:30 jmckenna: Lucent-S: for what software do you need 8 numbers for your extents? maybe i am not understanding your problem
06:21:49 Lucent-S: to put in the .map file
06:22:03 jmckenna: 4: minx miny maxx maxy
06:22:26 Lucent-S: and it'll deal with everything in reproject?
06:22:56 Lucent-S: <dt>31-52-34.6N 101-09-02.9W</dt>
06:22:56 Lucent-S: <dt>32-01-32.3N 092-32-53.2W</dt>
06:22:56 Lucent-S: <dt>35-08-58.8N 092-26-43.1W</dt>
06:22:56 Lucent-S: <dt>34-59-35.9N 101-24-30.2W</dt>
06:23:09 Lucent-S: normally some of the numbers are the same
06:23:20 jmckenna: i guess i don't understand the problem. what does gdalinfo report?
06:23:20 Lucent-S: so just take the high and low and i'll still line up?
06:23:27 Lucent-S: there's no embedded georeferencing
06:23:44 Lucent-S: all i have are the corners
06:24:14 mdev: $map->save( "./test.map" );
06:24:14 mdev: Fatal error: [MapServer Error]: msSaveMap( ): ( ./test.map )
06:24:37 mdev: and the directory is writable
06:25:42 jmckenna: same for full path?
06:26:25 mdev: ok that worked... weird that relative didnt work
06:26:26 mdev: tnx
06:26:41 jmckenna: np
06:27:25 mdev: wow this is really cool... you get a mapfile from mapscript... nifty
06:27:53 mdev: I know I know, only a total geek can get excited at having a 10,000 line mapfile output by mapscript
06:29:42 mdev: the units dosen't affect maxscaledenom does it?
06:30:42 jmckenna: what happens when you use that mapfile with shp2img?
06:30:48 mdev: just abuot to try
06:30:54 jmckenna: excellent
06:31:32 mdev: shp2img not found!!!????
06:31:53 mdev: nooooooo
06:31:57 jmckenna: it should be where you compiled it
06:32:14 jmckenna: you may have to add its location to your env or path
06:32:31 mdev: nope... find / -name shp2img -print
06:32:32 mdev: nada
06:32:32 jmckenna: compiled mapserver, i mean
06:33:13 mdev: I didn't compile it though... I installed it from an OpenBSD package
06:33:20 jmckenna: the mapserv utils are compiled by default when you compile mapserver. did you compile mapserver or is this from some package?
06:33:24 jmckenna: lol yup
06:33:29 mdev: is shp2img default in compile settings or is it an add on option?
06:33:46 jmckenna: default
06:33:46 mdev: oh i need the utils... that's another package
06:33:49 mdev: let me go grab that
06:33:56 mdev: keyword was utils!
06:35:04 mdev: bingo
06:35:51 jmckenna: now u can use shp2img to debug..now u can see what i meant earlier : )
06:36:39 jmckenna: have fun
06:37:40 ue: Quick question, I asked a question on mapserver-dev list and got no comments in 4 day ? is that a bad place to post ? shoud I write an "enchantment" ticket ?
06:37:49 ue: the question was about symbols lazy loading
06:39:25 hobu: Steve needs to answer it, and he might not be around
06:39:54 ue: oh, thanks for feedback, will keep wating
06:41:50 : * FrankW contemplates the idea of an enchantment ticket...
06:43:31 ue: *Enhancement, sorry : )
06:46:37 FrankW: I knew what you meant, but the idea of an enchantment ticket is still appealing.
06:55:02 mdev: hey, with shp2img, can I have the debug output go to stdout instead of the image?
06:55:28 FrankW: mdev: normally debug output will go to stderr with shp2img.
06:55:38 mdev: i can't do:
06:55:42 FrankW: shp2img -all_debug 1 -m abc.map -o out.png
06:55:52 mdev: shp2img -m test2.map -o ../www/test.png -all_debug 3 | more
06:55:54 mdev: ?
06:56:10 FrankW: Depending on your shell you could do:
06:56:19 FrankW: shp2img -m test2.map -o ../www/test.png -all_debug 3 |& more
06:56:43 FrankW: I think on bash you would have to use something a bit different, but I'm a C shell throwback.
06:56:46 jmckenna: debugging examples are documented on http://www.mapserver.org/utilities/shp2img.html
06:56:47 sigabrt: Title: shp2img MapServer 5.4.2 documentation ( at www.mapserver.org )
06:57:01 mdev: yeah but none of them store the output
06:57:07 mdev: and mine flies by too quick to check
06:57:09 jmckenna: ok sorry
06:57:14 mdev: np
06:57:22 FrankW: You can also obviously just redirect to a file.
06:57:26 FrankW: shp2img ... >& log
06:57:27 FrankW: more log
06:57:57 jmckenna: yeah i pipe it often also
06:58:22 mdev: piping it isn't working for me though it keeps spitting everything out on screen really fast
06:58:45 mdev: how come there's no argument to output a debug file rather than an image?
06:59:22 FrankW: mdev: are you on windows?
06:59:29 mdev: no
06:59:59 mdev: let me try in c shell
07:00:00 FrankW: Well, then redirection can be made to work. It's hard for us to answer "how come it didn't work" though.
07:00:14 mdev: bingo
07:00:27 mdev: works in c shell the way you described it but not in KSH weird
07:00:54 FrankW: KSH is similar to bash/bourne shell etc in how redirection is handled.
07:01:02 mdev: yeah
07:01:12 FrankW: I use csh mostly just so I can easily pipe stderr without gunk
07:01:13 mdev: but usually | more works pefcectly or > file
07:01:23 mdev: ok
07:01:27 FrankW: | and > only work for stdout, not stderr.
07:01:44 mdev: ah, so what's the proper way to pipe stderr?
07:01:51 mdev: I thought there's a way to do it but really don't remember
07:02:20 FrankW: Something like "shp2img ... 2>1 | more"
07:02:26 FrankW: but that's not exactly it I don't think.
07:02:33 FrankW: I end up digging for it every time I want to do it.
07:02:40 mdev: I know how you feel
07:04:36 mdev: damn... debug doesn't seem to help me at all... all it did was return this error for every layer and that's about it:
07:04:39 mdev: [Fri Nov 20 13:45:58 2009].19253 msSearchDiskTree( ): Search returned no results.
07:04:39 mdev: Unable to open spatial index for /var/www/htdocs/ledger/www/maps/mapfiles/./../
07:04:39 mdev: world4/world.qix. In most cases you can safely ignore this message, otherwise ch
07:04:39 mdev: eck file names and permissions.
07:06:26 FrankW: does the .qix exist?
07:06:31 mdev: nope
07:06:34 mdev: does it have to?
07:06:39 FrankW: no
07:06:51 mdev: then that explains it
07:06:55 FrankW: As the message mentions, you can safely ignore the message in most cases.
07:07:00 mdev: yaeh
07:07:07 mdev: well it didn't help for my denom issue
07:07:38 mdev: im gonna work on a sample to show you guys and maybe someone can help me figure out the problem
07:07:46 mdev: thanks to everyone for your help... you guys are awesome
07:28:47 mdev: ok FrankW, jmckenna, assefa, ue, I put the source online and perhaps you can take a look and let me know why maxscaledenom is so problematic?
07:28:51 mdev: http://newledger.lodestarny.com/maps/www/mapscript.php
07:30:44 mdev: I tried to "dumb it down" to get rid of most of the functionality just to get a working example of the issue... if it isn't clear i suppose I could dumb it down some more and get rid of the functions but it's really the same either way
07:31:21 mdev: oh and let me add... here is the working example:
07:31:21 mdev: http://newledger.lodestarny.com/maps/www/world10.php?zoom=2
07:31:22 sigabrt: Title: Example 1: Displaying a map ( at newledger.lodestarny.com )
07:31:51 mdev: you can push zoom in and zoom out and you will see the feature never dissappers when zooming outward or in
07:33:19 : * hobu suggests reframing the problem to "how do I use openlayers with WMS?" rather than writing it all yourself
07:33:33 hobu: Does MAXSCALEDENOM work when you take php out of the equation?
07:33:40 mdev: yes
07:33:59 hobu: If it does, when you do map->save( 'mymapfile.map' ), is it properly saved?
07:34:07 hobu: what version of stuff are you using
07:34:07 mdev: yes
07:34:25 mdev: 5.4.0
07:34:26 hobu: Do not continually ping people who've helped you in the past.
07:34:39 hobu: they'll start avoiding you ; )
07:34:43 jmckenna: : )
07:34:53 mdev: so that's where everyone went!
07:35:27 FrankW: It is somewhat presumptuous.
07:35:40 hobu: it's possible there's a bug with the *denom stuff in php mapscript
07:35:52 mdev: here is the resulting map file from the mapscript I madeL
07:35:52 mdev: http://newledger.lodestarny.com/maps/www/test2.map
07:36:10 mdev: the layer with maxscaledenom issue is at the end
07:36:45 hobu: sure you don't want minscaledenom? I get these all kinds of mixed up
07:36:57 mdev: so now you can see mapscript file, working example. and mapfile
07:37:03 mdev: I've tried both just in acse
07:37:04 mdev: case
07:37:05 mdev: lol
07:37:14 mdev: neither works at any level
07:37:19 hobu: you can't set them both on a layer to the same value
07:37:27 hobu: well, you can, but it doesn't make much sense
07:37:31 mdev: I know... i've tried one then other just in case
07:37:38 mdev: but that didn't hel[
07:37:39 mdev: help
07:37:56 mdev: and with maxscaledenom at 50... london should practically always dissappear
07:37:59 mdev: but it doesnt
07:38:21 hobu: your units don't match
07:38:34 hobu: I wonder if mapserver's trying to use units in scale calculations
07:39:17 jmckenna: could be, i personally never include units in a layer definition
07:39:36 mdev: well yeah... why should units affect it either way?
07:41:21 hobu: min|maxscaledenom is a ratio. It is assumed both the denominator and the numerator are the same units. If your map is in one unit and your layer is in another, mapserver may be doing the conversion for you
07:41:50 mdev: im trying to change units around and see if it helps
07:41:52 mdev: not helping so far
07:42:27 hobu: but this might be a WAG too. It really shouldn't matter because it should be based on the extent units of the layer
07:42:51 jmckenna: maybe if you can create a tiny ( no objects but one layer ) mapfile with a small ( tiny again ) clip of one data layer and zip it we can try locally for you?
07:43:08 mdev: ok you know what is weird... I made a phpscript to just display that test file that was output by PHP and it does not show the london layer all together
07:43:16 mdev: even if I comment out maxscaledenom in the resultant mapfile
07:43:58 mdev: yet the very php mapscript that has the denom issue DOES show london on the map
07:44:19 : * hobu steps out for a while
07:47:38 mdev: ok, I discovered that the POINT I draw in php mapscript does NOT get output to saved mapfile as a feature
07:47:54 mdev: when I added it as FEATURE to the resultant mapfile, maxscaledenom works properly on the mapfile
07:48:00 mdev: does this mean anything?
07:50:50 mdev: what is the realationship between PointObj in phpmapscript and FEATURE in mapfile?
09:05:22 CIA-80: sdlime * r9558 /trunk/mapserver/ ( 7 files in 3 dirs ): Added simplfy and topologyPreservingSimplify to MapScript ( #2753 )
09:16:01 jmckenna: mdev: problem solved?
09:39:23 mdev: sorry, i stepped out for lunch
09:39:28 mdev: no, problem not solved
09:40:01 mdev: I do understand maxscaledenom and it works for me from mapfile but not in mapscript so clearly the problem lies somewhere in mapscript or my use there
09:44:37 jmckenna: can u package a small ( one layer ) mapfile ( no other objects ), with a small clip of the one data file, and a very small php file ( open map object, set maxscaledenom, save ) and we can test?
09:47:23 mdev: I had the longish one I posted before
09:47:26 mdev: I dunno if you saw it
09:47:45 mdev: the problem is that the php file does not export a FEATURE for the Point I set
09:48:03 jmckenna: longish is not good to get people to help for free. k i'm only asking, no worries
09:48:05 mdev: there seems to be a lack of cross compatibility between PointObj and FEATURE
09:48:42 mdev: when I save a mapfile from mapscript... it comes up missing the feature
09:48:56 jmckenna: you might also try the mapserver-users or dev mailing list, if you are not finding help here also.
09:49:00 mdev: can anyone explain that? if I fill the feature in on mapfile, then maxscaledenom works
09:49:09 mdev: isn't it basically the same people?
10:41:09 mdev: how is it possible that the resultant image of php mapscript can be different than the one rendered by the saved mapfile created from that mapscript?
10:48:09 ue: creating a script that isolates your issue would help you and other a lot in understanding whats the problem
10:48:22 mdev: doing that right now, almost done
10:48:39 mdev: I'm really trying to trash everything from it except the specifics for this
10:48:48 ue: would be great
10:48:53 mdev: I thought I might resolve it myself by getting rid of the extra stuff but it's still the same issues
10:49:00 mdev: in about 5 mins I'll have nothing but bare bones
10:49:04 mdev: for it
10:59:09 mdev: Ok, I have a nice clean working example now of my problem. Here is the resulting image where London still shows up even with a ridiculously small mascaledenom set: http://newledger.lodestarny.com/maps/www/mapsimple.php
10:59:10 sigabrt: Title: Example 1: Displaying a map ( at newledger.lodestarny.com )
10:59:34 mdev: then here is the source for everything, the php, the mapfile, and the output mapfile by saving it:
10:59:34 mdev: http://newledger.lodestarny.com/maps/www/mapsimple_source.html
11:00:31 mdev: so according to mapscaledenom, the layer should not be drawn at any reasonable scale yet the layer still shows up... who can help me figure out the problem?
11:01:03 mdev: ue are you still around?
11:02:19 ue: yes
11:02:38 ue: gime a a min to try something
11:02:58 mdev: sure thing, let me know if you need any more info or files from me
11:03:45 mdev: just so you know I replaced opening < with [ so that html wouldn't interpret the stuff as code
11:05:46 ue: try adding your point like this: http://pastie.org/708080
11:05:47 sigabrt: Title: #708080 - Pastie ( at pastie.org )
11:06:35 mdev: ok, sure will
11:06:37 mdev: is there a difference?
11:06:40 mdev: was I adding it wrong?
11:07:19 mdev: do I still have to do $point->draw?
11:07:23 ue: nope
11:07:32 mdev: then how can I set the point label?
11:07:43 mdev: the actual text
11:07:44 mdev: inline
11:08:16 ue: try this and if it works, will get to the label : )
11:08:29 mdev: ok
11:08:36 mdev: Fatal error: Object has an invalid _handle_ property in on line 45
11:08:40 mdev: $pointShape->add( $point );
11:10:23 ue: can I see the modified source ?
11:11:19 mdev: you said MS_SHAPE_POINT
11:11:22 mdev: isn't it MS_SHP_POINT?
11:11:47 mdev: shapefileObj ms_newShapefileObj( string filename, int type )
11:11:54 mdev: I think we're missing an argument
11:12:05 mdev: for
11:12:08 mdev: $pointShape = ms_newShapeObj( MS_SHP_POINT );
11:12:28 mdev: oh woops
11:12:31 mdev: wrong object
11:12:32 mdev: sorry
11:12:41 mdev: nvmf
11:12:46 mdev: nvmd I'm wrong and you're right
11:13:09 ue: no need replace the sutff, just make a sym link to your file
11:13:14 ue: with .phps extension
11:13:25 mdev: ah ok
11:13:27 mdev: let me do that for you
11:14:20 mdev: beautiful
11:14:21 mdev: http://newledger.lodestarny.com/maps/www/mapsimple.phps
11:17:15 mdev: it looks like $pointShape->add( $point ) is the issue because:
11:17:15 mdev: int add( lineObj line )
11:17:15 mdev: Add a line ( i.e. a part ) to the shape.
11:17:22 mdev: add takes a lineObj?
11:18:22 ue: yes, try to add your point to a line
11:18:27 ue: and the line to the shape
11:19:07 mdev: what would be the other end of the line? the same point?
11:19:10 mdev: is that possible?
11:20:32 mdev: ok i added a single point to line
11:20:47 ue: http://pastie.org/708090
11:20:48 sigabrt: Title: #708090 - Pastie ( at pastie.org )
11:20:51 mdev: now nothing shows up
11:20:59 mdev: for point i mean
11:21:18 ue: now remove maxscaledom
11:21:20 mdev: ok I basically did what your example says
11:21:22 ue: and see if it shows up
11:21:26 mdev: actually type should be line now?
11:21:34 ue: nope
11:22:04 mdev: i commented out scaledebom
11:22:07 mdev: and no point shows up
11:22:12 mdev: you need the link again or you have it?
11:23:13 ue: have it
11:23:56 mdev: i commented scaledenom until we can get shapeobj to show up again for that city symbol
11:24:13 mdev: so we don't confuse whether it's a scaledenom working or just not shownig up that is
11:26:29 ue: k
11:28:03 ue: can you see how your mapfile is saved now ?
11:28:11 ue: did it add FEATURES ?
11:28:14 ue: to this layer
11:28:14 mdev: yes
11:28:18 mdev: it did
11:28:32 mdev: http://newledger.lodestarny.com/maps/www/world11.php
11:28:33 sigabrt: Title: Example 1: Displaying a map ( at newledger.lodestarny.com )
11:28:41 mdev: this is pulling from the mapfile that was output by the new mapscript
11:29:02 ue: k, good
11:29:02 mdev: so what is weird is that the point shows up on the mapfile and works from there but not from mapscript
11:29:16 ue: what version of mapscript you have btw ?
11:29:34 mdev: I moved map draw after the layer was added which fixed that
11:29:47 mdev: 5.4.0
11:30:00 mdev: ok, i moved draw so now the point shows
11:30:15 ue: remove this drawLabelCache
11:30:21 mdev: and scaledenom works now
11:30:34 mdev: ok and i commented labelcaeh
11:30:53 ue: oh lols draw should be at the end :D
11:31:07 ue: k, try to play with scaledom now
11:31:18 ue: and see if the point shows/hides
11:31:32 mdev: sorry
11:31:36 mdev: spoke too soon
11:34:27 ue: I see the scaledenom works now
11:34:39 ue: now just need to label your feature
11:34:42 mdev: yeah
11:34:53 mdev: and how do you label a shape?
11:34:57 mdev: I was used to labeling point
11:35:42 mdev: is it just string text?
11:35:44 ue: gimme a sec, I usually do all this stuff from postgis so need to looku pthe syntax
11:36:04 mdev: shape->set( "text", "London" )?
11:36:38 mdev: BINGO!
11:36:50 ue: great
11:37:21 mdev: now wait a sec... let me make sure it hides with scaledenom
11:37:36 ue: : )
11:37:40 mdev: it does
11:37:45 mdev: ok this is awesome
11:37:47 mdev: you're the man
11:38:02 mdev: so tell me how come it didn't work the way I had it but this way it does? I'm really just curious
11:38:10 mdev: cause the other way did work for everything but scaledenom
11:38:17 ue: I am not really sure about this I never used draw
11:38:27 ue: but i think it "PLOTS" it on the map
11:38:36 ue: and does not really care about additional checks
11:38:44 mdev: ok, well I really really appreciate your help in figuring this one out
11:38:50 ue: np
11:38:51 mdev: this has been bothering me several days now
11:39:02 mdev: now I have the tools to go back and work this back into my scripts to fix the features
11:39:04 ue: in any case, using features is better
11:39:10 mdev: will take a while to change everything to this method but will be able to do it
11:39:27 mdev: I know... I used features on mapfiles and couldn't figure out how to in mapscript
11:39:29 jmckenna: mdev: maybe you could add your examples to the documentation wiki for mapscript: http://trac.osgeo.org/mapserver/wiki/PHPMapScript
11:39:30 sigabrt: Title: PHPMapScript - MapServer - Trac ( at trac.osgeo.org )
11:39:37 mdev: sure I will
11:40:04 mdev: do I need to sign up or can just post as guest?
11:40:16 FrankW: you need to sign up.
11:40:37 FrankW: but one osgeo userid can be used for all trac instances.
11:40:42 mdev: ok
11:42:34 ue: mdev, if you store your point in a database better just use the database table as a layer
11:42:57 mdev: well I'm having php do presorting and stuff from a mysql DB
11:43:09 mdev: I'd rather just have PHP pass the points into mapscript as needed
11:43:36 mdev: I have the point in different languages as well so php has to pick and chose depending on scenarios
11:44:05 mdev: ok, this is a retarded question but after signing in, how do I add an example?
11:44:28 ue: all this can be done in a database, if your database is spatially enabled it's even easier to work with it from mapserver
11:44:57 ue: and it's a scalable solution, you will run into performance problems then you will have lots of points
11:45:00 mdev: btw this is the example that messed me up and made me do the points the way I did!!!
11:45:01 mdev: http://trac.osgeo.org/mapserver/wiki/PHPMapScriptAddPoint
11:45:03 sigabrt: Title: PHPMapScriptAddPoint - MapServer - Trac ( at trac.osgeo.org )
11:45:23 jmckenna: no time like the present to write your own then : )
11:45:33 ue: about the languages, simple text case : gid, the_geom, name_en, name_ru, name_fr
11:45:48 ue: then pass query select gid, the geom name_{$language} as label
11:46:07 ue: and in mapserver specify the table and set label column as text for your label
11:46:19 mdev: ok
11:46:33 mdev: I'll check that out next
11:46:48 mdev: but in the meantime, how do I edit the wiki page and add an example?
11:46:56 jmckenna: press edit
11:47:09 jmckenna: bottom of page
11:47:12 jmckenna: : )
11:47:18 mdev: I see that, but what if I'm adding a new page?
11:47:26 jmckenna: phew
11:47:49 jmckenna: copy previous line, paste
11:47:55 jmckenna: ctl-c ctl-v
11:48:09 mdev: I understand I understand... but where do I put my stuff?
11:48:12 jmckenna: edit accordingly
11:48:16 mdev: that's just for the link though
11:48:24 mdev: but what about creating a new example page?
11:49:25 jmckenna: since u are new to wikis, have u tried to read any of the help available? http://trac.osgeo.org/mapserver/wiki/TracWiki
11:49:26 sigabrt: Title: TracWiki - MapServer - Trac ( at trac.osgeo.org )
11:49:52 jmckenna: ( i had to read it also )
11:49:57 mdev: ok
11:50:06 mdev: I just write php and html... this is so much harder
11:50:07 mdev: lol
11:50:19 jmckenna: it seems so
11:50:34 mdev: ah you have to create the link PRIOR to creating the page
11:50:36 mdev: that is bizzarre
11:50:38 mdev: ok
11:50:57 jmckenna: true true...once u get it it'll be easy
11:51:38 jmckenna: welcome to the world of the wiki : ) good friday fun
11:54:53 mdev: BTW, no one is going to care that I basically plagiarized other examples for some of my code here for my example?
11:55:06 mdev: I used to copy/paste stuff from other examples to get mine started
11:55:51 jmckenna: of course...i'm a big copy/paste guy myself ha. no you have nothing to worry...the wiki is for sharing...but please credit yourself like others have
11:56:42 jmckenna: or, you can mention where you copied from ( u can point them back to other page...u might have to read how to do links in help )
11:56:57 jmckenna: but really it is ok without links
12:01:22 mdev: tada:
12:01:23 mdev: http://trac.osgeo.org/mapserver/wiki/PHPMapScriptAddPointScale
12:01:24 sigabrt: Title: PHPMapScriptAddPointScale - MapServer - Trac ( at trac.osgeo.org )
12:02:02 jmckenna: can you add your name like others did, in case someone has questions?
12:02:04 mdev: really appreciate everyone's help here, especially ue... I couldn't have solved this one on my own cause I had a working point ( from example!!! ) and could think of no other way of showing it
12:02:26 mdev: ask me questions??? do I look like the kind of guy who knows what he is doing!? LOL!!
12:02:31 jmckenna: and thanks for recording..it'll help someone else somday
12:02:50 mdev: yeah... if I saw that example, I wouldn't have done it wrong the whole time and ran into this problem
12:02:57 jmckenna: : ) you're a maxscaledenom phpmapscript expert now ; )
12:03:09 jmckenna: cool
12:03:42 mdev: the whole problem was not around maxscaledenom but rather the way the point was being created
12:03:49 jmckenna: ah
12:03:50 mdev: well now that's solved and maybe the example will help
12:03:59 mdev: thanks again to everyone, I'm gonna go sleep or something cause my brain is fried
12:04:11 mdev: better yet... maybe just get laid :D
12:04:20 jmckenna: thanks for wikifying
17:45:33 zesoze: hi .. How can get more informations about points...I am reading about getFeatureInfo but I don't know if I can get this informations from a database...is there a way to do it?
18:06:20 zesoze: I get this error when I try use getfeatureinfo: msWMSFeatureInfo( ): WMS server error. Requested layer( s ) are not queryable.
18:06:35 zesoze: anybody knows what it could be?
18:07:20 FrankW: zesoze: I believe that means you haven't taken the steps necessary to enable query support on the layers.
18:07:43 FrankW: It *may* include steps like adding "DUMP TRUE" in the layer, and providing a template for the layer ( even a fake one ).
18:08:03 zesoze: I did it
18:08:03 FrankW: I would suggest reading around in the docs about query to try and find out to enable it.
18:08:37 zesoze: I create a template and put TEMPLATE in my layer file
18:08:51 zesoze: I need to set another parameter im my wms server files?
18:09:09 jlivni: zesoze: you perhaps did not do all the things in the LAYER that are required. such as the "dump true" that frankw mentioned. etc.
18:09:31 zesoze: but dump true is only for gml files, ok?
18:09:43 FrankW: I also vaguely recall something about a gml_include_items metadata item that might be used when getfeatureinfo is returning gml features.
18:09:47 FrankW: Or perhaps that only applies to WFS.
18:09:55 FrankW: I'm no expert - just trying to give clues.
18:09:55 jlivni: ( only wfs i think )
18:11:27 zesoze: Can I paste my wms.map file and strobs.lay ?
18:11:38 jlivni: not in here - try dpaste or something similar
18:11:43 zesoze: YES
18:11:45 zesoze: yes
18:14:13 zesoze: http://pastebin.ca/1680435
18:14:14 sigabrt: Title: pastebin - Someone - post number 1680435 ( at pastebin.ca )
18:14:54 zesoze: what do you think?
18:16:30 jlivni: i think template gues under LAYER
18:16:40 jlivni: /s/gues/goes
18:17:12 jlivni: ( you have it under CLASS )
18:17:23 FrankW: There is such a thing as a class template, but I'm not sure the "isqueriable" checking in mapserver looks for it.
18:17:34 FrankW: So I'd duplicate it, once in the class and once in the layer.
18:17:45 jlivni: ah, interesting, i had no idea
18:18:04 jlivni: actually i never use getfeatureinfo since i'm such a featureserver addict. but i used to, and never knew about class template
18:18:10 FrankW: I'm not certain
18:18:34 FrankW: I think class templates are for when you want different classes to return different organizations of query results.
18:19:01 jlivni: makes sense
18:19:03 : * jlivni heads out
18:19:15 zesoze: hum yes
18:19:24 zesoze: I will try this
18:20:41 zesoze: nothing
18:21:54 zesoze: it does not work
18:23:01 FrankW: oh
18:23:09 zesoze: oh..I will call a php script to searching in data base about a clicked feature...I think that getfeatureinfo won't work
18:23:13 zesoze: in this case
18:24:31 FrankW: It seems like exactly what it is intended to be used for, but I don't care to dig into the issue myself.