From ferencik.ioan at PERSONAL.RO Fri Apr 1 00:18:25 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Fri, 1 Apr 2005 11:18:25 +0300 Subject: New User Message-ID: Hi list, I am a new user of Mapserver an I am running the MS4W from DM Solutions/Maptools.org Mapserver/Apache/PhpMapScript. I encountered some problems with this map file: MAP IMAGETYPE PNG24 EXTENT 382625 577088 404045 595508 FONTSET "fonts/fonts.list" SIZE 1000 1000 SHAPEPATH "date" IMAGECOLOR 255 555 255 TEMPLATEPATTERN "index" PROJECTION "init=epsg:31700" END # Start of LAYER DEFINITIONS --------------------------------------------- LAYER # layer de tip raster NAME dem DATA "cj.tif" TYPE RASTER PROJECTION "init=epsg:31700" END STATUS default PROCESSING "BANDS=1,2,3" END #--sfarsit layer de tip raster LAYER # States polygon layer begins here NAME test DATA strazi STATUS DEFAULT TYPE LINE PROJECTION "init=epsg:31700" END #CLASSITEM "NAME" LABELITEM "NAME" CLASS COLOR 255 255 190 LABEL COLOR 0 0 0 TYPE TRUETYPE FONT arial SIZE 8 POSITION LL PARTIALS true MINDISTANCE 300 #BUFFER 4 END END END # End of LAYER DEFINITIONS ------------------------------- WEB IMAGEPATH "c:\ms4w\rosia\tmp\ms_tmp\" IMAGEURL "c:\ms4w\rosia\tmp\" TEMPLATE 'index.html' END END # end of map file/object I can display the map In IE in map mode but when i substitute the browse mode with the folowing template: Aplicatie Mapserver

Aplicatie Mapserver


In browse mode i see only a blank image but i can still pan through this image....Mapserver seems to work. Smae results on Mandrake Linux with same mapfileand template. I think i am missing something. Any suggestions? Thanks _____________________________________________ Castiga peste 1000 de premii cu Wella Design! http://wella.boom.ro From ferencik.ioan at PERSONAL.RO Fri Apr 1 00:59:51 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Fri, 1 Apr 2005 11:59:51 +0300 Subject: Problem Message-ID: Hi list, I am a new user of Mapserver an I am running the MS4W from DM Solutions/Maptools.org Mapserver/Apache/PhpMapScript. I encountered some problems with this map file: MAP IMAGETYPE PNG24 EXTENT 382625 577088 404045 595508 FONTSET "fonts/fonts.list" SIZE 1000 1000 SHAPEPATH "date" IMAGECOLOR 255 555 255 TEMPLATEPATTERN "index" PROJECTION "init=epsg:31700" END # Start of LAYER DEFINITIONS --------------------------------------------- LAYER # layer de tip raster NAME dem DATA "cj.tif" TYPE RASTER PROJECTION "init=epsg:31700" END STATUS default PROCESSING "BANDS=1,2,3" END #--sfarsit layer de tip raster LAYER # States polygon layer begins here NAME test DATA strazi STATUS DEFAULT TYPE LINE PROJECTION "init=epsg:31700" END #CLASSITEM "NAME" LABELITEM "NAME" CLASS COLOR 255 255 190 LABEL COLOR 0 0 0 TYPE TRUETYPE FONT arial SIZE 8 POSITION LL PARTIALS true MINDISTANCE 300 #BUFFER 4 END END END # End of LAYER DEFINITIONS ------------------------------- WEB IMAGEPATH "c:\ms4w\rosia\tmp\ms_tmp\" IMAGEURL "c:\ms4w\rosia\tmp\" TEMPLATE 'index.html' END END # end of map file/object I can display the map In IE in map mode but when i substitute the browse mode with the folowing template: Aplicatie Mapserver

Aplicatie Mapserver


In browse mode i see only a blank image but i can still pan through this image....Mapserver seems to work. In ta same time in MapServer's temp folders there are png images. I don't understand why I can't see those images in template and browse mode. Same results on Mandrake Linux with same mapfile and template. I think i am missing something. Any suggestions? Thanks _____________________________________________ Castiga peste 1000 de premii cu Wella Design! http://wella.boom.ro From fly2moon2 at GMAIL.COM Fri Apr 1 01:19:36 2005 From: fly2moon2 at GMAIL.COM (Jack Ling) Date: Fri, 1 Apr 2005 17:19:36 +0800 Subject: Fwd: [UMN_MAPSERVER-USERS] "msLoadMap(): Unable to access file. " Error Loading Map File In-Reply-To: <1112343862-63734ecb47dfd77d2390ed866b23f115@infogeo.ch> Message-ID: Hi, Thanks for your replies. I still can't get it. I was following example1 of tutorial. Following is the example1_1.map file (originally, it doesn't even have the IMAGEPATH"/"IMAGEURL" clause stated. I added accordinly after your advice). I've modified httpd.conf as suggested so that I can now point to /ms_tmp/ or my web server : http://localhost/ms_tmp/. It is fine even displaying a png format file from there. How if I put the map file below to /ms_tmp/ and run this: http://localhost:81/cgi-bin/mapserv.exe?map=http://localhost/ms_tmp/example1_1.map&mode=map I still got the error: msLoadMap(): Unable to access file. (http://localhost/ms_tmp/example1-1.map) I've restarted Apache2 server. If I followed the suggestion to put absolute path like http://localhost/cgi-bin/mapserv.exe?map=c:\\temp\\example1-1.map&mode=map or http://localhost/cgi-bin/mapserv.exe?map=c:\temp\example1-1.map&mode=map It will complain: msProcessProjection(): Projection library error. No such file or directory your further insidght is appreciated. MAP IMAGETYPE PNG EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514 SIZE 400 300 SHAPEPATH "data" IMAGECOLOR 255 255 255 WEB IMAGEPATH 'C:/Program Files/Apache Group/Apache2/MapServer/ms_tmp/' IMAGEURL "/ms_tmp/" END PROJECTION "proj=laea" "ellps=clrk66" "lat_0=45" "lon_0=-100" # # Alternatively, you can specify an EPSG code. # "init=epsg:2163" # END # Start of LAYER DEFINITIONS --------------------------------------------- LAYER # States polygon layer begins here NAME states DATA states_ugl STATUS DEFAULT TYPE POLYGON PROJECTION "init=epsg:4326" END CLASS COLOR 232 232 232 OUTLINECOLOR 32 32 32 END END # States polygon layer ends here # End of LAYER DEFINITIONS ------------------------------- END # end of map file/object ---------- Forwarded message ---------- From: R Baud Date: Apr 1, 2005 4:24 PM Subject: Re: [UMN_MAPSERVER-USERS] "msLoadMap(): Unable to access file. " Error Loading Map File To: Jack Ling Hi, probably you did not configure this correctly in the .map file: IMAGEPATH "D:/webdevdata/ms_tmp/" IMAGEURL "/ms_tmp/" That the path to the created maps by mapserver. The second is a web accessible directory defined in apache to reach the created maps. sample: 11111111.png = map created. location: D:/webdevdata/ms_tmp/11111111.png you can access it with your browser at: http://localhost/ms_tmp/11111111.png Got it? But you have to define the directory /ms_tmp/ first in appache: see your httpd.conf files and add something like this: Alias /ms_tmp/ "D:/webdevdata/ms_tmp/" AllowOverride None Options Indexes FollowSymLinks Multiviews Order allow,deny Allow from all that's it. This said, don't loose your time to configure paths and other things. Download the latest version of ms4w at www.maptools.org : apache, php, php-applications are configured. Try www.cartoweb.org. That's very enhanced too! Hope this helps. R?my From bluecarto at GMAIL.COM Fri Apr 1 02:04:16 2005 From: bluecarto at GMAIL.COM (Pierre GIRAUD) Date: Fri, 1 Apr 2005 12:04:16 +0200 Subject: LABELREQUIRES - valid DATA object needed in 4.4.1 Message-ID: hi list, For an application, we would be pleased to use the LABELREQUIRES functionnality to be able to set the annotation visibility for several layers at once. That for we wanted to use a empty layer which purpose is to be set to ON/OFF, in order to force the labelling of the other layer. But, as in a 4.2.2 version of Mapserver, the label required layer doesn't not need any data object, in the last 4.4.1 version, it cannot be empty. DATA must be set otherwise the labelrequires operates like the required layer status was set to OFF all the time. note : an alternative consists to give a empty dataset (empty shapfile). Can this be reported as a bug, is this a wanted feature ? Pierre GIRAUD camptocamp.com From kristjan at TARKVARASTUUDIO.EE Fri Apr 1 05:39:21 2005 From: kristjan at TARKVARASTUUDIO.EE (Kristjan Annus) Date: Fri, 1 Apr 2005 16:39:21 +0300 Subject: styleitem auto question Message-ID: Hi, I tried to view MapInfo text labels with STYLEITEM AUTO in map-file. The text size seemed to be correct, but text color was white - so the it was quite unreadable. If I tried to change the text color, the text's disapeared at all. Have anybody had any success with STYLEITEM AUTO and texts from MapInfo TAB files? Kristjan From gerry.creager at TAMU.EDU Fri Apr 1 05:54:28 2005 From: gerry.creager at TAMU.EDU (Gerry Creager N5JXS) Date: Fri, 1 Apr 2005 07:54:28 -0600 Subject: MapServer & friends on 64-bit system? In-Reply-To: <931f8ea905033122225ce25275@mail.gmail.com> Message-ID: Most of those quirks can be avoided by building in 32bit mode, which the Opteron usually accepts just fine. And the Opteron performance is worth considering as an asset, even in 32 bit mode, in my experience. Frank Warmerdam wrote: > On Mar 31, 2005 11:17 PM, Mark Phillips wrote: > >>Would it be safer to get a 32bit system, since we don't anticipate >>actually using 64-bit applications? Or does it really not matter one >>way or the other? The client is leaning towards the 64-bit system so >>as to have the capability of running 64-bit applications in the >>future, if and when the need arises. >> >>I'd appreciate hearing any insights or stories of peoples' >>experiences. > > > Mark, > > I have heard reports of folks running into a few quirks buildings GDAL > and other libraries on AMD 64bit systems; however, as far as I know > they were nothing insurmountable. However, I have no direct experience. > > If it were me, I would stick with a 32bit system to avoid any quirks, > but that is just me. > > Best regards, > > -- > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent -- Gerry Creager -- gerry.creager at tamu.edu Texas Mesonet -- AATLT, Texas A&M University Cell: 979.229.5301 Office: 979.458.4020 FAX: 979.847.8578 Page: 979.228.0173 Office: 903A Eller Bldg, TAMU, College Station, TX 77843 From woodbri at SWOODBRIDGE.COM Fri Apr 1 06:00:09 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Fri, 1 Apr 2005 09:00:09 -0500 Subject: LABELREQUIRES - valid DATA object needed in 4.4.1 In-Reply-To: Message-ID: Sounds like you could use a FEATURE to draw one pixel in the UL corner of the map in the background color of the map. Make it one of your first layers in the mapfile and you will never see it. -Steve W. Pierre GIRAUD wrote: > hi list, > > For an application, we would be pleased to use the LABELREQUIRES > functionnality to be able to set the annotation visibility for several > layers at once. > That for we wanted to use a empty layer which purpose is to be set to > ON/OFF, in order to force the labelling of the other layer. > > But, as in a 4.2.2 version of Mapserver, the label required layer > doesn't not need any data object, in the last 4.4.1 version, it cannot > be empty. DATA must be set otherwise the labelrequires operates like > the required layer status was set to OFF all the time. > > note : an alternative consists to give a empty dataset (empty shapfile). > > Can this be reported as a bug, is this a wanted feature ? > > Pierre GIRAUD > camptocamp.com > From nbarker at RSINC.COM Fri Apr 1 06:27:28 2005 From: nbarker at RSINC.COM (Norman Barker) Date: Fri, 1 Apr 2005 15:27:28 +0100 Subject: web coverage server Message-ID: Hi, having used MapServer WCS for DEM data (fantastic, thanks for the help), I am looking to use the WCS for temporal data too. In particular I was thinking of using the WCS to serve netCDF data, filtering on temporal dimensions, and dataset parameters (not doing any geographic subset as yet). My questions are; 1) GDAL seems to have problems with netCDF, would I be better to translate to geotiff where each band represents a dataset parameter? 2) Has anyone done something similar? Quoting from the WCS howto Only spatial, simple temporal and radiometric band subsetting is possible with the current implementation Does that mean I would have to convert to geotiff to support querying by dataset parameter, since each band could represent a different parameter? Any help on the time dimensions would be appreciated. Are there any examples (however small) I could look at. Many thanks, Norman Barker -------------- next part -------------- An HTML attachment was scrubbed... URL: From fwarmerdam at GMAIL.COM Fri Apr 1 07:01:47 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri, 1 Apr 2005 10:01:47 -0500 Subject: web coverage server In-Reply-To: Message-ID: On Apr 1, 2005 9:27 AM, Norman Barker wrote: > > My questions are; > > 1) GDAL seems to have problems with netCDF, would I be better to translate > to geotiff where each band represents > a dataset parameter? Norman, Translating to GeoTIFF would likely give you a more stable situation to work from. However, I am planning to improve netCDF support in the coming month or two. > 2) Has anyone done something similar? You might want to look at the GALEON interopability experiment which aims to serve similar data by WCS from netCDF files. Aspects of it are already working - but they aren't using MapServer as a backend for the WCS. http://my.unidata.ucar.edu/content/projects/THREDDS/GALEON/GALEON-Activity-Plan.htm > Quoting from the WCS howto > Only spatial, simple temporal and radiometric band subsetting is possible > with the current implementation > > > Does that mean I would have to convert to geotiff to support querying by > dataset parameter, since each band could represent a different > parameter? Any GDAL dataset that supports arbitrary bands could be used. There isn't anything special with GeoTIFF. But you may have to do some substantial work to build tile indexes which allow subsetting on a variety of conditions. Hmm, I think this is one of the reasons Steve did the tileindex layer type, so that you could install a filter condition on a tile index. I think I had better shut up and let Steve speak. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From jms4 at PO.CWRU.EDU Fri Apr 1 07:11:11 2005 From: jms4 at PO.CWRU.EDU (James Sohr) Date: Fri, 1 Apr 2005 09:11:11 -0600 Subject: No anti-aliasing for cartoline symbol? Message-ID: Like so many others, I've used the circle symbol with various sizes to draw my lines for the past few years. The results have been pretty good, but the aliasing on the roads has always bothered me, especially when the true-type labels are beautfully anti-aliased right beside them. I recently read in the archives that the relatively new cartoline symbol supports anti-aliasing. However, when I use the cartoline symbol and turn antialiasing on, the lines drawn are still aliased. I'm using Mapserver 4.5 on Windows XP with the latest GD library. Is there something in my setup that is preventing the cartoline from being anti-aliased? Does someone have an online example that shows the cartoline symbol being anti-aliased? The pertinent sections in my symbols file are: SYMBOL NAME 'road' TYPE CARTOLINE ANTIALIAS TRUE END SYMBOL NAME 'roadov' TYPE CARTOLINE ANTIALIAS TRUE END And in my mapfile: CLASS STYLE SYMBOL 'road' SIZE 5 COLOR 255 0 0 ANTIALIAS TRUE END STYLE SYMBOL 'roadov' SIZE 3 COLOR 255 255 255 ANTIALIAS TRUE END .... Any help is appreciated. Thanks, James From plists at PROMETHEUS.ORG.YU Fri Apr 1 08:22:11 2005 From: plists at PROMETHEUS.ORG.YU (Attila Csipa) Date: Fri, 1 Apr 2005 18:22:11 +0200 Subject: pixmap symbols from mapscript ? Message-ID: I'm having difficulties using pixmap symbol from mapscript (current CVS version), I wonder if someone had experience with a similar problem ? I wanted to have rotated pixmap (bitmap) symbols on my map, however AFAIK mapserver does not support rotated symbols. I thought I could make prerotated bitmaps which I would put in symbolset and use classes to show the proper symbol. However, this needed the increase of the MS_MAXSYMBOLS define (I tried with 1000) after which mapserver would hang indefinitely if the symbolset itself contained somewhere over 300 symbols (I also tried playing with MS_MAXSTYLES and MS_MAXCLASSES in map.h to no avail). Alternatively I wanted to generate the symbols dynamically from mapscript, however looking at the docs I see no reference to the possibility of creating bitmap symbols (even though the MS_SYMBOL_PIXMAP constant does exist). As a last resort I tried to generate a temporary symbolset file which contained only the needed symbols for a certain map extent and load it with $map->setsymbolset(), but regardless of the number of symbols it contained, it hang, but ONLY if the symbols defined inside were of PIXMAP type. I did not managed to dig up anything relevant in the list archives. Any ideas ? From ed at TOPOZONE.COM Fri Apr 1 08:39:29 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Fri, 1 Apr 2005 11:39:29 -0500 Subject: Problem Message-ID: Ferencik - Please always reply to the whole list; the first person to answer might not have ALL the answers, or may not have time to keep answering. And by sending to the list the discussion goes in the archives, so new users can first look in the archives for answers to their questions. The error message basically means what it says. The MapServer CGI does not have write access to that directory. This is not the same as Apache allowing READ access to Internet browsers. Your CGI program - running in the user context you've configured - must have write access to the tmp directory to create the temporary images. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: Ferencik Ioan [mailto:ferencik.ioan at personal.ro] Sent: Friday, April 01, 2005 9:23 AM To: Ed McNierney Subject: Re: RE: [UMN_MAPSERVER-USERS] Problem Many thanks Ed, I modified it and tried to start with http://127.0.0.1/cgi-bin/mapserv.exe?map=c:\ms4w\rosia\raster.map&mode=b rowse got the following message: msSaveImageGD(): Unable to access file. Unable to open file /tmp/MS11123650252724.png for writing I believe that the problem is from Apache configuration. I do have a few conf files in a special folder(it came from ms4w aplication and it contain the folowing directives: Alias /tutorial/data "/ms4w/tutorial/data" AllowOverride None Options Indexes FollowSymLinks Multiviews Order allow,deny Allow from all Alias /tutorial "/ms4w/tutorial/" AllowOverride None Options Indexes FollowSymLinks Multiviews Order allow,deny Allow from all Alias /tutorial/tmp/ "c:/ms4w/tutorial/tmp" AllowOverride None Options Indexes FollowSymLinks Multiviews Order allow,deny Allow from all Alias /tutorial/symbols "/ms4w/tutorial/symbols" AllowOverride None Options Indexes FollowSymLinks Multiviews Order allow,deny Allow from all Thank you again > Ferencik - > > Look at these two statements: > > IMAGEPATH "c:\ms4w\rosia\tmp\ms_tmp\" > IMAGEURL "c:\ms4w\rosia\tmp\" > > You're telling MapServer to put the temporary map images in the > "tmp\ms_tmp" directory, and telling the browser to request them from > "tmp". If your Web application has a virtual directory that maps > "tmp\ms_tmp" to the "tmp" directory then this is OK, but I'm guessing > that's not the case - you might want to remove the "\ms_tmp" from the > IMAGEPATH. > > - Ed > > Ed McNierney > President and Chief Mapmaker > TopoZone.com / Maps a la carte, Inc. > 73 Princeton Street, Suite 305 > North Chelmsford, MA 01863 > Phone: +1 (978) 251-4242 > Fax: +1 (978) 251-1396 > ed at topozone.com > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On > Behalf Of Ferencik Ioan > Sent: Friday, April 01, 2005 4:00 AM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: [UMN_MAPSERVER-USERS] Problem > > Hi list, > > I am a new user of Mapserver an I am running the MS4W from DM > Solutions/Maptools.org Mapserver/Apache/PhpMapScript. I encountered some > problems with this map file: > MAP > IMAGETYPE PNG24 > EXTENT 382625 577088 404045 595508 > FONTSET "fonts/fonts.list" > SIZE 1000 1000 > SHAPEPATH "date" > IMAGECOLOR 255 555 255 > TEMPLATEPATTERN "index" > PROJECTION > "init=epsg:31700" > END > # Start of LAYER DEFINITIONS > --------------------------------------------- > LAYER # layer de tip raster > NAME dem > DATA "cj.tif" > TYPE RASTER > PROJECTION > "init=epsg:31700" > END > STATUS default > PROCESSING "BANDS=1,2,3" > END #--sfarsit layer de tip raster > LAYER # States polygon layer begins here > NAME test > DATA strazi > STATUS DEFAULT > TYPE LINE > PROJECTION > "init=epsg:31700" > END > #CLASSITEM "NAME" > LABELITEM "NAME" > CLASS > > COLOR 255 255 190 > LABEL > COLOR 0 0 0 > TYPE TRUETYPE > FONT arial > SIZE 8 > > POSITION LL > PARTIALS true > MINDISTANCE 300 > #BUFFER 4 > END > END > END > > # End of LAYER DEFINITIONS ------------------------------- > WEB > IMAGEPATH "c:\ms4w\rosia\tmp\ms_tmp\" > IMAGEURL "c:\ms4w\rosia\tmp\" > TEMPLATE 'index.html' > > > END > > > END # end of map file/object > > > I can display the map In IE in map mode but when i substitute the browse > mode with the folowing template: > > > Aplicatie > Mapserver
method="GET" target="_self"> > > > > > >

Aplicatie > Mapserver


>
> > value="c:\ms4w\rosia\tmp\MS1112343259276.png" width="500" height="500"> > > > >
> > >
> > > > > > > > > In browse mode i see only a blank image but i can still pan through this > image....Mapserver seems to work. In ta same time in MapServer's temp > folders there are png images. I don't understand why I can't see those > images in template and browse mode. Same results on Mandrake Linux with > same mapfile and template. I think i am missing something. Any > suggestions? > Thanks > > > > > > > _____________________________________________ > Castiga peste 1000 de premii cu Wella Design! > http://wella.boom.ro > _____________________________________________ Castiga peste 1000 de premii cu Wella Design! http://wella.boom.ro From woodbri at SWOODBRIDGE.COM Fri Apr 1 08:52:46 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Fri, 1 Apr 2005 11:52:46 -0500 Subject: pixmap symbols from mapscript ? In-Reply-To: <200504011822.11802.plists@prometheus.org.yu> Message-ID: Attila, The SWIG/mapscript ver 4.4 document gives you access the the symbolObj and you can change the imagepath property. With that you should be able to have a symbolset file with template symbols in it and then populate/change the imagepaths to point to the images you want to use for a given map draw. -Steve W Attila Csipa wrote: > I'm having difficulties using pixmap symbol from mapscript (current CVS > version), I wonder if someone had experience with a similar problem ? > > I wanted to have rotated pixmap (bitmap) symbols on my map, however AFAIK > mapserver does not support rotated symbols. I thought I could make prerotated > bitmaps which I would put in symbolset and use classes to show the proper > symbol. However, this needed the increase of the MS_MAXSYMBOLS define (I > tried with 1000) after which mapserver would hang indefinitely if the > symbolset itself contained somewhere over 300 symbols (I also tried playing > with MS_MAXSTYLES and MS_MAXCLASSES in map.h to no avail). Alternatively I > wanted to generate the symbols dynamically from mapscript, however looking at > the docs I see no reference to the possibility of creating bitmap symbols > (even though the MS_SYMBOL_PIXMAP constant does exist). As a last resort I > tried to generate a temporary symbolset file which contained only the needed > symbols for a certain map extent and load it with $map->setsymbolset(), but > regardless of the number of symbols it contained, it hang, but ONLY if the > symbols defined inside were of PIXMAP type. I did not managed to dig up > anything relevant in the list archives. Any ideas ? > From kenlord at GMAIL.COM Fri Apr 1 09:38:24 2005 From: kenlord at GMAIL.COM (Ken Lord) Date: Fri, 1 Apr 2005 09:38:24 -0800 Subject: No anti-aliasing for cartoline symbol? In-Reply-To: Message-ID: Hi James, The documentation states that 'antialias true' within the symbol definition is just for truetype fonts, 'antialias true' in the style affects both truetype fonts and cartolines. Try your map with no antialias statement in the symbol or in the style, then compare the results with 'antialias true' just within the style. I just started using the cartoline symbol for roads myself, and I can see a good difference ... still a little jaggy, but a good difference. Perhaps the 72dpi resolution of the output image is keeping the jaggies visible. Cheers, Ken Lord Vancouver BC On Apr 1, 2005 7:11 AM, James Sohr wrote: > Like so many others, I've used the circle symbol with various sizes to > draw my lines for the past few years. The results have been pretty good, > but the aliasing on the roads has always bothered me, especially when the > true-type labels are beautfully anti-aliased right beside them. > > I recently read in the archives that the relatively new cartoline symbol > supports anti-aliasing. However, when I use the cartoline symbol and turn > antialiasing on, the lines drawn are still aliased. > > I'm using Mapserver 4.5 on Windows XP with the latest GD library. Is > there something in my setup that is preventing the cartoline from being > anti-aliased? Does someone have an online example that shows the > cartoline symbol being anti-aliased? > > The pertinent sections in my symbols file are: > > SYMBOL > NAME 'road' > TYPE CARTOLINE > ANTIALIAS TRUE > END > > SYMBOL > NAME 'roadov' > TYPE CARTOLINE > ANTIALIAS TRUE > END > > And in my mapfile: > > CLASS > > STYLE > SYMBOL 'road' > SIZE 5 > COLOR 255 0 0 > ANTIALIAS TRUE > END > > STYLE > SYMBOL 'roadov' > SIZE 3 > COLOR 255 255 255 > ANTIALIAS TRUE > END > .... > > Any help is appreciated. > > Thanks, > James > From woklist at CHARTER.NET Fri Apr 1 10:06:44 2005 From: woklist at CHARTER.NET (William K) Date: Fri, 1 Apr 2005 12:06:44 -0600 Subject: No anti-aliasing for cartoline symbol? In-Reply-To: Message-ID: I've been using cartolines for a while. I think you need to specify antialias in the STYLE for a class, not the symbol. The antialias in the SYMBOL definition (as Ken Lord said) is for truetype fonts. Oh, not paying attention to your example, I see you do say antialias in the style. Hmm, foggy... memory... try specifying the linecap, linejoin and linejoinmaxsize in your symbol, I think I may have had problems when I didn't (all mine do now), even if you specify same as the defaults. It's been a while since I used the antialias for cartolines, tho - I think it's a bit slow, or the quality wasn't all that great (I believe it's done by GD?). And if you still use normal lines also in a map, there will be a mix of aliasing and antialiasing. I switched to a different method that gives accross-the-board antialiasing - design and draw the map at 2x or 4x size with no antialiasing anywhere, then use PHP's image functions to resample the image with antialiasing. I find that the antialiasing produced this way looks much better, closer to what I expect from using graphics programs, even for font rendering. Requires PHP-MapScript of course, and a bit of programming, but it works fine. Unless you have a fast processor, the 4x will be pretty slow, but it looks better. I even use this method for generating high quality PDF output, instead of using mapserver's builtin PDF output. On Apr 1, 2005, at 9:11 AM, James Sohr wrote: > Like so many others, I've used the circle symbol with various sizes to > draw my lines for the past few years. The results have been pretty > good, > but the aliasing on the roads has always bothered me, especially when > the > true-type labels are beautfully anti-aliased right beside them. > > > I recently read in the archives that the relatively new cartoline > symbol > supports anti-aliasing. However, when I use the cartoline symbol and > turn > antialiasing on, the lines drawn are still aliased. > > > > I'm using Mapserver 4.5 on Windows XP with the latest GD library. Is > there something in my setup that is preventing the cartoline from being > anti-aliased? Does someone have an online example that shows the > cartoline symbol being anti-aliased? > ----- William Kyngesburye http://webpages.charter.net/kyngchaos/ Theory of the Universe There is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarrely inexplicable. There is another theory which states that this has already happened. -Hitchhiker's Guide to the Galaxy 2nd season intro -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2685 bytes Desc: not available URL: From kgeurts at GIS.UMN.EDU Fri Apr 1 10:12:56 2005 From: kgeurts at GIS.UMN.EDU (Kari Geurts) Date: Fri, 1 Apr 2005 12:12:56 -0600 Subject: Important =?ISO-8859-1?Q?=96?= conference early registration deadline approaching Message-ID: Hello MapServer Community, We have had a good response in regards to registration for the Open Source Geospatial ?05 Conference to be held June 16-18. Information about the conference is available at the conference website (http://mallit.fr.umn.edu/mum/mtg2005.html). In addition, we have received several abstract submissions for both presentations and technical sessions. Thanks to all those who plan to attend and participate. With the conference date fast approaching, we wanted to inform you that the deadline for early registration is April 14, 2005. You will save $50.00 by registering before this date. We hope you will take advantage of this savings and register now. There will be more notices to come about the conference and we look forward to seeing you all there. Kari From kenlord at GMAIL.COM Fri Apr 1 10:17:26 2005 From: kenlord at GMAIL.COM (Ken Lord) Date: Fri, 1 Apr 2005 10:17:26 -0800 Subject: No anti-aliasing for cartoline symbol? In-Reply-To: <6185128153792ff799a483f93f08e61c@charter.net> Message-ID: Hi William, I just tried your suggestion of setting linecap, linejoin, and linejoinmaxsize in the symbol definition, and it has improved my output. There must be a bug since I used the supposed default values, so I expected no difference but there was. James, give William's suggestion a try and see if it helps you too. Cheers, Ken Lord Vancouver BC On Apr 1, 2005 10:06 AM, William K wrote: > I've been using cartolines for a while. I think you need to specify > antialias in the STYLE for a class, not the symbol. The antialias in > the SYMBOL definition (as Ken Lord said) is for truetype fonts. > > Oh, not paying attention to your example, I see you do say antialias in > the style. Hmm, foggy... memory... try specifying the linecap, > linejoin and linejoinmaxsize in your symbol, I think I may have had > problems when I didn't (all mine do now), even if you specify same as > the defaults. > > It's been a while since I used the antialias for cartolines, tho - I > think it's a bit slow, or the quality wasn't all that great (I believe > it's done by GD?). And if you still use normal lines also in a map, > there will be a mix of aliasing and antialiasing. > > I switched to a different method that gives accross-the-board > antialiasing - design and draw the map at 2x or 4x size with no > antialiasing anywhere, then use PHP's image functions to resample the > image with antialiasing. I find that the antialiasing produced this > way looks much better, closer to what I expect from using graphics > programs, even for font rendering. Requires PHP-MapScript of course, > and a bit of programming, but it works fine. Unless you have a fast > processor, the 4x will be pretty slow, but it looks better. I even use > this method for generating high quality PDF output, instead of using > mapserver's builtin PDF output. > > > On Apr 1, 2005, at 9:11 AM, James Sohr wrote: > > > Like so many others, I've used the circle symbol with various sizes to > > draw my lines for the past few years. The results have been pretty > > good, > > but the aliasing on the roads has always bothered me, especially when > > the > > true-type labels are beautfully anti-aliased right beside them. > > > > > > I recently read in the archives that the relatively new cartoline > > symbol > > supports anti-aliasing. However, when I use the cartoline symbol and > > turn > > antialiasing on, the lines drawn are still aliased. > > > > > > > > I'm using Mapserver 4.5 on Windows XP with the latest GD library. Is > > there something in my setup that is preventing the cartoline from being > > anti-aliased? Does someone have an online example that shows the > > cartoline symbol being anti-aliased? > > > > ----- > William Kyngesburye > http://webpages.charter.net/kyngchaos/ > > Theory of the Universe > > There is a theory which states that if ever anyone discovers exactly > what the universe is for and why it is here, it will instantly > disappear and be replaced by something even more bizarrely > inexplicable. There is another theory which states that this has > already happened. > > -Hitchhiker's Guide to the Galaxy 2nd season intro > > -- ============================== Ken Lord B.Sc., A.Dipl.T.H. 7488 Magnolia Terrace Burnaby BC, V5E 4L1 604-777-2171 kenlord at gmail.com kenlord at email.com klord at bgcengineering.com From kgeurts at GIS.UMN.EDU Fri Apr 1 10:36:28 2005 From: kgeurts at GIS.UMN.EDU (Kari Geurts) Date: Fri, 1 Apr 2005 12:36:28 -0600 Subject: Important =?windows-1252?Q?=96_conference_early_regist?= =?windows-1252?Q?ration_deadline_approaching?= In-Reply-To: Message-ID: Oops! The correct URL for the Open Source Geospatial ?05 Conference website is (http://mapserver.gis.umn.edu/mum/mtg2005.html) Thanks, Kari Kari Geurts wrote: >Hello MapServer Community, > >We have had a good response in regards to registration for the Open Source >Geospatial ?05 Conference to be held June 16-18. Information about the >conference is available at the conference website >(http://mallit.fr.umn.edu/mum/mtg2005.html). In addition, we have received >several abstract submissions for both presentations and technical sessions. >Thanks to all those who plan to attend and participate. > >With the conference date fast approaching, we wanted to inform you that the >deadline for early registration is April 14, 2005. You will save $50.00 by >registering before this date. We hope you will take advantage of this >savings and register now. > >There will be more notices to come about the conference and we look forward >to seeing you all there. > >Kari > > > -- Kari A. Geurts GIS and Remote Sensing Laboratory Department of Forest Resources University of Minnesota 1530 Cleveland Ave N. St. Paul, MN. 55108 Phone: 612-624-3459 Fax: 612-625-5212 From lluisgm at GMAIL.COM Fri Apr 1 11:33:44 2005 From: lluisgm at GMAIL.COM (=?ISO-8859-1?Q?Llu=EDs_Garcia_i_Mestres?=) Date: Fri, 1 Apr 2005 21:33:44 +0200 Subject: jBox image problem Message-ID: Hi, My own mapserver maps were working ok, and I decide to implement the jBox. I followed the instructions, but any image is displayed. I've j2sdk installed. The image (png) is created in tmp directory but not in the browser. Even any box appears in the area where should be the image. Any suggestion to figure out this? Llu?s From jms4 at PO.CWRU.EDU Fri Apr 1 11:43:27 2005 From: jms4 at PO.CWRU.EDU (James Sohr) Date: Fri, 1 Apr 2005 13:43:27 -0600 Subject: No anti-aliasing for cartoline symbol? Message-ID: Thanks for the suggestions, I really appreciate them. So far, no worky. I removed the 'antialias true' from the symbol file, no change. I removed the 'antialias true' from the style area, no change. I re-added the 'anti-alias true' to the style area, and set the linejoin type in the symbol file to round, the linecap type to round, and linejoinmaxsize to 3... and the edges of my lines and corners got rounder, but no change in the aliasing. I then removed all layers except for the layer in question, removed the background color set for the whole map, removed the projection settings, removed all the labels, so that I was down to a simple single layer and there still is no change in the aliasing. I even tried to get antialiased single-pixel width lines to work by not using any symbol reference or size parameter: MAP ... LAYER TYPE LINE DATA "myshapefile.dbf" NAME "roads" COLOR 0 0 0 STYLE ANTIALIAS TRUE END END ... END Even this did not work-- my single pixel line was still very much aliased! In the archives, I noticed at least one other fellow could not get the single-pixel line anti-aliasing to work, and wonder if this issue is related to the cartoline symbols not being anti-aliased. Any other ideas out there? Could this possibly be some sort of bug? Thanks, James On Fri, 1 Apr 2005 10:17:26 -0800, Ken Lord wrote: >Hi William, > >I just tried your suggestion of setting linecap, linejoin, and >linejoinmaxsize in the symbol definition, and it has improved my >output. > >There must be a bug since I used the supposed default values, so I >expected no difference but there was. > >James, give William's suggestion a try and see if it helps you too. > >Cheers, >Ken Lord >Vancouver BC > >On Apr 1, 2005 10:06 AM, William K wrote: >> I've been using cartolines for a while. I think you need to specify >> antialias in the STYLE for a class, not the symbol. The antialias in >> the SYMBOL definition (as Ken Lord said) is for truetype fonts. >> >> Oh, not paying attention to your example, I see you do say antialias in >> the style. Hmm, foggy... memory... try specifying the linecap, >> linejoin and linejoinmaxsize in your symbol, I think I may have had >> problems when I didn't (all mine do now), even if you specify same as >> the defaults. >> >> It's been a while since I used the antialias for cartolines, tho - I >> think it's a bit slow, or the quality wasn't all that great (I believe >> it's done by GD?). And if you still use normal lines also in a map, >> there will be a mix of aliasing and antialiasing. >> >> I switched to a different method that gives accross-the-board >> antialiasing - design and draw the map at 2x or 4x size with no >> antialiasing anywhere, then use PHP's image functions to resample the >> image with antialiasing. I find that the antialiasing produced this >> way looks much better, closer to what I expect from using graphics >> programs, even for font rendering. Requires PHP-MapScript of course, >> and a bit of programming, but it works fine. Unless you have a fast >> processor, the 4x will be pretty slow, but it looks better. I even use >> this method for generating high quality PDF output, instead of using >> mapserver's builtin PDF output. >> >> >> On Apr 1, 2005, at 9:11 AM, James Sohr wrote: >> >> > Like so many others, I've used the circle symbol with various sizes to >> > draw my lines for the past few years. The results have been pretty >> > good, >> > but the aliasing on the roads has always bothered me, especially when >> > the >> > true-type labels are beautfully anti-aliased right beside them. >> > >> > >> > I recently read in the archives that the relatively new cartoline >> > symbol >> > supports anti-aliasing. However, when I use the cartoline symbol and >> > turn >> > antialiasing on, the lines drawn are still aliased. >> > >> > >> > >> > I'm using Mapserver 4.5 on Windows XP with the latest GD library. Is >> > there something in my setup that is preventing the cartoline from being >> > anti-aliased? Does someone have an online example that shows the >> > cartoline symbol being anti-aliased? >> > >> >> ----- >> William Kyngesburye >> http://webpages.charter.net/kyngchaos/ >> >> Theory of the Universe >> >> There is a theory which states that if ever anyone discovers exactly >> what the universe is for and why it is here, it will instantly >> disappear and be replaced by something even more bizarrely >> inexplicable. There is another theory which states that this has >> already happened. >> >> -Hitchhiker's Guide to the Galaxy 2nd season intro >> >> > > >-- >============================== >Ken Lord B.Sc., A.Dipl.T.H. >7488 Magnolia Terrace >Burnaby BC, V5E 4L1 >604-777-2171 >kenlord at gmail.com >kenlord at email.com >klord at bgcengineering.com From Tom.Kralidis at EC.GC.CA Fri Apr 1 11:52:31 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri, 1 Apr 2005 14:52:31 -0500 Subject: Autodesk support Message-ID: Hi, Is there any support in MapServer for Autodesk vector formats? Thanks ..Tom ========================= Tom Kralidis Senior Systems Scientist Environment Canada Tel: +01-905-336-4409 http://www.ec.gc.ca/ From bartvde at XS4ALL.NL Fri Apr 1 12:02:52 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Fri, 1 Apr 2005 22:02:52 +0200 Subject: Autodesk support In-Reply-To: <2576812186CDD411BF1500508B6DCE950972F87E@ecnwri1.ontario.int.ec.gc.ca> Message-ID: Hi Tom, currently not that I know of. Ofcourse there have been wishes for this for a long time. Your only option would be experimenting with Mapserver FastCGI in combination with FMEObjects. Best regards, Bart On Fri, 1 Apr 2005 14:52:31 -0500, Kralidis,Tom [Burlington] wrote: > Hi, > > Is there any support in MapServer for Autodesk vector formats? > > Thanks > > ..Tom > ========================= > Tom Kralidis > Senior Systems Scientist > Environment Canada > Tel: +01-905-336-4409 > http://www.ec.gc.ca/ > > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From rob at DATAFLOWDESIGN.COM Fri Apr 1 12:09:27 2005 From: rob at DATAFLOWDESIGN.COM (Rob P.) Date: Fri, 1 Apr 2005 14:09:27 -0600 Subject: Error generating imagemaps Message-ID: I have put code into a php mapscript (4.4.1) to generate an imagemap on a layer using: $img->saveImage("", $mapImg) The map file contains the OUTPUTFORMAT options documented in mapimagemap.c and generates correct pixel coordinates . This works great as long as the map contains at least 1 feature from the layer. It seems that if the map is zoomed out too far (LabelMaxScale or MaxScale in effect) or the area of interest does not overlap any features from that layer I get this fatal error: Fatal error: Failed writing image to stdout in /usr/local/www/data/myscript.phtml on line 875 Attempt to suppress the error by preceding the function call with an ampersand: [@$img->saveImage("", $mapImg)] still allows the script to end prematurely How can I solve this problem? Testing the scale before calling saveImage could be a partial solution. Perhaps there is a layer or map property that I can check before calling saveImage()? Thanks for your help Rob From Tom.Kralidis at EC.GC.CA Fri Apr 1 12:10:07 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri, 1 Apr 2005 15:10:07 -0500 Subject: PostGIS Layer mapfile def issue Message-ID: Hi, I have a PostGIS layer with which I'd like to serve via WMS/WFS. The PostGIS instance has two tables as LAYER defs. For one of the tables (as def'd below in mapfile) as a LAYER object, I'd like to include fields from another table. I have a one-to-many relationship which MAY occur from one table to another (in the case below, service_endpoints is the one vs. service_resources is the many). Here's the mapfile snippet: LAYER NAME "service_resources" STATUS ON CONNECTIONTYPE postgis CONNECTION "user=postgres dbname=devgeodb" DATA "the_geom from (select service_endpoints.organization as organization,service_endpoints.endpoint_getresource as endpoint_getresource from service_resources left join service_endpoints on service_resources.service_id = service_endpoints.service_id) as t using unique resource_id" TYPE POLYGON DUMP TRUE HEADER "service_resources_query_header.html" TEMPLATE "service_resources_query_body.html" TOLERANCE 30 METADATA "ows_title" "Service Resources" "ows_abstract" "Service Resources" "ows_keywordlist" "environment,ogc,cgdi" "wms_opaque" "0" "ows_extent" "-141.089000 36.392987 -52.089000 89.784987" "ows_metadataurl_type" "FGDC" "wms_metadataurl_format" "text/html" "ows_metadataurl_href" "http://devgeo.cciw.ca/index.html" "wms_dataurl_format" "text/html" "wms_dataurl_href" "http://devgeo.cciw.ca/index.html" "wfs_metadataurl_format" "TXT" "gml_include_items" "all" END PROJECTION "init=epsg:4326" END CLASS NAME "Service Resources" COLOR 0 0 255 OUTLINECOLOR 0 0 0 SYMBOL "upwarddiagonalfill" SIZE 1 END END When I run a WFS GetFeature request, the only features returned are those which have one-to-one relationships. The one-to-many related values are not returned. My service_resources.resource_id is unique. Which leads me to believe that my DATA declaration is off somewhere. Any advice? Thanks ..Tom From Godwinl at AGR.GC.CA Fri Apr 1 12:24:20 2005 From: Godwinl at AGR.GC.CA (Godwin, Elizabeth) Date: Fri, 1 Apr 2005 15:24:20 -0500 Subject: WMS layers - need help finding problem Message-ID: Hi list, I'm having a problem with multiple WMS layers in a map, when the map layers come from different services. Only layers from one of the services are displayed. If I choose to draw just layers from either service, there is no problem. The same mapfile running on same version of Mapserver on my windows machine works fine. So I suspect a config/library problem with Mapserver. It's affecting all versions of mapserver I have which is why I suspect it's a required library. This is a Linux machine. A different Linux machine we have is working normally. I don't even know where to look for the problem. Can someone please tell me what component we can try re-compiling/configuring to fix the problem? Liz -------------- next part -------------- An HTML attachment was scrubbed... URL: From woklist at CHARTER.NET Fri Apr 1 12:37:09 2005 From: woklist at CHARTER.NET (William K) Date: Fri, 1 Apr 2005 14:37:09 -0600 Subject: No anti-aliasing for cartoline symbol? In-Reply-To: Message-ID: Don't know what to say. For the record, I build MapServer from source, v4.4.1 now (I can't remember when I started using cartolines), on Mac OS X. I just realized that you say 4.5 - is that the CVS dev version? Maybe some new change broke cartoline antialiasing. On Apr 1, 2005, at 1:43 PM, James Sohr wrote: > Thanks for the suggestions, I really appreciate them. > So far, no worky. > > I removed the 'antialias true' from the symbol file, no change. > > I removed the 'antialias true' from the style area, no change. > > I re-added the 'anti-alias true' to the style area, and set the > linejoin > type in the symbol file to round, the linecap type to round, and > linejoinmaxsize to 3... and the edges of my lines and corners got > rounder, > but no change in the aliasing. > > I then removed all layers except for the layer in question, removed the > background color set for the whole map, removed the projection > settings, > removed all the labels, so that I was down to a simple single layer and > there still is no change in the aliasing. > > I even tried to get antialiased single-pixel width lines to work by not > using any symbol reference or size parameter: > > MAP > ... > > LAYER > TYPE LINE > DATA "myshapefile.dbf" > NAME "roads" > COLOR 0 0 0 > STYLE > ANTIALIAS TRUE > END > END > ... > END > > > Even this did not work-- my single pixel line was still very much > aliased! > > In the archives, I noticed at least one other fellow could not get the > single-pixel line anti-aliasing to work, and wonder if this issue is > related to the cartoline symbols not being anti-aliased. > > Any other ideas out there? Could this possibly be some sort of bug? > ----- William Kyngesburye http://webpages.charter.net/kyngchaos/ All generalizations are dangerous, even this one. From pcreso at PCRESO.COM Fri Apr 1 12:47:58 2005 From: pcreso at PCRESO.COM (Brent Wood) Date: Fri, 1 Apr 2005 12:47:58 -0800 Subject: MapServer & friends on 64-bit system? In-Reply-To: 6667 Message-ID: > >>Would it be safer to get a 32bit system, since we don't anticipate > >>actually using 64-bit applications? Or does it really not matter one > >>way or the other? The client is leaning towards the 64-bit system so > >>as to have the capability of running 64-bit applications in the > >>future, if and when the need arises. > >> > >>I'd appreciate hearing any insights or stories of peoples' > >>experiences. My experience: I built an AMD64 box as a GIS workstation, mostly running PostGIS/GEOS/GDAL/ QGIS/GMT. Shuttle system with socket 939 3500+CPU, 1Gb memory & 2x 80GB SATA drives with software RAID. (I needed something luggable to take to sea regularly) My major problem was hardware support, with Mandrake, SuSE & Fedora all having problems with SATA controller/drives. Ubuntu installed & ran faultlessly, however, and the QGIS development team have some Ubuntu fans who have put together some instructions for Ubuntu QGIS users, which includes GDAL. Also, Lingis (which includes GDAL) is currently being updated, & will be released for AMD64 (& SuSE 9.1/9.2/9.3) in a month or two. I decided to install from tarballs & compile from scratch to avoid dependency issues, and have no problems so far with Postgres/PostGIS/GDAL/GEOS/shapelib/ QGIS/GMT/ImageMagick all compiled from source on a 64bit system. About 4 weeks of perfectly stable running so far Prior to running Ubuntu I had good success with SuSE 9.1/9.2 and Lingis, all 32 bit. Totally stable & (IMHO as a GIS technophile :-) very fast. All the major distros (& even M$) are improving AMD64 versions, packages are becoming readily available and the platform is very fast. Strongly recommended, even if used as just 32bit. Brent Wood From dldeskins at GMAIL.COM Fri Apr 1 13:02:57 2005 From: dldeskins at GMAIL.COM (Don Deskins) Date: Fri, 1 Apr 2005 15:02:57 -0600 Subject: raster layer and tileindex Message-ID: Hello, I am new to mapserver and mapscript. I have been playing with it for a few weeks and am pleased with a lot of it. I have run into a problem with a tiled raster layer. I have tried to display images individually (jpg's) and can display them. When I use a tiled layer, nothing happens... no error and no display. I have tried both types of layering as discussed in another thread. (I used gdalindex to create the shp file). Here is what I have in the map file: ###################### #old layer: LAYER NAME "UTM16M-JPEG" TYPE RASTER STATUS ON TILEINDEX "/var/www/html/default/shelby_new_gis/data/UTM16M-JPEG/index_16.shp" TILEITEM "location" #OFFSITE 0 0 0 #MAXSCALE 80000 #MINSCALE 10000 END ############################# # or # new type layers: LAYER NAME 'index_16' TYPE TILEINDEX DATA '/var/www/html/default/shelby_new_gis/data/UTM16M-JPEG/index_16' END LAYER NAME 'UTM16M-JPEG' STATUS ON TYPE RASTER TILEINDEX '/var/www/html/default/shelby_new_gis/data/UTM16M-JPEG/index_16' TILEITEM 'LOCATION' END ########################## Thanks! From r0ss at SHAW.CA Fri Apr 1 13:37:25 2005 From: r0ss at SHAW.CA (ross s) Date: Fri, 1 Apr 2005 14:37:25 -0700 Subject: Autodesk support Message-ID: An HTML attachment was scrubbed... URL: From fwarmerdam at GMAIL.COM Fri Apr 1 13:48:59 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri, 1 Apr 2005 16:48:59 -0500 Subject: Autodesk support In-Reply-To: <90abed90c397.90c39790abed@shaw.ca> Message-ID: On Apr 1, 2005 4:37 PM, ross s wrote: > > Hi > > The other option is to purchase the SDK from the Open Design Alliance > (http://www.opendwg.org/) and embed the objects into your MapServer > application. I believe I read about someone on the user group doing this. Ross, The above is possible, but would require alot of additional programming. I suspect Tom was looking for a solution that didn't require him to do too much programming. To the best of my knowledge the only "live access" mechanism would be the one via FMEObjects that Bart mentioned. But I would strongly encourage Tom to just pre-convert his files to shapefiles using something like FME. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From fwarmerdam at GMAIL.COM Fri Apr 1 13:51:59 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri, 1 Apr 2005 16:51:59 -0500 Subject: raster layer and tileindex In-Reply-To: Message-ID: On Apr 1, 2005 4:02 PM, Don Deskins wrote: > Hello, > > I am new to mapserver and mapscript. I have been playing with it for a few > weeks and am pleased with a lot of it. > > I have run into a problem with a tiled raster layer. I have tried to > display images individually (jpg's) and can display them. When I use a > tiled layer, nothing happens... no error and no display. I have tried both > types of layering as discussed in another thread. (I used gdalindex to > create the shp file). Don, The most common problem with tileindexes is related to how MapServer internally builds the path to the file from the path to the map, the "SHAPEPATH", the path to the tileindex shapefile and the path within. I don't actually know for sure how it is supposed to work, but I would suggest you just use absolute paths inside your tileindex. This can be accomplished by using absolute paths when you invoke gdaltindex. Of course, this might not be the problem. You may also find it helpful to follow normal debugging mechanisms, turning on debug, using shp2img, etc. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From lucamarle at GMAIL.COM Fri Apr 1 14:23:57 2005 From: lucamarle at GMAIL.COM (luca marletta) Date: Sat, 2 Apr 2005 00:23:57 +0200 Subject: jBox image problem In-Reply-To: <8b502010504011423a5589b2@mail.gmail.com> Message-ID: Welcome into the club Lluis. In my case sometimes appears an error "jbox.class not found" but is definitely there! I hope someone give a little hint helping us ciao On Apr 1, 2005 9:33 PM, Llu?s Garcia i Mestres wrote: > Hi, > > My own mapserver maps were working ok, and I decide to implement the > jBox. I followed the instructions, but any image is displayed. I've > j2sdk installed. The image (png) is created in tmp directory but not > in the browser. > > codebase="/mapserver/dades/java/jBox" > archive="jBoxPNG.jar,png.jar"" > code="jBoxPNG.class" > width="500" > height="400" > name="jBox" > MAYSCRIPT> > > > > Even any box appears in the area where should be the image. Any > suggestion to figure out this? > > Llu?s > -- luca marletta icq: 70590647 -- luca marletta icq: 70590647 From gmanepal at GMAIL.COM Fri Apr 1 16:09:55 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Fri, 1 Apr 2005 19:09:55 -0500 Subject: Drawing the point on the map and adding it to shapefile In-Reply-To: <424BF375.1040605@terrestris.de> Message-ID: Hello Till, Recently there were few posts on how to convert a click on the map to a coordinate. I am infact looking out for one which you suggested. Can you provide me with the details anout your code and link to the example. Thanks, Giridhar > Dear Gambin, > > we do this by using UMN as WMS and write the click-coordinate from a > featureinfo request back to a PostGIS database. > You are able to edit the attributes and upload images, etc. > > If this helps, I can send you the code and a link to an example, > > Till > > -- > > Mit freundlichen Gr?ssen aus Bonn, > > Till Adams > > ****************************************** > * AmeiN! ArcGIS Map-Export-2-UMN * > * AmeiN! Workshop 11. Mai 2005 * > * http://www.terrestris.de * > ****************************************** > > ------------------------------------------ > > Dipl. Geogr. Till Adams > terrestris, Paulsen&Adams GbR > Siemensstr. 8 * 53121 Bonn > Tel.: 0228 962 899 52 * Fax.: 0228 962 899 57 > info at terrestris.de * www.terrestris.de > From bob.basques at CI.STPAUL.MN.US Fri Apr 1 21:29:12 2005 From: bob.basques at CI.STPAUL.MN.US (Blammo) Date: Fri, 1 Apr 2005 23:29:12 -0600 Subject: Limiting a zoom. Message-ID: All, Is there a way to have the zoom value max out at some value, where the map can't be zoomed out any further, or even in the reverse, where the user couldn't zoom in past a certain point. Not just not display (as with the MIN/MAXSCALE values in the MAP file, but not to even have the scale of the map go beyond an upper or lower threshold. What I would like to do when these upper and lower thresholds are reach is to simply pan and recenter the view from the picked area. Basically not zoom out any further than the reference image for example. I'm using the CGI version of MapServer. Maybe someone has a trick up their sleeve for this. bobb From dbkeon.ml at GMAIL.COM Fri Apr 1 22:24:20 2005 From: dbkeon.ml at GMAIL.COM (Dylan Keon) Date: Fri, 1 Apr 2005 22:24:20 -0800 Subject: Limiting a zoom. In-Reply-To: <424E2DA8.4060804@ci.stpaul.mn.us> Message-ID: On 04/01/2005 09:29 PM Blammo wrote the following: > All, > > Is there a way to have the zoom value max out at some value, where the > map can't be zoomed out any further, or even in the reverse, where the > user couldn't zoom in past a certain point. Not just not display (as > with the MIN/MAXSCALE values in the MAP file, but not to even have the > scale of the map go beyond an upper or lower threshold. > > What I would like to do when these upper and lower thresholds are reach > is to simply pan and recenter the view from the picked area. Basically > not zoom out any further than the reference image for example. MINSCALE and MAXSCALE in the WEB object should do what you want. Note that this is different than MIN/MAXSCALE in the LAYER object. http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#web --Dylan From ferencik.ioan at PERSONAL.RO Sat Apr 2 02:52:09 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Sat, 2 Apr 2005 13:52:09 +0300 Subject: new user problem Message-ID: Hi list, i still have some problems with mapserver. I created a mapfile wich I can in map mode with IE6 or Firefox. Though, in browse mode i see only a blank picture, instead of PNG file itself I see a path to that PNG file. When I click on map it doesn't give me any error it seems taht the aplication is capable of panning. I do not understand what is happenning because I don't receive any error message. I use folowing map file: MAP IMAGETYPE PNG24 #EXTENT 349932 529491 358227 537108 # extent alba EXTENT 388605 583929 398798 590500 FONTSET "fonts/fonts.list" SIZE 1000 1000 SHAPEPATH "date" IMAGECOLOR 255 255 255 TEMPLATEPATTERN "index" NAME "raster" PROJECTION "init=epsg:31700" END # Start of LAYER DEFINITIONS --------------------------------------------- LAYER # layer de tip raster NAME dem DATA "cluj.tif" TYPE RASTER PROJECTION "init=epsg:31700" END STATUS default PROCESSING "BANDS=1,2,3" END #--sfarsit layer de tip raster LAYER # States polygon layer begins here NAME test DATA strazi STATUS DEFAULT TYPE LINE PROJECTION "init=epsg:31700" END #CLASSITEM "NAME" LABELITEM "NAME" CLASS COLOR 255 255 255 LABEL COLOR 0 0 0 TYPE TRUETYPE FONT arial SIZE 8 POSITION LL PARTIALS true MINDISTANCE 300 #BUFFER 4 END END END # End of LAYER DEFINITIONS ------------------------------- WEB IMAGEPATH "c:\ms4w\rosia\tmp\" IMAGEURL "c:\ms4w\rosia\tmp\" TEMPLATE 'index.html' LOG mslog.txt END END # end of map file/object and this is my template file: Aplicatie Mapserver

Aplicatie Mapserver


Can anyone give me a hint? Thanks in advance _____________________________________________ Castiga peste 1000 de premii cu Wella Design! http://wella.boom.ro From chatterjee_sharmistha2 at REDIFFMAIL.COM Sat Apr 2 03:42:34 2005 From: chatterjee_sharmistha2 at REDIFFMAIL.COM (Sharmistha) Date: Sat, 2 Apr 2005 11:42:34 -0000 Subject: No subject Message-ID: ? How can i get some sample codes for legend creation using php mapscript -------------- next part -------------- An HTML attachment was scrubbed... URL: From gireddy at GMAIL.COM Sat Apr 2 04:17:56 2005 From: gireddy at GMAIL.COM (Shashi Gireddy) Date: Sat, 2 Apr 2005 06:17:56 -0600 Subject: mergin shape files Message-ID: Does anybody has any idea of how to merge two or more shape files in arcview 3.3. thank you, shashi. -- Shashi Kiran Reddy. Gireddy, Graduate Assistant, CBER, University of Alabama. http://www.cs.ua.edu/shashi Home: 205-752-5137 Cell: 205-657-1438 From ferencik.ioan at PERSONAL.RO Sat Apr 2 04:59:30 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Sat, 2 Apr 2005 15:59:30 +0300 Subject: mergin shape files Message-ID: It's quite simple, use arcview extensions for that(http://arcscripts.esri.com) for example search here geoprocessing or something similar > Does anybody has any idea of how to merge two or more shape files in > arcview 3.3. > > thank you, > shashi. > > -- > Shashi Kiran Reddy. Gireddy, > Graduate Assistant, > CBER, University of Alabama. > http://www.cs.ua.edu/shashi > Home: 205-752-5137 Cell: 205-657-1438 > _____________________________________________ Castiga peste 1000 de premii cu Wella Design! http://wella.boom.ro From ed at TOPOZONE.COM Sat Apr 2 05:50:57 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Sat, 2 Apr 2005 08:50:57 -0500 Subject: new user problem Message-ID: Ferencik - You didn't follow the instructions I gave you the first time you asked. You changed your IMAGEURL from a URL to a file path, and that's why you see the path to the PNG file. Your IMAGEURL should not have been changed from the original value you were using when you first asked the question - it should be just "tmp". The URL for a MapServer image in browse mode is created by adding the filename of the generated file to the string in the IMAGEURL statement. If you modify the IMAGEURL, you'll see that the URL to the PNG file in the generated HTML output changes. Just chang the IMAGEURL until the generated URL is correct and pointing to the images. You are getting an "error message" - the broken link icon is telling you that the file can't be found! - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Ferencik Ioan Sent: Saturday, April 02, 2005 5:52 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] new user problem Hi list, i still have some problems with mapserver. I created a mapfile wich I can in map mode with IE6 or Firefox. Though, in browse mode i see only a blank picture, instead of PNG file itself I see a path to that PNG file. When I click on map it doesn't give me any error it seems taht the aplication is capable of panning. I do not understand what is happenning because I don't receive any error message. I use folowing map file: MAP IMAGETYPE PNG24 #EXTENT 349932 529491 358227 537108 # extent alba EXTENT 388605 583929 398798 590500 FONTSET "fonts/fonts.list" SIZE 1000 1000 SHAPEPATH "date" IMAGECOLOR 255 255 255 TEMPLATEPATTERN "index" NAME "raster" PROJECTION "init=epsg:31700" END # Start of LAYER DEFINITIONS --------------------------------------------- LAYER # layer de tip raster NAME dem DATA "cluj.tif" TYPE RASTER PROJECTION "init=epsg:31700" END STATUS default PROCESSING "BANDS=1,2,3" END #--sfarsit layer de tip raster LAYER # States polygon layer begins here NAME test DATA strazi STATUS DEFAULT TYPE LINE PROJECTION "init=epsg:31700" END #CLASSITEM "NAME" LABELITEM "NAME" CLASS COLOR 255 255 255 LABEL COLOR 0 0 0 TYPE TRUETYPE FONT arial SIZE 8 POSITION LL PARTIALS true MINDISTANCE 300 #BUFFER 4 END END END # End of LAYER DEFINITIONS ------------------------------- WEB IMAGEPATH "c:\ms4w\rosia\tmp\" IMAGEURL "c:\ms4w\rosia\tmp\" TEMPLATE 'index.html' LOG mslog.txt END END # end of map file/object and this is my template file: Aplicatie Mapserver

Aplicatie Mapserver


Can anyone give me a hint? Thanks in advance _____________________________________________ Castiga peste 1000 de premii cu Wella Design! http://wella.boom.ro From richard.greenwood at GMAIL.COM Sat Apr 2 06:01:44 2005 From: richard.greenwood at GMAIL.COM (Richard Greenwood) Date: Sat, 2 Apr 2005 14:01:44 +0000 Subject: =?utf-8?b?W1VNTl9NQVBTRVJWRVItVVNFUlNd?= jBox image problem Message-ID: > On Apr 1, 2005 9:33 PM, Llu?s Garcia i Mestres gmail.com> wrote: > > Hi, > > > > My own mapserver maps were working ok, and I decide to implement the > > jBox. I followed the instructions, but any image is displayed. I've > > j2sdk installed. The image (png) is created in tmp directory but not > > in the browser. > > > > > codebase="/mapserver/dades/java/jBox" > > archive="jBoxPNG.jar,png.jar"" > > code="jBoxPNG.class" > > width="500" > > height="400" > > name="jBox" > > MAYSCRIPT> > > > > > > > > Even any box appears in the area where should be the image. Any > > suggestion to figure out this? > > > > Llu?s > > > > -- > luca marletta icq: 70590647 > 1. You have an extra quote mark at the end of the line: archive="jBoxPNG.jar,png.jar"" 2. You do not need to use jBoxPNG with the Sun Java VM, so try with just: archive="jBox.jar" code="jBox.class" 3. Is jBox.jar in /mapserver/dades/java/jBox ? 4. Is your browser reporting any errors? Rich From ferencik.ioan at PERSONAL.RO Sat Apr 2 06:43:13 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Sat, 2 Apr 2005 17:43:13 +0300 Subject: new user problem Message-ID: I modified IMAGEURL to /tmp/ and still the same:)) I attached a screenshot I see in Firefox instead map > Ferencik - > > You didn't follow the instructions I gave you the first time you asked. > You changed your IMAGEURL from a URL to a file path, and that's why you > see the path to the PNG file. Your IMAGEURL should not have been > changed from the original value you were using when you first asked the > question - it should be just "tmp". > > The URL for a MapServer image in browse mode is created by adding the > filename of the generated file to the string in the IMAGEURL statement. > If you modify the IMAGEURL, you'll see that the URL to the PNG file in > the generated HTML output changes. Just chang the IMAGEURL until the > generated URL is correct and pointing to the images. > > You are getting an "error message" - the broken link icon is telling you > that the file can't be found! > > - Ed > > Ed McNierney > President and Chief Mapmaker > TopoZone.com / Maps a la carte, Inc. > 73 Princeton Street, Suite 305 > North Chelmsford, MA 01863 > Phone: +1 (978) 251-4242 > Fax: +1 (978) 251-1396 > ed at topozone.com > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On > Behalf Of Ferencik Ioan > Sent: Saturday, April 02, 2005 5:52 AM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: [UMN_MAPSERVER-USERS] new user problem > > Hi list, > > i still have some problems with mapserver. I created a mapfile wich I > can in map mode with IE6 or Firefox. Though, in browse mode i see only > a blank picture, instead of PNG file itself I see a path to that PNG > file. When I click on map it doesn't give me any error it seems taht the > aplication is capable of panning. I do not understand what is happenning > because I don't receive any error message. > > I use folowing map file: > > MAP > IMAGETYPE PNG24 > #EXTENT 349932 529491 358227 537108 # extent alba > EXTENT 388605 583929 398798 590500 > FONTSET "fonts/fonts.list" > SIZE 1000 1000 > SHAPEPATH "date" > IMAGECOLOR 255 255 255 > TEMPLATEPATTERN "index" > NAME "raster" > PROJECTION > "init=epsg:31700" > END > # Start of LAYER DEFINITIONS > --------------------------------------------- > LAYER # layer de tip raster > NAME dem > DATA "cluj.tif" > TYPE RASTER > PROJECTION > "init=epsg:31700" > END > STATUS default > PROCESSING "BANDS=1,2,3" > END #--sfarsit layer de tip raster > LAYER # States polygon layer begins here > NAME test > DATA strazi > STATUS DEFAULT > TYPE LINE > PROJECTION > "init=epsg:31700" > END > #CLASSITEM "NAME" > LABELITEM "NAME" > CLASS > > COLOR 255 255 255 > LABEL > COLOR 0 0 0 > TYPE TRUETYPE > FONT arial > SIZE 8 > > POSITION LL > PARTIALS true > MINDISTANCE 300 > #BUFFER 4 > END > END > END > > # End of LAYER DEFINITIONS ------------------------------- > WEB > IMAGEPATH "c:\ms4w\rosia\tmp\" > IMAGEURL "c:\ms4w\rosia\tmp\" > TEMPLATE 'index.html' > LOG mslog.txt > > END > > > END # end of map file/object > > > and this is my template file: > > > Aplicatie > Mapserver
method="GET" > > > > > > > >

Aplicatie > Mapserver


>
> > value="c:\ms4w\rosia\tmp\raster11124387134088.png" width="500" > height="500"> > > > >
> > >
> > > > > > > > > > > > > Can anyone give me a hint? > Thanks in advance > > > _____________________________________________ > Castiga peste 1000 de premii cu Wella Design! > http://wella.boom.ro > _____________________________________________ Castiga peste 1000 de premii cu Wella Design! http://wella.boom.ro -------------- next part -------------- A non-text attachment was scrubbed... Name: ms.png Type: image/x-png Size: 79522 bytes Desc: not available URL: From gmanepal at GMAIL.COM Sat Apr 2 08:33:11 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Sat, 2 Apr 2005 11:33:11 -0500 Subject: new user problem In-Reply-To: <200504021443.j32EhDw19947@zerg.astral.ro> Message-ID: Hello, IMAGEURL should not have a value which is a file-path. It should be a relative address from cgi-bin directory. If cgi-bin points to rosia in your case, then IMAGEURL should point to "tmp". If you still get the error, follow up this message with your cgi-bin directory. Regards, Giridhar On Apr 2, 2005 9:43 AM, Ferencik Ioan wrote: > > I modified IMAGEURL to /tmp/ and still the same:)) > I attached a screenshot I see in Firefox instead map > > > > Ferencik - > > > > You didn't follow the instructions I gave you the first time you asked. > > You changed your IMAGEURL from a URL to a file path, and that's why you > > see the path to the PNG file. Your IMAGEURL should not have been > > changed from the original value you were using when you first asked the > > question - it should be just "tmp". > > > > The URL for a MapServer image in browse mode is created by adding the > > filename of the generated file to the string in the IMAGEURL statement. > > If you modify the IMAGEURL, you'll see that the URL to the PNG file in > > the generated HTML output changes. Just chang the IMAGEURL until the > > generated URL is correct and pointing to the images. > > > > You are getting an "error message" - the broken link icon is telling you > > that the file can't be found! > > > > - Ed > > > > Ed McNierney > > President and Chief Mapmaker > > TopoZone.com / Maps a la carte, Inc. > > 73 Princeton Street, Suite 305 > > North Chelmsford, MA 01863 > > Phone: +1 (978) 251-4242 > > Fax: +1 (978) 251-1396 > > ed at topozone.com > > > > -----Original Message----- > > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On > > Behalf Of Ferencik Ioan > > Sent: Saturday, April 02, 2005 5:52 AM > > To: MAPSERVER-USERS at LISTS.UMN.EDU > > Subject: [UMN_MAPSERVER-USERS] new user problem > > > > Hi list, > > > > i still have some problems with mapserver. I created a mapfile wich I > > can in map mode with IE6 or Firefox. Though, in browse mode i see only > > a blank picture, instead of PNG file itself I see a path to that PNG > > file. When I click on map it doesn't give me any error it seems taht the > > aplication is capable of panning. I do not understand what is happenning > > because I don't receive any error message. > > > > I use folowing map file: > > > > MAP > > IMAGETYPE PNG24 > > #EXTENT 349932 529491 358227 537108 # extent alba > > EXTENT 388605 583929 398798 590500 > > FONTSET "fonts/fonts.list" > > SIZE 1000 1000 > > SHAPEPATH "date" > > IMAGECOLOR 255 255 255 > > TEMPLATEPATTERN "index" > > NAME "raster" > > PROJECTION > > "init=epsg:31700" > > END > > # Start of LAYER DEFINITIONS > > --------------------------------------------- > > LAYER # layer de tip raster > > NAME dem > > DATA "cluj.tif" > > TYPE RASTER > > PROJECTION > > "init=epsg:31700" > > END > > STATUS default > > PROCESSING "BANDS=1,2,3" > > END #--sfarsit layer de tip raster > > LAYER # States polygon layer begins here > > NAME test > > DATA strazi > > STATUS DEFAULT > > TYPE LINE > > PROJECTION > > "init=epsg:31700" > > END > > #CLASSITEM "NAME" > > LABELITEM "NAME" > > CLASS > > > > COLOR 255 255 255 > > LABEL > > COLOR 0 0 0 > > TYPE TRUETYPE > > FONT arial > > SIZE 8 > > > > POSITION LL > > PARTIALS true > > MINDISTANCE 300 > > #BUFFER 4 > > END > > END > > END > > > > # End of LAYER DEFINITIONS ------------------------------- > > WEB > > IMAGEPATH "c:\ms4w\rosia\tmp\" > > IMAGEURL "c:\ms4w\rosia\tmp\" > > TEMPLATE 'index.html' > > LOG mslog.txt > > > > END > > > > > > END # end of map file/object > > > > > > and this is my template file: > > > > > > Aplicatie > > Mapserver
> method="GET" > > > > > > > > > > > > > > >

Aplicatie > > Mapserver


> >
> > > > > value="c:\ms4w\rosia\tmp\raster11124387134088.png" width="500" > > height="500"> > > > > > > > >
> > > > > >
> > > > > > > > > > > > > > > > > > > > > > > > > > Can anyone give me a hint? > > Thanks in advance > > > > > > _____________________________________________ > > Castiga peste 1000 de premii cu Wella Design! > > http://wella.boom.ro > > > > _____________________________________________ > Castiga peste 1000 de premii cu Wella Design! > http://wella.boom.ro > > > From ed at TOPOZONE.COM Sat Apr 2 11:24:04 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Sat, 2 Apr 2005 14:24:04 -0500 Subject: new user problem Message-ID: Ferencik - I am certain that the image URL in the generated HTML out is NOT "still the same". Take a look at what it is, and adjust it appropriately. I believe I recommended below that you change it to "tmp", not to "/tmp/". - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Ferencik Ioan Sent: Saturday, April 02, 2005 9:43 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] new user problem I modified IMAGEURL to /tmp/ and still the same:)) I attached a screenshot I see in Firefox instead map > Ferencik - > > You didn't follow the instructions I gave you the first time you asked. > You changed your IMAGEURL from a URL to a file path, and that's why > you see the path to the PNG file. Your IMAGEURL should not have been > changed from the original value you were using when you first asked > the question - it should be just "tmp". > > The URL for a MapServer image in browse mode is created by adding the > filename of the generated file to the string in the IMAGEURL statement. > If you modify the IMAGEURL, you'll see that the URL to the PNG file in > the generated HTML output changes. Just chang the IMAGEURL until the > generated URL is correct and pointing to the images. > > You are getting an "error message" - the broken link icon is telling > you that the file can't be found! > > - Ed > > Ed McNierney > President and Chief Mapmaker > TopoZone.com / Maps a la carte, Inc. > 73 Princeton Street, Suite 305 > North Chelmsford, MA 01863 > Phone: +1 (978) 251-4242 > Fax: +1 (978) 251-1396 > ed at topozone.com > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] > On Behalf Of Ferencik Ioan > Sent: Saturday, April 02, 2005 5:52 AM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: [UMN_MAPSERVER-USERS] new user problem > > Hi list, > > i still have some problems with mapserver. I created a mapfile wich I > can in map mode with IE6 or Firefox. Though, in browse mode i see only > a blank picture, instead of PNG file itself I see a path to that PNG > file. When I click on map it doesn't give me any error it seems taht > the aplication is capable of panning. I do not understand what is > happenning because I don't receive any error message. > > I use folowing map file: > > MAP > IMAGETYPE PNG24 > #EXTENT 349932 529491 358227 537108 # extent alba > EXTENT 388605 583929 398798 590500 > FONTSET "fonts/fonts.list" > SIZE 1000 1000 > SHAPEPATH "date" > IMAGECOLOR 255 255 255 > TEMPLATEPATTERN "index" > NAME "raster" > PROJECTION > "init=epsg:31700" > END > # Start of LAYER DEFINITIONS > --------------------------------------------- > LAYER # layer de tip raster > NAME dem > DATA "cluj.tif" > TYPE RASTER > PROJECTION > "init=epsg:31700" > END > STATUS default > PROCESSING "BANDS=1,2,3" > END #--sfarsit layer de tip raster > LAYER # States polygon layer begins here > NAME test > DATA strazi > STATUS DEFAULT > TYPE LINE > PROJECTION > "init=epsg:31700" > END > #CLASSITEM "NAME" > LABELITEM "NAME" > CLASS > > COLOR 255 255 255 > LABEL > COLOR 0 0 0 > TYPE TRUETYPE > FONT arial > SIZE 8 > > POSITION LL > PARTIALS true > MINDISTANCE 300 > #BUFFER 4 > END > END > END > > # End of LAYER DEFINITIONS ------------------------------- > WEB > IMAGEPATH "c:\ms4w\rosia\tmp\" > IMAGEURL "c:\ms4w\rosia\tmp\" > TEMPLATE 'index.html' > LOG mslog.txt > > END > > > END # end of map file/object > > > and this is my template file: > > > Aplicatie > Mapserver
method="GET" > > > > > > > >

Aplicatie > Mapserver


>
> > value="c:\ms4w\rosia\tmp\raster11124387134088.png" width="500" > height="500"> > > > >
> > >
> > > > > > > > > > > > > Can anyone give me a hint? > Thanks in advance > > > _____________________________________________ > Castiga peste 1000 de premii cu Wella Design! > http://wella.boom.ro > _____________________________________________ Castiga peste 1000 de premii cu Wella Design! http://wella.boom.ro From gmanepal at GMAIL.COM Sat Apr 2 12:02:28 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Sat, 2 Apr 2005 15:02:28 -0500 Subject: Mapscript PostGIS Message-ID: Hello All, Usually with Mapserver CGI, we do CONNECTIONTYPE POSTGIS CONNECTION "blah blah blah" Data " from " to render onto an image. How is it possible to create the same thing, but this time the DATA should be using Mapscript /PHP something like : $mapObj = ms_newMapObj(''); $imageObj = $mapObj->draw(); $layerObj = $mapObj->getLayerByName(''); $sql = "SELECT from
$rs = odbc_exec($conn, $sql); $polygons = array(); # use this $rs to create a layer of POLYGONS. It means that is of type POLYGON. Thus $rs has to be populated in $polygons # something like foreach ($polygons => $poly) { # Draw the $poly onto the image } In essense, how do I get the shape information of polygons from the database using mapscript. Thanks in advance,. Giridhar From woodbri at SWOODBRIDGE.COM Sat Apr 2 13:36:28 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Sat, 2 Apr 2005 16:36:28 -0500 Subject: Mapscript PostGIS In-Reply-To: <6d675eda05040212022519ba29@mail.gmail.com> Message-ID: Giridhar Manepalli wrote: > Hello All, > > Usually with Mapserver CGI, we do > CONNECTIONTYPE POSTGIS > CONNECTION "blah blah blah" > Data " from
" > > to render onto an image. > > How is it possible to create the same thing, but this time the DATA > should be using Mapscript /PHP > > something like : > $mapObj = ms_newMapObj(''); > $imageObj = $mapObj->draw(); > $layerObj = $mapObj->getLayerByName(''); > $sql = "SELECT from
> $rs = odbc_exec($conn, $sql); > > $polygons = array(); > # use this $rs to create a layer of POLYGONS. It means that is > of type POLYGON. Thus $rs has to be populated in $polygons > > # something like > foreach ($polygons => $poly) { > # Draw the $poly onto the image > } > > In essense, how do I get the shape information of polygons from the > database using mapscript. > > Thanks in advance,. > > Giridhar > As far as I know you have to "select asText(geom) as geom from
" and then parse the text into arrays to do whatever you want with the it. -Steve From clavinji at YAHOO.COM Sat Apr 2 13:43:11 2005 From: clavinji at YAHOO.COM (Jim Clavin) Date: Sat, 2 Apr 2005 15:43:11 -0600 Subject: Map will not display Message-ID: Hello All, Would appreciate your help. I am running Apache 2.0.53. I have run the demos successfully. This is my first attempt with my own dataset. I have included the .map file, the .phtml file, and a .txt generated by ogrinfo on my .shp file. Here is my .map file: MAP NAME COASTAL SIZE 800 500 IMAGETYPE PNG IMAGECOLOR 240 240 240 SHAPEPATH "C:\Program Files\Apache Group\Apache2\htdocs\data\" EXTENT -78.275652 33.849300 -76.849048 35.038803 #UNITS METERS # PROJECTION # #"proj=lcc" #"lat_1=32" #"lat_2=44" #"lat_0=38" #"lon_0=-100" #"x_0=0" #"y_0=0" #"ellps=GRS80" #"datum=NAD83" #END WEB IMAGEPATH "C:\Program Files\Apache Group\Apache2\htdocs\temp\ms_temp" IMAGEURL "/temp/ms_temp" END LAYER NAME "North Carolina New Hanover Coastline" TYPE POLYGON STATUS DEFAULT DATA "Coastlines" #PROJECTION # "proj=latlong" # "ellps=GRS80" # "datum=NAD83" #END CLASS NAME "Counties" EXPRESSION 'land' OUTLINECOLOR 60 60 60 COLOR 255 255 0 SYMBOL 0 END END LAYER NAME "credits" STATUS DEFAULT TRANSFORM FALSE TYPE ANNOTATION FEATURE POINTS 10 480 END TEXT 'Made with Mapserver.' END CLASS LABEL TYPE BITMAP POSITION CR COLOR 0 0 0 END END END END Here is my .phtml file: draw(); $image_url=$image->saveWebImage(); ?> New Hanover County

This is a very simple example using only one data layer, a vector file. You can download the datafile yourself from the USGS National Atlas. The URL for this layer, the US States Boundaries in Shapefile format, is http://edcftp.cr.usgs.gov/pub/data/nationalatlas/statesp020.tar.gz.

This example also draws some unprojected, static text. You can use this technique to label your maps: apply titles, timestamps, or copyright information.

Source for all recipes: http://www.mobilegeographics.com/mapserver/MSrecipes.tar.gz

return to Mapserver Recipes

Here is my .txt file, generated by ogrinfo on my .shp file: INFO: Open of `Coastlines.shp' using driver `ESRI Shapefile' successful. Layer name: Coastlines Geometry: Line String Feature Count: 25 Extent: (-78.275652, 33.849300) - (-76.849048, 35.038803) Layer SRS WKT: GEOGCS["GCS_WGS_1984", DATUM["WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]] OBJECTID: Integer (10.0) DHT_OID: Integer (10.0) LHT_OID: Integer (10.0) F_CODE: String (5.0) F_CODE_DES: String (255.0) ACC: Integer (4.0) ACC_DESCRI: String (20.0) EXS: Integer (4.0) EXS_DESCRI: String (50.0) OGRFeature(Coastlines):0 OBJECTID (Integer) = 9783 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-76.84904840 34.98498000,-76.86047360 34.98987580,-76.87091820 34.99805840) OGRFeature(Coastlines):1 OBJECTID (Integer) = 9785 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-76.90056620 34.95346460,-76.90021520 34.95690540,-76.94039920 34.97190860,-76.95136260 34.98261260,-76.96627800 34.99084100,-76.97509000 34.99761580,-76.97743220 35.00000000,-76.98330680 35.00598520,-76.98326880 35.00828180,-76.96020500 35.03139880,-76.95170600 35.03748700,-76.94721220 35.03880320,-76.93942260 35.03709420,-76.93500520 35.03405000,-76.94120020 35.03160860,-76.93266300 35.02552420,-76.92681120 35.02475740,-76.92295080 35.02218240,-76.91896060 35.02603140,-76.91365820 35.02573020,-76.90708160 35.01921460,-76.88117220 35.00210180,-76.87531280 35.00179300,-76.87319940 35.00000000) OGRFeature(Coastlines):2 OBJECTID (Integer) = 9786 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-76.89619440 34.94858560,-76.89144900 34.94852060,-76.88648220 34.94592660,-76.87444300 34.94759760,-76.86804960 34.94659040,-76.86254120 34.94284060) OGRFeature(Coastlines):3 OBJECTID (Integer) = 9789 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-76.85399620 34.93744280,-76.84904840 34.93876320) OGRFeature(Coastlines):4 OBJECTID (Integer) = 9796 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.03204340 34.67510220,-77.01937860 34.68320840,-77.02241520 34.68439480,-77.03672800 34.67745600,-77.03593440 34.67515180,-77.03204340 34.67510220) OGRFeature(Coastlines):5 OBJECTID (Integer) = 9798 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.15934000 34.62979880,-77.15002440 34.63841240,-77.14555360 34.63974000,-77.13666540 34.63917920,-77.12937920 34.64276500,-77.12387080 34.63971720,-77.11936180 34.64333720,-77.11752320 34.63665780,-77.12370300 34.63305660,-77.14036560 34.63417060,-77.15573880 34.62906640,-77.15934000 34.62979880) OGRFeature(Coastlines):6 OBJECTID (Integer) = 9799 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.16133120 34.62683480,-77.16464240 34.62825020,-77.16762540 34.62778860,-77.17473600 34.62308500,-77.17420960 34.62101360,-77.17116540 34.62029260,-77.16133120 34.62683480) OGRFeature(Coastlines):7 OBJECTID (Integer) = 9802 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.65919500 34.34861380,-77.65217600 34.36056900,-77.64856720 34.36100000,-77.64456180 34.36708060) OGRFeature(Coastlines):8 OBJECTID (Integer) = 9803 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.68233480 34.33622360,-77.68666840 34.33115380) OGRFeature(Coastlines):9 OBJECTID (Integer) = 9804 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.68831640 34.32786180,-77.68615720 34.32751460,-77.68746180 34.32202920,-77.71648400 34.29790120) OGRFeature(Coastlines):10 OBJECTID (Integer) = 9805 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.82119760 34.18793480,-77.81169900 34.19935600,-77.81334680 34.20143120,-77.82581320 34.19805900,-77.82418820 34.19345860,-77.82530980 34.19140240,-77.82119760 34.18793480) OGRFeature(Coastlines):11 OBJECTID (Integer) = 9806 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.72320560 34.28991320,-77.77147680 34.24615860,-77.77476500 34.24939340,-77.77976220 34.24758520,-77.78362280 34.24921800,-77.78584280 34.24808500,-77.78145600 34.24346540,-77.77703100 34.24366760,-77.77652740 34.23838800,-77.79876700 34.20315560,-77.81103520 34.19020460,-77.81153100 34.19195180,-77.80198660 34.20388800,-77.79606620 34.21739200,-77.79882820 34.21786880,-77.80664060 34.20988080,-77.80912780 34.20920940,-77.81462860 34.21314240,-77.81707760 34.21774680,-77.82468420 34.21133800,-77.83230600 34.21154400,-77.84055320 34.21653740,-77.84616080 34.21545800,-77.84010320 34.21146780,-77.83711240 34.20665740,-77.83441160 34.20593260,-77.83547220 34.20284280,-77.83223720 34.20380400,-77.83020020 34.20378500,-77.82910920 34.20083240,-77.83639520 34.18848040,-77.83337400 34.18639760,-77.83181000 34.18320840,-77.82646180 34.18658820,-77.82572940 34.18221280,-77.82915500 34.17956920,-77.83020780 34.17620080,-77.83156580 34.17607120,-77.83222200 34.17804720,-77.83526620 34.17821120,-77.83597560 34.17568580,-77.83816520 34.17472080,-77.84557340 34.18083200,-77.84653480 34.18478020,-77.85141000 34.18848040,-77.85613260 34.18992620,-77.86120600 34.19081120,-77.86595160 34.19056700) OGRFeature(Coastlines):12 OBJECTID (Integer) = 9807 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 0 ACC_DESCRI (String) = Unknown EXS (Integer) = 0 EXS_DESCRI (String) = Unknown LINESTRING (-77.86595160 34.19056700,-77.86361700 34.18773260,-77.85621640 34.18331140,-77.85233300 34.18187340,-77.84904480 34.17906580,-77.85510260 34.16426080) OGRFeature(Coastlines):13 OBJECTID (Integer) = 9808 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.94718940 34.11332700,-77.94580840 34.11423880,-77.94632720 34.11906060,-77.95126340 34.12436300,-77.95402520 34.12391660,-77.95487980 34.12047960,-77.95297240 34.11679840,-77.94718940 34.11332700) OGRFeature(Coastlines):14 OBJECTID (Integer) = 9809 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.94628900 34.08371740,-77.94351200 34.08576960,-77.94182580 34.09058000,-77.94564820 34.09679800,-77.94760900 34.09290320,-77.94628900 34.08371740) OGRFeature(Coastlines):15 OBJECTID (Integer) = 9810 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.95083620 33.93847280,-77.94308480 33.94371420,-77.94718180 33.94878380,-77.95378880 33.95064920,-77.95083620 33.93847280) OGRFeature(Coastlines):16 OBJECTID (Integer) = 9812 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 0 ACC_DESCRI (String) = Unknown EXS (Integer) = 0 EXS_DESCRI (String) = Unknown LINESTRING (-78.23641200 33.91332240,-78.22347260 33.91191480) OGRFeature(Coastlines):17 OBJECTID (Integer) = 9813 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.96699520 33.91147240,-77.95566560 33.91623680,-77.95237740 33.91323860,-77.94590760 33.93386080,-77.94699860 33.93570320,-77.94892880 33.93502420,-77.95368960 33.92288200,-77.95702360 33.91945640,-77.95921320 33.92176060,-77.96555320 33.92110440,-77.96749880 33.91790000,-77.97025300 33.91836920,-77.97191620 33.91654200,-77.96699520 33.91147240) OGRFeature(Coastlines):18 OBJECTID (Integer) = 9814 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.98767860 33.90720360,-77.97659300 33.91748040,-77.97520440 33.91999820,-77.97656240 33.92298880,-77.98455040 33.92256540,-77.99121860 33.91433340,-77.98819740 33.91294480,-77.98767860 33.90720360) OGRFeature(Coastlines):19 OBJECTID (Integer) = 9815 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-78.27565160 33.90941620,-78.25046540 33.91220860,-78.24605560 33.91426460,-78.23999020 33.91379160) OGRFeature(Coastlines):20 OBJECTID (Integer) = 9817 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.97075660 33.88211440,-77.96909340 33.88440320,-77.97341160 33.89773180,-77.97920220 33.89683920,-77.98252100 33.89479060,-77.99077600 33.89597320,-77.99161520 33.89368440,-77.98834220 33.88908000,-77.97544100 33.88213720,-77.97075660 33.88211440) OGRFeature(Coastlines):21 OBJECTID (Integer) = 9821 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.96569820 33.84930000,-77.96177680 33.86601260,-77.95561220 33.88273240,-77.95380400 33.90636060,-77.95488740 33.90820320,-77.95710000 33.90752420,-77.95961000 33.90271760,-77.95970920 33.88780220,-77.96504980 33.87107460,-77.98494720 33.88256460,-77.98483280 33.87781900,-77.98758700 33.87714380,-77.99251560 33.88152700,-77.99166880 33.88565060,-77.99661260 33.88773720,-78.00133520 33.88110360,-78.00794980 33.87952800,-78.01406860 33.86922840,-78.01300040 33.86417380,-78.00423440 33.85587700,-77.98389440 33.85050960,-77.98116540 33.84930000) OGRFeature(Coastlines):22 OBJECTID (Integer) = 9811 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.95594020 34.16959760,-77.95019540 34.16084680,-77.94587700 34.14453500,-77.93711860 34.13232800,-77.93415060 34.12267300,-77.93042000 34.10245900,-77.93270880 34.09053800,-77.92893980 34.07651900,-77.93093100 34.06803900,-77.92522440 34.05492780,-77.92641440 34.05123900,-77.92861180 34.04438780,-77.92484280 34.03037260,-77.92439280 34.01568220,-77.92754360 33.99940500,-77.92572780 33.98264320,-77.92826080 33.97554020,-77.93905640 33.96825020,-77.94407660 33.95978160,-77.93779760 33.95057300,-77.93815620 33.93841180,-77.93567660 33.93840020,-77.93241880 33.94057840,-77.93125160 33.94136420,-77.92623900 33.94822320,-77.91026300 33.98554620,-77.90732580 34.01077660,-77.88745120 34.06001280,-77.87680060 34.07189180,-77.84476480 34.14377600,-77.83555600 34.15519720,-77.83132180 34.16642000,-77.82205960 34.17151260,-77.81907660 34.17632300,-77.81941980 34.17734520,-77.82323460 34.17555240,-77.82537840 34.17438500,-77.83751680 34.16733160,-77.83974460 34.17004020,-77.84056100 34.16146860,-77.84837340 34.14775840,-77.84912880 34.15114600,-77.84938820 34.15344240,-77.85159300 34.15437320,-77.85414120 34.14589300,-77.86302940 34.14043420,-77.86525720 34.13792420,-77.86499780 34.13539880,-77.85695640 34.13925560,-77.85337060 34.13900380,-77.85504920 34.13557060,-77.86227420 34.13010400,-77.86364740 34.12932580,-77.86451720 34.12750620,-77.85993960 34.12802880,-77.85955040 34.12572860,-77.86233520 34.12229920,-77.86405940 34.11427680,-77.87103280 34.10490800,-77.86885080 34.10122300,-77.87107840 34.09870920,-77.87363440 34.08954240,-77.87918860 34.08498380,-77.87979120 34.07833100,-77.88648220 34.06941600,-77.89117440 34.06944280,-77.89574440 34.04881280,-77.89826200 34.04377740,-77.90102380 34.04333120,-77.90039820 34.05319600,-77.89221200 34.07839960,-77.88986200 34.09766380,-77.88345340 34.10612100,-77.88644400 34.11210260,-77.87838740 34.11848840,-77.87430580 34.13031000,-77.87047580 34.14139560,-77.86290740 34.15558240,-77.85510260 34.16426080) OGRFeature(Coastlines):23 OBJECTID (Integer) = 9816 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite LINESTRING (-77.97253420 34.16760640,-77.97395320 34.16210560,-77.97124480 34.15291220,-77.95358280 34.10807800,-77.95371240 34.08834460,-77.94756320 34.05733100,-77.95204160 34.04840460,-77.95180520 34.04532240,-77.95102700 34.03508760,-77.95412440 34.02477640,-77.96223440 34.00783160,-77.96424860 33.99544900,-77.96298980 33.97685620,-77.96549220 33.97365180,-77.97846980 33.97027200,-77.99635320 33.93227380,-77.99690240 33.93111040,-78.00189980 33.92470940,-78.02261360 33.91630560,-78.03065500 33.90738680,-78.03394320 33.90946580,-78.04051200 33.91821280,-78.05082700 33.92501840,-78.05266580 33.92502980,-78.05268860 33.92288580,-78.04300680 33.91569900,-78.03665920 33.90745540,-78.03618620 33.90304940,-78.05373380 33.91849520,-78.07107540 33.92200460,-78.08677680 33.92251960,-78.08790580 33.91678620,-78.08681480 33.91379920,-78.08351140 33.91401680,-78.08019260 33.91698840,-78.06338500 33.91738520,-78.05815120 33.91621780,-78.04334260 33.90330880,-78.03345480 33.89913940,-78.02272040 33.89725880,-78.01805880 33.89425660,-78.01752480 33.89126960,-78.01890560 33.88990020,-78.03405000 33.89041900,-78.05249020 33.89393620,-78.06595620 33.89834600,-78.07238000 33.89947900,-78.12981420 33.90958780,-78.14385980 33.91123580,-78.17829140 33.91179660,-78.20116420 33.90979380,-78.20776360 33.91371160) OGRFeature(Coastlines):24 OBJECTID (Integer) = 9801 DHT_OID (Integer) = 0 LHT_OID (Integer) = 0 F_CODE (String) = BA010 F_CODE_DES (String) = Coastline/Shoreline ACC (Integer) = 1 ACC_DESCRI (String) = Accurate EXS (Integer) = 1 EXS_DESCRI (String) = Definite MULTILINESTRING ((-77.64249420 34.36434560,-77.64751440 34.35805520,-77.64668280 34.35570900,-77.63972480 34.35864260,-77.63562780 34.36105340,-77.63164520 34.36339960,-77.61325080 34.38150400,-77.58860020 34.39727400,-77.56457520 34.41383740,-77.48022460 34.46328740,-77.45956420 34.47538380,-77.40205380 34.50217060,-77.35879520 34.51966100,-77.34819800 34.52602380,-77.34675600 34.52688980,-77.34104160 34.53831100,-77.33712000 34.54033660,-77.33524320 34.53572840,-77.33051300 34.53659820,-77.29863740 34.55211260,-77.25431820 34.58103180,-77.23497780 34.59184260,-77.23172760 34.59346000,-77.20473480 34.60689540,-77.18237300 34.61491020,-77.18085480 34.62269600,-77.17673500 34.62586600,-77.16564940 34.63164140,-77.15277100 34.64051060,-77.11389160 34.65406040,-77.10224160 34.66861340,-77.09793860 34.66030120,-77.10209660 34.64473720,-77.10103600 34.64197160,-77.08059700 34.65021900,-77.06531520 34.65473940,-77.05152140 34.65881720,-77.01495360 34.66662600,-76.98873900 34.67065040,-76.96925360 34.67131800,-76.93714140 34.67824180,-76.91616060 34.67989740,-76.87501520 34.68313600,-76.84904840 34.68855660),(-76.84904840 34.69541000,-76.85029600 34.69472880,-76.86092380 34.69212340,-76.87333680 34.69180680,-76.87845620 34.69167700,-76.89105220 34.68771740,-76.95881660 34.67921440,-76.97222900 34.67594900,-76.98666380 34.67751320,-76.99953460 34.67331700,-77.01760860 34.67354580,-77.02175140 34.67520520,-77.02239220 34.67503360,-77.04383080 34.66928100,-77.05384820 34.66871640,-77.06009680 34.67728800,-77.05342100 34.67743680,-77.05191040 34.68407440,-77.04798120 34.68609240,-77.04653160 34.68905640,-77.04402160 34.68948740,-77.04079440 34.68324660,-77.03804020 34.68183520,-77.03441620 34.68225100,-77.03044120 34.68656160,-77.02404020 34.68693920,-77.02121740 34.68897240,-77.01834100 34.69444280,-77.01277920 34.69437400,-77.01058200 34.69250860,-77.00501260 34.69289780,-76.99572000 34.69920740,-76.98200980 34.70339200,-76.98055260 34.70478820,-76.97634120 34.70882800,-76.96048740 34.70862200,-76.94698340 34.71625140,-76.94773860 34.72016140,-76.95544440 34.72462460,-76.95231620 34.72848520,-76.94246680 34.71940240,-76.92995460 34.71900560,-76.90864560 34.72698600,-76.90992740 34.73251340,-76.90437320 34.73220820,-76.89723200 34.72728720,-76.88889320 34.72648620,-76.87527460 34.72718040,-76.84989160 34.72846980,-76.84904840 34.72846480)) From saintsjd at YAHOO.COM Sat Apr 2 21:48:25 2005 From: saintsjd at YAHOO.COM (Jon Saints) Date: Sat, 2 Apr 2005 21:48:25 -0800 Subject: where to host python mapserver apps In-Reply-To: Message-ID: Anyone have recomendations for budget hosting companies for python mapscript mapserver apps? I am looking at hub.org, but the 256mb of disk space wont cut it for my imagery. Specific requirements: - mod_python - postgis - mapserver, python mapscript I dont mind compiling/installing if i must. Thanks Jon From mhbasa at YAHOO.COM Sun Apr 3 07:21:19 2005 From: mhbasa at YAHOO.COM (Mario H. Basa) Date: Sun, 3 Apr 2005 07:21:19 -0700 Subject: Java Mapscript zoomRectangle Message-ID: Hello there, I am having problems getting mapObj.zoomRectangle to work, always getting a java.lang.UnknownError: Georeferenced coordinates miny <= maxy error message even though my extents are correct. My code is here: rectObj myExtent = new rectObj(-1d,-1d,-1d,-1d,mapscript.MS_FALSE); rectObj myRect = new rectObj(-1d,-1d,-1d,-1d,mapscript.MS_FALSE); myExtent.setMinx(53705.02867345365); myExtent.setMiny(-113841.05840296435); myExtent.setMaxx(54498.23253009368); myExtent.setMaxy(-114298.67601256436); myRect.setMinx(138d); myRect.setMiny(88d); myRect.setMaxx(433d); myRect.setMaxy(312d); this.mapObj.zoomRectangle(myRect,650,375,myExtent,myExtent); I tried declaring myRect with a MS_TRUE parameter, but the error still persists. Is it the way I am declaring my rectObj which is at fault? Thanks. mario yokohama,japan __________________________________ Do you Yahoo!? Make Yahoo! your home page http://www.yahoo.com/r/hs From superbla3000 at GMX.NET Sun Apr 3 07:56:29 2005 From: superbla3000 at GMX.NET (joerg pfeiffer) Date: Sun, 3 Apr 2005 16:56:29 +0200 Subject: center lat long Message-ID: hello, I have a lat long coordinate and would like to center this with php mapscript. Which method do I use? Cause zoompoint needs pixel values.... Joerg From hobu at IASTATE.EDU Sun Apr 3 09:05:20 2005 From: hobu at IASTATE.EDU (Howard Butler) Date: Sun, 3 Apr 2005 10:05:20 -0600 Subject: Java Mapscript zoomRectangle In-Reply-To: Message-ID: Mario, your maxy is less than your miny (negative coordinate systems go the other way). maxy: -114298.67601256436 miny: -113841.05840296435 Howard At 7:21 AM -0700 4/3/05, Mario H. Basa wrote: >Hello there, > >I am having problems getting mapObj.zoomRectangle to >work, always getting a > >java.lang.UnknownError: Georeferenced coordinates miny ><= maxy > >error message even though my extents are correct. My >code is here: > >rectObj myExtent = new > >rectObj(-1d,-1d,-1d,-1d,mapscript.MS_FALSE); >rectObj myRect = new > >rectObj(-1d,-1d,-1d,-1d,mapscript.MS_FALSE); > > >myExtent.setMinx(53705.02867345365); >myExtent.setMiny(-113841.05840296435); >myExtent.setMaxx(54498.23253009368); >myExtent.setMaxy(-114298.67601256436); > >myRect.setMinx(138d); >myRect.setMiny(88d); >myRect.setMaxx(433d); >myRect.setMaxy(312d); > >this.mapObj.zoomRectangle(myRect,650,375,myExtent,myExtent); > > >I tried declaring myRect with a MS_TRUE parameter, but >the error still persists. Is it the way I am declaring >my rectObj which is at fault? > >Thanks. > >mario >yokohama,japan > > > >__________________________________ >Do you Yahoo!? >Make Yahoo! your home page >http://www.yahoo.com/r/hs From stigmata_blackangel at YAHOO.COM Sun Apr 3 09:36:31 2005 From: stigmata_blackangel at YAHOO.COM (Gregor Mosheh) Date: Sun, 3 Apr 2005 09:36:31 -0700 Subject: center lat long In-Reply-To: 6667 Message-ID: --- joerg pfeiffer wrote: > I have a lat long coordinate and would like to > center this with php mapscript. Step 1: Find the coords of the center. $center_x = ($map->extent[0] + $map->extent[2]) /2 $center_y = ($map->extent[1] + $map->extent[3]) /2 Step 2: Convert to latlong, if you're not already using latlong. $projInObj = ms_newprojectionobj($map->getProjection()); $projOutObj = ms_newprojectionobj("init=epsg:4269"); $poPoint = ms_newpointobj(); $poPoint->setXY($x, $y); $poPoint->project($projInObj, $projOutObj); $x = $poPoint->x; $y = $poPoint->y; Step 3: Now call whatever JavaScript or PHP/MS thing you use to set extents and draw your map. __________________________________ Do you Yahoo!? Yahoo! Personals - Better first dates. More second dates. http://personals.yahoo.com From sgillies at FRII.COM Sun Apr 3 10:06:47 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Sun, 3 Apr 2005 11:06:47 -0600 Subject: where to host python mapserver apps In-Reply-To: Message-ID: On Apr 2, 2005, at 10:48 PM, Jon Saints wrote: > Anyone have recomendations for budget hosting > companies for python mapscript mapserver apps? > > I am looking at hub.org, but the 256mb of disk space > wont cut it for my imagery. > > Specific requirements: > - mod_python > - postgis > - mapserver, python mapscript > > I dont mind compiling/installing if i must. > > Thanks > Jon > > Jon, What do you mean by budget? Seems to me that 250MB is about all you can expect for $20 a month. Did you see python-hosting.com? They don't mention PostGIS, but might be persuaded to install it. They also claim to have Zope (shared or dedicated), Plone (shared or dedicated), Webware, Twisted, CherryPy, SkunkWeb, Quixote, Spyce, Cheetah, mod_python I don't know anything about their services other than what I read from their site. cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From wouter.schaubroeck at GMAIL.COM Sun Apr 3 13:45:27 2005 From: wouter.schaubroeck at GMAIL.COM (Wouter Schaubroeck) Date: Sun, 3 Apr 2005 22:45:27 +0200 Subject: WMS GetCapabilities problem Message-ID: Hi all, I'm using the ms4w application you all know. I worked myself through the tutorial, and now i want to set up my own WMS Server. Therefor i used example 1.7. But when i want to test my WMS Server and perform a GetCapabilities request, Firefox is offering me the mapserv.exe file, in stead of an XML document. What am i doing wrong? This is my hyperlink with the request: http://192.168.2.3/cgi-bin/mapserv.exe?map=c:/ms4w/apache/htdocs/mapservertutorial/example1-7.map&SERVICE=WMS&VERSION1.1.1&REQUEST=GetCapabilities This is my MAP file: MAP NAME EX1.7_ IMAGETYPE PNG24 #EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514 # LAEA EXTENT -97.5 41.619778 -82.122902 49.38562 # Geographic SIZE 400 300 SHAPEPATH "c:\ms4w\apache\htdocs\mapservertutorial\data" SYMBOLSET "c:\ms4w\apache\htdocs\mapservertutorial\symbols\symbols35.sym" FONTSET "c:\ms4w\apache\htdocs\mapservertutorial\fonts\fonts.list" WEB IMAGEPATH 'c:\tmp\' IMAGEURL '\tmp\' METADATA "wms_title" "WMS_Test" "wms_onlineresource" "http://192.168.2.2/cgi-bin/mapserv.exe?map=c:\ms4w\apache\htdocs\mapservertutorial\example1-7.map&" "wms_srs" "EPSG:2136" END END PROJECTION # "proj=laea" # "ellps=clrk66" # "lat_0=45" # "lon_0=-100" # # Alternatively, you can specify an EPSG code. "init=epsg:2163" # END # Start of LAYER DEFINITIONS --------------------------------------------- LAYER # States polygon layer begins here NAME states DATA states_ugl STATUS OFF TYPE POLYGON PROJECTION "init=epsg:4326" END METADATA "wms_title" "States Polygon" "wms_srs" "epsg:4326" END CLASSITEM "CLASS" CLASS EXPRESSION 'land' SYMBOL 0 COLOR 232 232 232 END END # States polygon layer ends here LAYER # MODIS raster layer begins here NAME modis DATA "raster\mod09a12003161_ugl_ll_8bit.tif" STATUS OFF TYPE RASTER PROCESSING "BANDS=1,2,3" OFFSITE 71 74 65 # PROJECTION # "init=epsg:4326" # END END # MODIS raster layer ends here LAYER # LandSat WMS map from JPL (or from USGS) NAME LandSat TYPE RASTER OFFSITE 0 0 0 STATUS DEFAULT CONNECTIONTYPE WMS #CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?REQUEST=map&LAYERS=us_landsat7&STYLES=&FORMAT=png&TRANSPARENT=true" #verwijder de 1!! CONNECTION "http://gisdata.usgs.net/servlet/com.esri.wms.Esrimap?ServiceName=USGS_WMS_LANDSAT7&VERSION=1.0.0&REQUEST=map&Layers=LANDSAT7&SRS=EPSG:4326&REASPECT=false&Format=png&" METADATA "wms_title" "LandSat" "wms_name" "us_landsat7" "wms_server_version" "1.0.0" "wms_srs" "epsg:4326" "wms_format" "image/png" #"wms_title" "US_Landsat7" # "wms_srs" "epsg:4326" # "wms_connectiontimeout" "1000" END # PROJECTION # "init=epsg:4326" # END END # LandSat WMS image ends here LAYER # States line layer begins here NAME states DATA states_ugl STATUS DEFAULT TYPE LINE # PROJECTION # "init=epsg:4326" # END CLASSITEM "CLASS" CLASS EXPRESSION 'land' SYMBOL 'line5' COLOR 64 64 64 SIZE 1 END END # States line layer ends here LAYER # States label layer begins here NAME states DATA states_ugl STATUS DEFAULT TYPE ANNOTATION # PROJECTION # "init=epsg:4326" # END CLASSITEM "CLASS" LABELITEM "STATE" CLASS EXPRESSION 'land' COLOR -1 -1 -1 LABEL COLOR 255 255 255 TYPE TRUETYPE FONT arial-bold SIZE 12 ANTIALIAS TRUE POSITION CL PARTIALS FALSE MINDISTANCE 300 BUFFER 4 END # end of label END # end of class END # States label layer ends here # End of LAYER DEFINITIONS ------------------------------- END # end of map file -------------- next part -------------- An HTML attachment was scrubbed... URL: From wouter.schaubroeck at GMAIL.COM Sun Apr 3 13:46:11 2005 From: wouter.schaubroeck at GMAIL.COM (Wouter Schaubroeck) Date: Sun, 3 Apr 2005 22:46:11 +0200 Subject: WMS GetCapabilities problem Message-ID: Hi all, I'm using the ms4w application you all know. I worked myself through the tutorial, and now i want to set up my own WMS Server. Therefor i used example 1.7. But when i want to test my WMS Server and perform a GetCapabilities request, Firefox is offering me the mapserv.exe file, in stead of an XML document. What am i doing wrong? This is my hyperlink with the request: http://192.168.2.3/cgi-bin/mapserv.exe?map=c:/ms4w/apache/htdocs/mapservertutorial/example1-7.map&SERVICE=WMS&VERSION1.1.1&REQUEST=GetCapabilities This is my MAP file: MAP NAME EX1.7_ IMAGETYPE PNG24 #EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514 # LAEA EXTENT -97.5 41.619778 -82.122902 49.38562 # Geographic SIZE 400 300 SHAPEPATH "c:\ms4w\apache\htdocs\mapservertutorial\data" SYMBOLSET "c:\ms4w\apache\htdocs\mapservertutorial\symbols\symbols35.sym" FONTSET "c:\ms4w\apache\htdocs\mapservertutorial\fonts\fonts.list" WEB IMAGEPATH 'c:\tmp\' IMAGEURL '\tmp\' METADATA "wms_title" "WMS_Test" "wms_onlineresource" "http://192.168.2.2/cgi-bin/mapserv.exe?map=c:\ms4w\apache\htdocs\mapservertutorial\example1-7.map&" "wms_srs" "EPSG:2136" END END PROJECTION # "proj=laea" # "ellps=clrk66" # "lat_0=45" # "lon_0=-100" # # Alternatively, you can specify an EPSG code. "init=epsg:2163" # END # Start of LAYER DEFINITIONS --------------------------------------------- LAYER # States polygon layer begins here NAME states DATA states_ugl STATUS OFF TYPE POLYGON PROJECTION "init=epsg:4326" END METADATA "wms_title" "States Polygon" "wms_srs" "epsg:4326" END CLASSITEM "CLASS" CLASS EXPRESSION 'land' SYMBOL 0 COLOR 232 232 232 END END # States polygon layer ends here LAYER # MODIS raster layer begins here NAME modis DATA "raster\mod09a12003161_ugl_ll_8bit.tif" STATUS OFF TYPE RASTER PROCESSING "BANDS=1,2,3" OFFSITE 71 74 65 # PROJECTION # "init=epsg:4326" # END END # MODIS raster layer ends here LAYER # LandSat WMS map from JPL (or from USGS) NAME LandSat TYPE RASTER OFFSITE 0 0 0 STATUS DEFAULT CONNECTIONTYPE WMS #CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?REQUEST=map&LAYERS=us_landsat7&STYLES=&FORMAT=png&TRANSPARENT=true" #verwijder de 1!! CONNECTION "http://gisdata.usgs.net/servlet/com.esri.wms.Esrimap?ServiceName=USGS_WMS_LANDSAT7&VERSION=1.0.0&REQUEST=map&Layers=LANDSAT7&SRS=EPSG:4326&REASPECT=false&Format=png&" METADATA "wms_title" "LandSat" "wms_name" "us_landsat7" "wms_server_version" "1.0.0" "wms_srs" "epsg:4326" "wms_format" "image/png" #"wms_title" "US_Landsat7" # "wms_srs" "epsg:4326" # "wms_connectiontimeout" "1000" END # PROJECTION # "init=epsg:4326" # END END # LandSat WMS image ends here LAYER # States line layer begins here NAME states DATA states_ugl STATUS DEFAULT TYPE LINE # PROJECTION # "init=epsg:4326" # END CLASSITEM "CLASS" CLASS EXPRESSION 'land' SYMBOL 'line5' COLOR 64 64 64 SIZE 1 END END # States line layer ends here LAYER # States label layer begins here NAME states DATA states_ugl STATUS DEFAULT TYPE ANNOTATION # PROJECTION # "init=epsg:4326" # END CLASSITEM "CLASS" LABELITEM "STATE" CLASS EXPRESSION 'land' COLOR -1 -1 -1 LABEL COLOR 255 255 255 TYPE TRUETYPE FONT arial-bold SIZE 12 ANTIALIAS TRUE POSITION CL PARTIALS FALSE MINDISTANCE 300 BUFFER 4 END # end of label END # end of class END # States label layer ends here # End of LAYER DEFINITIONS ------------------------------- END # end of map file -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tom.Kralidis at EC.GC.CA Sun Apr 3 14:31:56 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Sun, 3 Apr 2005 17:31:56 -0400 Subject: WMS GetCapabilities problem Message-ID: This is because the MIME type returned by an OGC:WMS 1.1.1 GetCapabilities request is not recognized by standard web browsers unless you configure it to do so. Try saving the file and opening with something like Wordpad. ..Tom -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Wouter Schaubroeck Sent: Sunday, 03 April, 2005 16:45 To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] WMS GetCapabilities problem Hi all, I'm using the ms4w application you all know. I worked myself through the tutorial, and now i want to set up my own WMS Server. Therefor i used example 1.7. But when i want to test my WMS Server and perform a GetCapabilities request, Firefox is offering me the mapserv.exe file, in stead of an XML document. What am i doing wrong? This is my hyperlink with the request: http://192.168.2.3/cgi-bin/mapserv.exe?map=c:/ms4w/apache/htdocs/mapserv ertutorial/example1-7.map&SERVICE=WMS&VERSION1.1.1&REQUEST=G etCapabilities This is my MAP file: MAP NAME EX1.7_ IMAGETYPE PNG24 #EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514 # LAEA EXTENT -97.5 41.619778 -82.122902 49.38562 # Geographic SIZE 400 300 SHAPEPATH "c:\ms4w\apache\htdocs\mapservertutorial\data" SYMBOLSET "c:\ms4w\apache\htdocs\mapservertutorial\symbols\symbols35.sym" FONTSET "c:\ms4w\apache\htdocs\mapservertutorial\fonts\fonts.list" WEB IMAGEPATH 'c:\tmp\' IMAGEURL '\tmp\' METADATA "wms_title" "WMS_Test" "wms_onlineresource" "http://192.168.2.2/cgi-bin/mapserv.exe?map=c:\ms4w\apache\htdocs\mapser vertutorial\example1-7.map&" "wms_srs" "EPSG:2136" END END PROJECTION # "proj=laea" # "ellps=clrk66" # "lat_0=45" # "lon_0=-100" # # Alternatively, you can specify an EPSG code. "init=epsg:2163" # END # Start of LAYER DEFINITIONS --------------------------------------------- LAYER # States polygon layer begins here NAME states DATA states_ugl STATUS OFF TYPE POLYGON PROJECTION "init=epsg:4326" END METADATA "wms_title" "States Polygon" "wms_srs" "epsg:4326" END CLASSITEM "CLASS" CLASS EXPRESSION 'land' SYMBOL 0 COLOR 232 232 232 END END # States polygon layer ends here LAYER # MODIS raster layer begins here NAME modis DATA "raster\mod09a12003161_ugl_ll_8bit.tif" STATUS OFF TYPE RASTER PROCESSING "BANDS=1,2,3" OFFSITE 71 74 65 # PROJECTION # "init=epsg:4326" # END END # MODIS raster layer ends here LAYER # LandSat WMS map from JPL (or from USGS) NAME LandSat TYPE RASTER OFFSITE 0 0 0 STATUS DEFAULT CONNECTIONTYPE WMS #CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?REQUEST=map&LAYERS=us_landsat7&STYLES=& FORMAT=png&TRANSPARENT=true" #verwijder de 1!! CONNECTION "http://gisdata.usgs.net/servlet/com.esri.wms.Esrimap?ServiceName=USGS_W MS_LANDSAT7&VERSION=1.0.0&REQUEST=map&Layers=LANDSAT7&SRS=EPSG:4326&REAS PECT=false&Format=png&" METADATA "wms_title" "LandSat" "wms_name" "us_landsat7" "wms_server_version" "1.0.0" "wms_srs" "epsg:4326" "wms_format" "image/png" #"wms_title" "US_Landsat7" # "wms_srs" "epsg:4326" # "wms_connectiontimeout" "1000" END # PROJECTION # "init=epsg:4326" # END END # LandSat WMS image ends here LAYER # States line layer begins here NAME states DATA states_ugl STATUS DEFAULT TYPE LINE # PROJECTION # "init=epsg:4326" # END CLASSITEM "CLASS" CLASS EXPRESSION 'land' SYMBOL 'line5' COLOR 64 64 64 SIZE 1 END END # States line layer ends here LAYER # States label layer begins here NAME states DATA states_ugl STATUS DEFAULT TYPE ANNOTATION # PROJECTION # "init=epsg:4326" # END CLASSITEM "CLASS" LABELITEM "STATE" CLASS EXPRESSION 'land' COLOR -1 -1 -1 LABEL COLOR 255 255 255 TYPE TRUETYPE FONT arial-bold SIZE 12 ANTIALIAS TRUE POSITION CL PARTIALS FALSE MINDISTANCE 300 BUFFER 4 END # end of label END # end of class END # States label layer ends here # End of LAYER DEFINITIONS ------------------------------- END # end of map file From wouter.schaubroeck at GMAIL.COM Sun Apr 3 14:41:05 2005 From: wouter.schaubroeck at GMAIL.COM (Wouter Schaubroeck) Date: Sun, 3 Apr 2005 23:41:05 +0200 Subject: WMS GetCapabilities problem In-Reply-To: <2576812186CDD411BF1500508B6DCE950972F885@ecnwri1.ontario.int.ec.gc.ca> Message-ID: Many thanks, Indeed you're right, i didn't look further than the name: mapserv.exe. Why is it called like that? Can you give it a (file)name, other than mapserv.exe? grtz Wouter Kralidis,Tom [Burlington] wrote: >This is because the MIME type returned by an OGC:WMS 1.1.1 >GetCapabilities request is not recognized by standard web browsers >unless you configure it to do so. > >Try saving the file and opening with something like Wordpad. > >..Tom > > >-----Original Message----- >From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On >Behalf Of Wouter Schaubroeck >Sent: Sunday, 03 April, 2005 16:45 >To: MAPSERVER-USERS at LISTS.UMN.EDU >Subject: [UMN_MAPSERVER-USERS] WMS GetCapabilities problem > > >Hi all, > >I'm using the ms4w application you all know. I worked myself through the >tutorial, and now i want to set up my own WMS Server. Therefor i used >example 1.7. But when i want to test my WMS Server and perform a >GetCapabilities request, Firefox is offering me the mapserv.exe file, in >stead of an XML document. What am i doing wrong? > >This is my hyperlink with the request: >http://192.168.2.3/cgi-bin/mapserv.exe?map=c:/ms4w/apache/htdocs/mapserv >ertutorial/example1-7.map&SERVICE=WMS&VERSION1.1.1&REQUEST=G >etCapabilities > >This is my MAP file: > >MAP >NAME EX1.7_ >IMAGETYPE PNG24 >#EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514 ># LAEA >EXTENT -97.5 41.619778 -82.122902 49.38562 # Geographic >SIZE 400 300 >SHAPEPATH "c:\ms4w\apache\htdocs\mapservertutorial\data" >SYMBOLSET >"c:\ms4w\apache\htdocs\mapservertutorial\symbols\symbols35.sym" >FONTSET >"c:\ms4w\apache\htdocs\mapservertutorial\fonts\fonts.list" > >WEB > IMAGEPATH 'c:\tmp\' > IMAGEURL '\tmp\' > METADATA > "wms_title" "WMS_Test" > "wms_onlineresource" >"http://192.168.2.2/cgi-bin/mapserv.exe?map=c:\ms4w\apache\htdocs\mapser >vertutorial\example1-7.map&" > "wms_srs" "EPSG:2136" > END >END > >PROJECTION ># "proj=laea" ># "ellps=clrk66" ># "lat_0=45" ># "lon_0=-100" ># ># Alternatively, you can specify an EPSG code. > "init=epsg:2163" ># >END > ># Start of LAYER DEFINITIONS >--------------------------------------------- >LAYER # States polygon layer begins here > NAME states > DATA states_ugl > STATUS OFF > TYPE POLYGON > > PROJECTION > "init=epsg:4326" > END > METADATA > "wms_title" "States Polygon" > "wms_srs" "epsg:4326" > END > > CLASSITEM "CLASS" > CLASS > EXPRESSION 'land' > SYMBOL 0 > COLOR 232 232 232 > END >END # States polygon layer ends here > >LAYER # MODIS raster layer begins here > NAME modis > DATA "raster\mod09a12003161_ugl_ll_8bit.tif" > STATUS OFF > TYPE RASTER > PROCESSING "BANDS=1,2,3" > OFFSITE 71 74 65 > ># PROJECTION ># "init=epsg:4326" ># END >END # MODIS raster layer ends here > >LAYER # LandSat WMS map from JPL (or from USGS) > NAME LandSat > TYPE RASTER > OFFSITE 0 0 0 > STATUS DEFAULT > CONNECTIONTYPE WMS > #CONNECTION >"http://wms.jpl.nasa.gov/wms.cgi?REQUEST=map&LAYERS=us_landsat7&STYLES=& >FORMAT=png&TRANSPARENT=true" #verwijder de 1!! > CONNECTION >"http://gisdata.usgs.net/servlet/com.esri.wms.Esrimap?ServiceName=USGS_W >MS_LANDSAT7&VERSION=1.0.0&REQUEST=map&Layers=LANDSAT7&SRS=EPSG:4326&REAS >PECT=false&Format=png&" > > METADATA > "wms_title" "LandSat" > "wms_name" "us_landsat7" > "wms_server_version" "1.0.0" > "wms_srs" "epsg:4326" > "wms_format" "image/png" > #"wms_title" "US_Landsat7" > # "wms_srs" "epsg:4326" > # "wms_connectiontimeout" "1000" > END > ># PROJECTION ># "init=epsg:4326" ># END >END # LandSat WMS image ends here > >LAYER # States line layer begins here > NAME states > DATA states_ugl > STATUS DEFAULT > TYPE LINE > ># PROJECTION ># "init=epsg:4326" ># END > > CLASSITEM "CLASS" > CLASS > EXPRESSION 'land' > SYMBOL 'line5' > COLOR 64 64 64 > SIZE 1 > END >END # States line layer ends here > >LAYER # States label layer begins here > NAME states > DATA states_ugl > STATUS DEFAULT > TYPE ANNOTATION > ># PROJECTION ># "init=epsg:4326" ># END > > > CLASSITEM "CLASS" > LABELITEM "STATE" > CLASS > EXPRESSION 'land' > COLOR -1 -1 -1 > LABEL > COLOR 255 255 255 > TYPE TRUETYPE > FONT arial-bold > SIZE 12 > ANTIALIAS TRUE > POSITION CL > PARTIALS FALSE > MINDISTANCE 300 > BUFFER 4 > END # end of label > END # end of class >END # States label layer ends here ># End of LAYER DEFINITIONS ------------------------------- > >END # end of map file > > > From mhbasa at YAHOO.COM Sun Apr 3 19:01:22 2005 From: mhbasa at YAHOO.COM (Mario H. Basa) Date: Sun, 3 Apr 2005 19:01:22 -0700 Subject: Java Mapscript zoomRectangle In-Reply-To: 6667 Message-ID: Howard thanks! But even if there coordinates are reversed, zoomRectangle still does not work. This time though it does not throw any exceptions, although it does mangle the values of mapObj. Any pointers as to where I am making a mistake will be greatly appreciated. mario yokohama,japan --- Howard Butler wrote: > Mario, > > your maxy is less than your miny (negative > coordinate systems go the > other way). > > maxy: -114298.67601256436 > miny: -113841.05840296435 > > Howard > > > At 7:21 AM -0700 4/3/05, Mario H. Basa wrote: > >Hello there, > > > >I am having problems getting mapObj.zoomRectangle > to > >work, always getting a > > > >java.lang.UnknownError: Georeferenced coordinates > miny > ><= maxy > > > >error message even though my extents are correct. > My > >code is here: > > > >rectObj myExtent = new > > > >rectObj(-1d,-1d,-1d,-1d,mapscript.MS_FALSE); > >rectObj myRect = new > > > >rectObj(-1d,-1d,-1d,-1d,mapscript.MS_FALSE); > > > > > >myExtent.setMinx(53705.02867345365); > >myExtent.setMiny(-113841.05840296435); > >myExtent.setMaxx(54498.23253009368); > >myExtent.setMaxy(-114298.67601256436); > > > >myRect.setMinx(138d); > >myRect.setMiny(88d); > >myRect.setMaxx(433d); > >myRect.setMaxy(312d); > > > >this.mapObj.zoomRectangle(myRect,650,375,myExtent,myExtent); > > > > > >I tried declaring myRect with a MS_TRUE parameter, > but > >the error still persists. Is it the way I am > declaring > >my rectObj which is at fault? > > > >Thanks. > > > >mario > >yokohama,japan > > > > > > > >__________________________________ > >Do you Yahoo!? > >Make Yahoo! your home page > >http://www.yahoo.com/r/hs > __________________________________ Do you Yahoo!? Yahoo! Personals - Better first dates. More second dates. http://personals.yahoo.com From jim.lists at MAC.COM Sun Apr 3 20:17:57 2005 From: jim.lists at MAC.COM (Jim Lists) Date: Sun, 3 Apr 2005 21:17:57 -0600 Subject: trying to install mapserver on Mac OS X Message-ID: Total MapServer and UNIX newbie question I'm a Mac user trying to learn this UNIX stuff, hoping to get MapServer installed on my PowerBook running 10.3.8 I tried the installer from 2003 which is 3.6.4 - but I'm not sure how to figure out if it installed for real or not. I never did figure out the PHP part of that installation - it got too cryptic and I couldn't follow Now, I see that there is a new set of files that I *may* be able to install (i.e. post by William K) - if the instructions include any human readable english (sorry, I'm really not up on all of the Terminal language, but I'm trying) Any words of wisdom? Is there any set of how-to's that are in basic english out there? I would like to take advantage of having apache installed, and maybe do a tutorial or try out some GIS locally on this machine. Thanks Jim From ierickson at ANALYGIS.COM Sun Apr 3 20:49:59 2005 From: ierickson at ANALYGIS.COM (Ian Erickson) Date: Sun, 3 Apr 2005 20:49:59 -0700 Subject: Problems w/ MapScript C# Message-ID: I've successfully built the C# Mapscript assembly, and have successfully written code that generates an image file to disk. Everything seems to work just fine until I make repeated calls to the map.draw() function. I get the following exception after 3 or 4 calls to the private member function drawMapImage(): System.NullReferenceException: Object reference not set to an instance of an object. at mapscriptPINVOKE.mapObj_draw(IntPtr jarg1) at mapObj.draw() at SimpleMap.Form1.drawMapImage() My drawMapImage() member looks like this: private void drawMapImage() { try { m_img = m_map.draw(); m_img.save(@"E:\Web\Data\console.png", m_map); Console.WriteLine("Image saved!"); } catch (Exception e) { Console.WriteLine("Exception:\n" + e); } } The contstructor for this form contains the two following lines: m_map = new mapObj(@"E:\Web\Data\road.map"); m_img = m_map.draw(); I've got no idea of where to go from here. I've tried local definitions of the m_map and m_img objects and explicitly disposing them. I've even forced the System.GC.Collect() method in an attempt to clean any unused objects up. Does anyone have a clue as to where to go from here? -- Ian Erickson AnalyGIS, LLC From stephane.riff at CERENE.FR Mon Apr 4 00:42:11 2005 From: stephane.riff at CERENE.FR (=?ISO-8859-1?Q?St=E9phane_RIFF?=) Date: Mon, 4 Apr 2005 09:42:11 +0200 Subject: class expression on date field Message-ID: Hi, I'm using postgis to render some GPS points, it works quite fine now... The problem i have is i want to create some classes in a layer like : LAYER ... DATA geom from
CALSSITEM "gps_date" TEMPLATE "dummy" ... CLASS EXPRESSION "/2005-04-04.*/" END ... END I thought that this expression give all points of a day but it seems that some other points are returns too. I saw it because when i do a queryByPoint i see that gps date is older than my expression date..... Does this layer def seems good ? Another question : When i do a queryByPoint, i can query some point that are not shown on the map. I don't know how it's possible but maybe i have to add a template on each classes but not in the layer ? Will try ( i just think of it) Thanks From stephane.riff at CERENE.FR Mon Apr 4 01:26:02 2005 From: stephane.riff at CERENE.FR (=?ISO-8859-1?Q?St=E9phane_RIFF?=) Date: Mon, 4 Apr 2005 10:26:02 +0200 Subject: class expression on date field In-Reply-To: <4250EFD3.8090104@cerene.fr> Message-ID: I solve the problem :) In fact if you make some classes in a layer with a template when you query this layer the expression filter doesn't apply to the query. You must add template to each classes and remove it from your layer. Thanks St?phane RIFF wrote: > Hi, > > I'm using postgis to render some GPS points, it works quite fine now... > > The problem i have is i want to create some classes in a layer like : > LAYER > ... > DATA geom from
> CALSSITEM "gps_date" > TEMPLATE "dummy" > ... > CLASS > EXPRESSION "/2005-04-04.*/" > END > ... > END > > I thought that this expression give all points of a day but it > seems that some other points are returns too. I saw it because > when i do a queryByPoint i see that gps date is older than my expression > date..... > > Does this layer def seems good ? > > Another question : > When i do a queryByPoint, i can query some point that are not shown on > the map. > I don't know how it's possible but maybe i have to add a template on each > classes but not in the layer ? > Will try ( i just think of it) > > Thanks > > From Jonathan.R.Young at UK.IBM.COM Mon Apr 4 01:24:35 2005 From: Jonathan.R.Young at UK.IBM.COM (Jonathan R Young) Date: Mon, 4 Apr 2005 09:24:35 +0100 Subject: Jonathan R Young/UK/IBM is out of the office. Message-ID: I will be out of the office starting 04/04/2005 and will not return until 06/04/2005. I will check emails over the break. I will be returning to work on the afternoon of Wednesday 6th April 2005. Please contact one of the following: Defra Information Architecture Project: Alasdair McLay (PM) alasdair.mclay at uk.ibm.com Defra Target Environment (General issue) Tony Fitzpatrick (Chief Architect) tonyfitz at uk.ibm.com From sweykam at TELELINE.ES Mon Apr 4 04:45:31 2005 From: sweykam at TELELINE.ES (Stefanie Weykam) Date: Mon, 4 Apr 2005 13:45:31 +0200 Subject: mapfile suiting wms AND wfs Message-ID: Bart, thanks (again) for your examples on GetLegendGraphic and LayerFeatureInfo. But I am still stuck at preparing the same map file for wms AND wfs. I tried to replace the metadata parameter-names with "ows_...." but mapserver apparently expects either wms_title or wfs_title (or both?). I am not sure if the other parameters are understood using ows_. Before I change (duplicate) all the title-parameters - is their any alternative?? thanks, Stefanie From Tom.Kralidis at EC.GC.CA Mon Apr 4 04:41:05 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Mon, 4 Apr 2005 07:41:05 -0400 Subject: WMS GetCapabilities problem Message-ID: > -----Original Message----- > From: Wouter Schaubroeck [mailto:wouter.schaubroeck at gmail.com] > Sent: Sunday, 03 April, 2005 17:41 > To: Kralidis,Tom [Burlington] > Cc: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] WMS GetCapabilities problem > > > Many thanks, > Indeed you're right, i didn't look further than the name: > mapserv.exe. > Why is it called like that? Can you give it a (file)name, other than > mapserv.exe? > Browsers usually name the downloaded file (unless you choose to rename before saving) the file basename of the HTTP SCRIPT_NAME environment variable, hence "mapserv.exe". You can copy mapserv.exe to another filename, or mask mapserv.exe (as well as the mapfile location) by using a wrapper script mechanism; see: http://mapserver.gis.umn.edu/doc44/wms-server-howto.html#onlineresourceu rl for more info and examples. ..Tom > grtz > Wouter > > Kralidis,Tom [Burlington] wrote: > > >This is because the MIME type returned by an OGC:WMS 1.1.1 > >GetCapabilities request is not recognized by standard web browsers > >unless you configure it to do so. > > > >Try saving the file and opening with something like Wordpad. > > > >..Tom > > > > > >-----Original Message----- > >From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] > >On Behalf Of Wouter Schaubroeck > >Sent: Sunday, 03 April, 2005 16:45 > >To: MAPSERVER-USERS at LISTS.UMN.EDU > >Subject: [UMN_MAPSERVER-USERS] WMS GetCapabilities problem > > > > > >Hi all, > > > >I'm using the ms4w application you all know. I worked myself through > >the tutorial, and now i want to set up my own WMS Server. Therefor i > >used example 1.7. But when i want to test my WMS Server and > perform a > >GetCapabilities request, Firefox is offering me the > mapserv.exe file, > >in stead of an XML document. What am i doing wrong? > > > >This is my hyperlink with the request: > >http://192.168.2.3/cgi-bin/mapserv.exe?map=c:/ms4w/apache/htd > ocs/mapser > >v > >ertutorial/example1-7.map&SERVICE=WMS&VERSION1.1.1&am p;REQUEST=G > >etCapabilities > > > >This is my MAP file: > > > >MAP > >NAME EX1.7_ > >IMAGETYPE PNG24 > >#EXTENT 201621.496941 -294488.285333 1425518.020722 > 498254.511514 > ># LAEA > >EXTENT -97.5 41.619778 -82.122902 49.38562 # Geographic > >SIZE 400 300 > >SHAPEPATH "c:\ms4w\apache\htdocs\mapservertutorial\data" > >SYMBOLSET > >"c:\ms4w\apache\htdocs\mapservertutorial\symbols\symbols35.sym" > >FONTSET "c:\ms4w\apache\htdocs\mapservertutorial\fonts\fonts.list" > > > >WEB > > IMAGEPATH 'c:\tmp\' > > IMAGEURL '\tmp\' > > METADATA > > "wms_title" "WMS_Test" > > "wms_onlineresource" > >"http://192.168.2.2/cgi-bin/mapserv.exe?map=c:\ms4w\apache\ht > docs\mapse > >r > >vertutorial\example1-7.map&" > > "wms_srs" "EPSG:2136" > > END > >END > > > >PROJECTION > ># "proj=laea" > ># "ellps=clrk66" > ># "lat_0=45" > ># "lon_0=-100" > ># > ># Alternatively, you can specify an EPSG code. "init=epsg:2163" > ># > >END > > > ># Start of LAYER DEFINITIONS > >--------------------------------------------- > >LAYER # States polygon layer begins here > > NAME states > > DATA states_ugl > > STATUS OFF > > TYPE POLYGON > > > > PROJECTION > > "init=epsg:4326" > > END > > METADATA > > "wms_title" "States Polygon" > > "wms_srs" "epsg:4326" > > END > > > > CLASSITEM "CLASS" > > CLASS > > EXPRESSION 'land' > > SYMBOL 0 > > COLOR 232 232 232 > > END > >END # States polygon layer ends here > > > >LAYER # MODIS raster layer begins here > > NAME modis > > DATA "raster\mod09a12003161_ugl_ll_8bit.tif" > > STATUS OFF > > TYPE RASTER > > PROCESSING "BANDS=1,2,3" > > OFFSITE 71 74 65 > > > ># PROJECTION > ># "init=epsg:4326" > ># END > >END # MODIS raster layer ends here > > > >LAYER # LandSat WMS map from JPL (or from USGS) > > NAME LandSat > > TYPE RASTER > > OFFSITE 0 0 0 > > STATUS DEFAULT > > CONNECTIONTYPE WMS > > #CONNECTION > >"http://wms.jpl.nasa.gov/wms.cgi?REQUEST=map&LAYERS=us_landsa > t7&STYLES= > >& > >FORMAT=png&TRANSPARENT=true" #verwijder de 1!! > > CONNECTION > >"http://gisdata.usgs.net/servlet/com.esri.wms.Esrimap?Service > Name=USGS_W > >MS_LANDSAT7&VERSION=1.0.0&REQUEST=map&Layers=LANDSAT7&SRS=EPS > G:4326&REAS > >PECT=false&Format=png&" > > > > METADATA > > "wms_title" "LandSat" > > "wms_name" "us_landsat7" > > "wms_server_version" "1.0.0" > > "wms_srs" "epsg:4326" > > "wms_format" "image/png" > > #"wms_title" "US_Landsat7" > > # "wms_srs" "epsg:4326" > > # "wms_connectiontimeout" "1000" > > END > > > ># PROJECTION > ># "init=epsg:4326" > ># END > >END # LandSat WMS image ends here > > > >LAYER # States line layer begins here > > NAME states > > DATA states_ugl > > STATUS DEFAULT > > TYPE LINE > > > ># PROJECTION > ># "init=epsg:4326" > ># END > > > > CLASSITEM "CLASS" > > CLASS > > EXPRESSION 'land' > > SYMBOL 'line5' > > COLOR 64 64 64 > > SIZE 1 > > END > >END # States line layer ends here > > > >LAYER # States label layer begins here > > NAME states > > DATA states_ugl > > STATUS DEFAULT > > TYPE ANNOTATION > > > ># PROJECTION > ># "init=epsg:4326" > ># END > > > > > > CLASSITEM "CLASS" > > LABELITEM "STATE" > > CLASS > > EXPRESSION 'land' > > COLOR -1 -1 -1 > > LABEL > > COLOR 255 255 255 > > TYPE TRUETYPE > > FONT arial-bold > > SIZE 12 > > ANTIALIAS TRUE > > POSITION CL > > PARTIALS FALSE > > MINDISTANCE 300 > > BUFFER 4 > > END # end of label > > END # end of class > >END # States label layer ends here > ># End of LAYER DEFINITIONS ------------------------------- > > > >END # end of map file > > > > > > > From stublair at GMAIL.COM Mon Apr 4 04:34:59 2005 From: stublair at GMAIL.COM (Stuart Blair) Date: Mon, 4 Apr 2005 12:34:59 +0100 Subject: setting up a web mapping system Message-ID: I am currently trying to develop a web mapping system to show the location of a variety of jazz clubs with their time of opening, and the place and date of birth and death for a large number of jazz muscians. I'm therefore basically trying produce a web portal that allows a small number of music historians (who have limited mapping knowledge) to explore the diffusion of jazz from New Orleans to the rest of the United States. The data is currently in shapefile format and i want to develop a decent open source system to get the data on the internet, however, being a bit new to all this I am struggling to find anywhere that tells you how to set this sort of thing up or indeed all the software you need. as i understand it at the moment the chain of event would be: shapefile -> mapserver -> gml -> wfs client (though i could really do with an example of one to use) -> shapefile ->geoserver -> jo bloggs using internet explorer looking at the (jazz) files. is this correct or am i way off the mark. I would really really appreciate any help you may may be able to give and websites/documents you would recommend to help me get going. Yours sincerely, Stuart Blair -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tom.Kralidis at EC.GC.CA Mon Apr 4 04:45:13 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Mon, 4 Apr 2005 07:45:13 -0400 Subject: mapfile suiting wms AND wfs Message-ID: > -----Original Message----- > From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Stefanie Weykam > Sent: Monday, 04 April, 2005 07:46 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: [UMN_MAPSERVER-USERS] mapfile suiting wms AND wfs > > > Bart, thanks (again) for your examples on GetLegendGraphic > and LayerFeatureInfo. > > But I am still stuck at preparing the same map file for wms > AND wfs. I tried to replace the metadata parameter-names with > "ows_...." but mapserver apparently expects either wms_title > or wfs_title (or both?). I am not sure if the other > parameters are understood using ows_. > Which version of MapServer are you using? The unified "ows_*" type metadata is supported from 4.4.0 onwards. ..Tom > Before I change (duplicate) all the title-parameters - is > their any alternative?? > > thanks, > Stefanie > From stublair at GMAIL.COM Mon Apr 4 04:36:42 2005 From: stublair at GMAIL.COM (Stuart Blair) Date: Mon, 4 Apr 2005 12:36:42 +0100 Subject: setting up a web mapping system In-Reply-To: <304be1fd0504040434628325a@mail.gmail.com> Message-ID: Dear All, I am currently trying to develop a web mapping system to show the location of a variety of jazz clubs with their time of opening, and the place and date of birth and death for a large number of jazz muscians. I'm therefore basically trying produce a web portal that allows a small number of music historians (who have limited mapping knowledge) to explore the diffusion of jazz from New Orleans to the rest of the United States. The data is currently in shapefile format and i want to develop a decent open source system to get the data on the internet, however, being a bit new to all this I am struggling to find anywhere that tells you how to set this sort of thing up or indeed all the software you need. as i understand it at the moment the chain of event would be: shapefile -> mapserver -> gml -> wfs client (though i could really do with an example of one to use) -> shapefile ->geoserver -> jo bloggs using internet explorer looking at the (jazz) files. is this correct or am i way off the mark. I would really really appreciate any help you may may be able to give and websites/documents you would recommend to help me get going - please email me any suggestions you may have - as i'm sure to get them that way. Yours sincerely, Stuart Blair -------------- next part -------------- An HTML attachment was scrubbed... URL: From dldeskins at GMAIL.COM Mon Apr 4 05:47:33 2005 From: dldeskins at GMAIL.COM (Don Deskins) Date: Mon, 4 Apr 2005 07:47:33 -0500 Subject: raster layer and tileindex Message-ID: Frank, Thanks for your reply. I found my answer in a previous post titled "Moving TILEINDEX in a subfolder" on Mar 31. I had tried to have the raster layer in a subdirectory by itself... evidently, this will not work. Thanks again, Don From osgis.lists at GMAIL.COM Mon Apr 4 06:29:35 2005 From: osgis.lists at GMAIL.COM (David Bitner) Date: Mon, 4 Apr 2005 08:29:35 -0500 Subject: where to host python mapserver apps In-Reply-To: <20050403054826.22674.qmail@web53907.mail.yahoo.com> Message-ID: I've been looking at Virtual Servers such as Linode.com which uses user mode linux so you would have root access to install/compile whatever you needed. It seems pretty reasonably priced and there are other similar hosting plans elsewhere. I'm not sure if anyone on the list has had any luck with any of these. You get machines with fast processors, but your guaranteed ram is very low. On Apr 3, 2005 12:48 AM, Jon Saints wrote: > Anyone have recomendations for budget hosting > companies for python mapscript mapserver apps? > > I am looking at hub.org, but the 256mb of disk space > wont cut it for my imagery. > > Specific requirements: > - mod_python > - postgis > - mapserver, python mapscript > > I dont mind compiling/installing if i must. > > Thanks > Jon > From dpinte at ITAE.BE Mon Apr 4 06:50:27 2005 From: dpinte at ITAE.BE (Didrik Pinte) Date: Mon, 4 Apr 2005 15:50:27 +0200 Subject: gps coordinates system Message-ID: Hi, I need to add a dynamic layer in mapserver using GPS coordinates. I receive the coordinates by SMS and the format is the following : 5208.9024,N,02103.4009,E I have no more information ... I do think that can be translated in 52,08? N and 21,03? E but what about the decimal part ... I suppose these are standard lat-long coord based on WGS84 Has someone an interesting link that can help me ? Thank you Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Ceci est une partie de message num?riquement sign?e URL: From artur.skalski at ACXIOM.COM Mon Apr 4 06:41:02 2005 From: artur.skalski at ACXIOM.COM (Artur Skalski) Date: Mon, 4 Apr 2005 08:41:02 -0500 Subject: querying by atributes mapinfo files Message-ID: Has any one tried to querybyatrtributes mapinfo layer (using php/mapscript), does it work the same as with the shp. file??? From gerry.creager at TAMU.EDU Mon Apr 4 06:55:00 2005 From: gerry.creager at TAMU.EDU (Gerry Creager N5JXS) Date: Mon, 4 Apr 2005 08:55:00 -0500 Subject: gps coordinates system In-Reply-To: <1112622627.9146.12.camel@geru-itea> Message-ID: 52 deg 08.9024 min N 21 deg 03.4009 min E There is no proof positive way to know the datum unless you've observed the GPS sending the data and confirmed its selection... that said, if I recall correctly, Garmin units output NMEA data in WGS84 solely. Not all manufacturers do that... gerry Didrik Pinte wrote: > Hi, > > I need to add a dynamic layer in mapserver using GPS coordinates. > > I receive the coordinates by SMS and the format is the following : > > 5208.9024,N,02103.4009,E > > I have no more information ... > > I do think that can be translated in 52,08? N and 21,03? E but what > about the decimal part ... I suppose these are standard lat-long coord > based on WGS84 > > Has someone an interesting link that can help me ? > > Thank you > > Didrik -- Gerry Creager -- gerry.creager at tamu.edu Texas Mesonet -- AATLT, Texas A&M University Cell: 979.229.5301 Office: 979.458.4020 FAX: 979.847.8578 Page: 979.228.0173 Office: 903A Eller Bldg, TAMU, College Station, TX 77843 From fwarmerdam at GMAIL.COM Mon Apr 4 06:57:41 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Mon, 4 Apr 2005 09:57:41 -0400 Subject: setting up a web mapping system In-Reply-To: <304be1fd0504040434628325a@mail.gmail.com> Message-ID: On Apr 4, 2005 7:34 AM, Stuart Blair wrote: > The data is currently in shapefile format and i want to develop a decent > open > source system to get the data on the internet, however, being a bit new to > all > this I am struggling to find anywhere that tells you how to set this sort > of > thing up or indeed all the software you need. as i understand it at the > moment > the chain of event would be: > > shapefile -> mapserver -> gml -> wfs client (though i could really do with > an > example of one to use) -> shapefile ->geoserver -> jo bloggs using internet > explorer looking at the (jazz) files. > > is this correct or am i way off the mark. I would really really appreciate > any > help you may may be able to give and websites/documents you would recommend > to > help me get going. Stuart, Are you sure you want to make WFS part of this? I would have assumed that you would want to provide a visual view into the data with mapserver rather than providing direct access to the underlying data via WFS. WFS clients are rare, and it would likely take a sophisticated user to make much use of a WFS feed. I may be misconstruing your intentions, but I would suggest you focus on building a mapserver application using either MapServer in CGI mode, or perhaps as a mapscript application, based off your shapefiles. If you have alot of data it might make sense to load it into PostGIS. One nice thing about putting it in PostGIS is that you can efficiently do queries based on time or other parameters whereas if you do this from a shapefile all features are read each time (though non-applicable features can be easily discarded). Are you wanting folks to have an easy way of entering new information and to correct existing information? This will add some complication to your work, but I would still suggest addressing this as a mapscript operation. It is more important though in this situation that you load your data into PostGIS as updating a shapefile in-place is pretty difficult. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From jdport at VERITIME.COM Mon Apr 4 06:57:02 2005 From: jdport at VERITIME.COM (Jeff Portwine) Date: Mon, 4 Apr 2005 09:57:02 -0400 Subject: Need help with Layer->QueryByPoint Message-ID: Hello, I'm trying to understand how to use the QueryByPoint function in php/mapscript, but I really don't understand the description of the function or how it is supposed to work. Let me explain what I'm trying to do I guess, and what I hope this function can accomplish... I have a bunch of addresses complete with latitudes and longitudes in a database (it's just a postgres table, I'm not using PostGIS). I read the locations from this table and I plot points on the map at those locations, colorcoding them by various criteria. I then want to be able to click on those points and bring up another web page specific to those sites. When I first started this project, I looked at queryByPoint but couldn't figure out how to use it so I used another method... I turned the map into a client side image map, converting the projected lat/long values into pixel values and making those points clickable. However, this method breaks down when you zoom in on the map too far. It works for a while, but at when zoomed in past a certain point it no longer works and makes the entire map link to one point. I'm not sure why this happens, but it's very repeatable and I can't see anything in my code that would cause this effect. So, i'm back to looking at how queryByPoint works. My points are drawn in a layer created in mapscript, it doesn't initially exist in my mapfile. There is no shapefile associated with the points and thus there is no dbf file associated with them. The only thing I have is the postgresql table from which I'm reading the locations. I'm not sure if this is something queryByPoint can access. from the documentation: The query is performed on all the shapes that are part of a CLASS that contains a TEMPLATE value or that match any class in a layer that contains a LAYER TEMPLATE value. I'm not sure what this means... what should the template value be, and what exactly is the query? Is it just an SQL query? Do I need to be using postGIS or another spatially enabled database to do this? Mode is MS_SINGLE or MS_MULTIPLE depending on number of results you want. Passing buffer <=0 defaults to tolerances set in the map file (in pixels) but you can use a constant buffer (specified in ground units) instead. Where do these results go? The function only returns an integer that tells me whether it had success or failure, so how do I access the query results? I guess that's enough questions for now... thanks in advance for any pointers. -Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From woodbri at SWOODBRIDGE.COM Mon Apr 4 07:19:37 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Mon, 4 Apr 2005 10:19:37 -0400 Subject: raster layer and tileindex In-Reply-To: Message-ID: Don, The rules for paths with tileindexes are straight forward (well were not, I haven't looked to see if they have changed since I last raised an issue about them). Ideally, one would like to think of a tileindex as representing a tree of data that is modular. Like an object that can be instantiated into multiple maps. Or moved around within a data directory tree without have to rebuild the tileindexes with every move. So also requires clear rules about how the DATAPATH, DATA, TILEINDEX, and the path in the tileindex interact with one another when they are either absolute or relative paths. If this is not clear please write a bug against documentation on the mapfile reference to make this clear. Here is what I think the rules SHOULD be: 1) if DATA or TILEINDEX path is abosulte then look for the DATA or TILEINDEX at that location 2) if DATA or TILEINDEX path is relative then absolute it to the DATAPATH and look for the DATA or TILEINDEX at that location 3) if the contents of the TILEINDEX are absolute, then use that path 4) if the contents of the TILEINDEX are relative, then append it to the location of the TILEINDEX file 5) if a relative DATA path item also exists in a LAYER with a TILEINDEX, then append it also the the contents of the TILEINDEX 6) if it is absolute DATA path item also exists in a LAYER ignore it as this has not logical connotation or raise an error. Note: 5) is important if you have a TILEINDEX that represents an area like a county, and you want to use the DATA to select the layer data from a county, so I might have TILEINDEX "tiger/counties" DATA "street" that generates paths like: tiger/counties/01/001/street and TILEINDEX "tiger/counties" DATA "landmarks" that generates paths like: tiger/counties/01/001/landmarks I opened this bug on this in sept 2002 http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=204 -Steve W. Don Deskins wrote: > Frank, > > Thanks for your reply. > > I found my answer in a previous post titled "Moving TILEINDEX in a > subfolder" on Mar 31. I had tried to have the raster layer in a > subdirectory by itself... evidently, this will not work. > > Thanks again, > > Don > From sgillies at FRII.COM Mon Apr 4 08:03:39 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Mon, 4 Apr 2005 09:03:39 -0600 Subject: Problems w/ MapScript C# In-Reply-To: Message-ID: On Apr 3, 2005, at 9:49 PM, Ian Erickson wrote: > I've successfully built the C# Mapscript assembly, and have > successfully > written code that generates an image file to disk. Everything seems to > work just fine until I make repeated calls to the map.draw() function. > I get the following exception after 3 or 4 calls to the private member > function drawMapImage(): > > System.NullReferenceException: Object reference not set to an instance > of an object. > at mapscriptPINVOKE.mapObj_draw(IntPtr jarg1) > at mapObj.draw() > at SimpleMap.Form1.drawMapImage() > [snip] Ian, When you say "repeated calls", do you mean that these are sequential or concurrent? I (with no other info) interpret the exception to be saying that "jarg1" is Null. As far as I can tell from the C# mapscript_wrap.c file this is a reference to the mapObj. Are you destroying your mapObj instance in the middle of your calls to drawMapImage()? Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From mikesaunt at GMAIL.COM Mon Apr 4 08:09:22 2005 From: mikesaunt at GMAIL.COM (Mike Saunt) Date: Mon, 4 Apr 2005 16:09:22 +0100 Subject: Problems w/ MapScript C# In-Reply-To: Message-ID: Sean I replied to Ian last night but had hit reply and not reply all hence it hadn't come on to the list. I had a similar problem on a different project with the .NET GDI+ locking the image file and the following resolved it. public System.Drawing.Image MapRefresh(int mapHeight, int mapWidth) { if (map == null) { return null; } map.height = mapHeight; map.width = mapWidth; MapScriptDotNet.imageObj img = map.draw(); string sMapImage = @"C:\windows\temp\map.png"; img.save(sMapImage,map); //we need to load via a memory stream as the GDI+ locks the image System.IO.FileStream fs = new System.IO.FileStream(sMapImage, FileMode.Open, FileAccess.Read, FileShare.Read); System.Drawing.Image mapImage = System.Drawing.Image.FromStream(fs); fs.Close(); fs = null; File.Delete(sMapImage); return mapImage; } Hope this helps Cheers Mike Saunt On Apr 4, 2005 4:03 PM, Sean Gillies wrote: > On Apr 3, 2005, at 9:49 PM, Ian Erickson wrote: > > > I've successfully built the C# Mapscript assembly, and have > > successfully > > written code that generates an image file to disk. Everything seems to > > work just fine until I make repeated calls to the map.draw() function. > > I get the following exception after 3 or 4 calls to the private member > > function drawMapImage(): > > > > System.NullReferenceException: Object reference not set to an instance > > of an object. > > at mapscriptPINVOKE.mapObj_draw(IntPtr jarg1) > > at mapObj.draw() > > at SimpleMap.Form1.drawMapImage() > > > > [snip] > > Ian, > > When you say "repeated calls", do you mean that these are sequential or > concurrent? > > I (with no other info) interpret the exception to be saying that > "jarg1" is Null. As far as I can tell from the C# mapscript_wrap.c > file this is a reference to the mapObj. Are you destroying your mapObj > instance in the middle of your calls to drawMapImage()? > > Sean > > -- > Sean Gillies > sgillies at frii dot com > http://users.frii.com/sgillies > From cdaily at GMAIL.COM Mon Apr 4 08:09:27 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Mon, 4 Apr 2005 10:09:27 -0500 Subject: Need help with Layer->QueryByPoint In-Reply-To: <006901c5391e$2d55ffa0$1bf2fbd0@solo> Message-ID: Jeff, The first issue you're going to hit is a bug in mapscript that makes the queryByPoint function useless against layers generated by mapscript. There's a fix in the CVS version of the code, but for now just search the listserv archives for the terms 'queryByPoint' and 'index' to find some other threads regarding that bug. As for queryByPoint, here's a function I wrote for getting the closest points from a layer. It may be overkill for your situation, but at least it should demonstrate how queryByPoint works. It will return multiple results in an array sorted by distance from the queried point. It also reprojects the points to a projection that uses meters as units so that I can calculate a distance of miles instead of DD or whatever. Before you can query the layer, you'll need to set a template value for your layer. This doesn't need to be a real template, just something to keep mapserver from complaining. Just do something like $layer->set("template", "dummy"). function get_closest($layer, $longitude, $latitude, $min_number_results) { global $map, $meter_to_mile; // create a new point object to test against $point = ms_newPointObj(); $point->setXY($longitude, $latitude); $layer = $map->getLayerByName($layer); // toleranceunits do not need to be in the same units as the projections $layer->set("toleranceunits", MS_MILES); // loop through, increasing our search radius by 1 mile each time until we find some matches $tolerance = 1; $max_tolerance = 30; // won't search for points further than 30 miles away $found_flag = false; while (!$found_flag AND ($tolerance < $max_tolerance)) { $layer->set("tolerance", $tolerance); $layer->queryByPoint($point, MS_MULTIPLE, -1); $num_results = $layer->getNumResults(); if ($num_results >= $min_number_results) { $found_flag = true; } else { $tolerance++; } } // if no results, return -1 to signify an error if ($num_results == 0) { return -1; } else { // clone the point $temp_point = ms_newPointObj(); $temp_point->setXY($point->x, $point->y); // project cloned point to NAD83 / Illinois East so that our calculated distance are in meters, not dd $temp_point->project(ms_newprojectionobj("init=epsg:4326"), ms_newprojectionobj("init=epsg:26971")); // loop through our results and add them to our return array $layer->open(); for ($i=0; $i < $num_results; $i++) { $result = $layer->getResult($i); $shape = $layer->getShape($result->tileindex, $result->shapeindex); // reproject our shape to the same projection as our cloned point $shape->project(ms_newprojectionobj("init=epsg:4326"), ms_newprojectionobj("init=epsg:26971")); $distance = $temp_point->distanceToShape($shape); $distance = round($distance * $meter_to_mile, 2); // add the data to our array $return[$i]['distance'] = $distance; $return[$i]['shape'] = $shape; } $layer->close(); // sort our multidimensional array on 'distance' foreach ($return as $val) { $sortarray[] = $val['distance']; } array_multisort($sortarray, $return); return $return; } } From mikesaunt at GMAIL.COM Mon Apr 4 08:13:30 2005 From: mikesaunt at GMAIL.COM (Mike Saunt) Date: Mon, 4 Apr 2005 16:13:30 +0100 Subject: Zooming to a coordinate position Message-ID: Hi All I'm a MapServer / MapScript newbie and also am implementing through the c# interface. I have quite a basic question. How do you, via MapScript, zoom the map to a specific Longitude / Latitude coordinate? The map.zoomPoint requires imgage coordinates. I can code around to set the georef extent to the point and then change the scale but was wondering if there was a simple call? Any help much appreciated. Mike From sgillies at FRII.COM Mon Apr 4 08:29:08 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Mon, 4 Apr 2005 09:29:08 -0600 Subject: Zooming to a coordinate position In-Reply-To: Message-ID: On Apr 4, 2005, at 9:13 AM, Mike Saunt wrote: > Hi All > > I'm a MapServer / MapScript newbie and also am implementing through > the c# interface. > > I have quite a basic question. How do you, via MapScript, zoom the > map to a specific Longitude / Latitude coordinate? > > The map.zoomPoint requires imgage coordinates. > > I can code around to set the georef extent to the point and then > change the scale but was wondering if there was a simple call? > > Any help much appreciated. > Mike > > Mike, All of the zoom* methods are but convenience methods, mainly to turn image click input into new map extents. The essence of zooming is setting the map extent. Look in mapscript/swiginc/mapzoom.i for the C code of the zoom* methods. Some of this could be adapted to your needs. cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From sgillies at FRII.COM Mon Apr 4 08:38:18 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Mon, 4 Apr 2005 09:38:18 -0600 Subject: Problems w/ MapScript C# In-Reply-To: Message-ID: On Apr 4, 2005, at 9:09 AM, Mike Saunt wrote: > Sean > > I replied to Ian last night but had hit reply and not reply all hence > it hadn't come on to the list. I had a similar problem on a different > project with the .NET GDI+ locking the image file and the following > resolved it. > > public System.Drawing.Image MapRefresh(int mapHeight, int mapWidth) > { > if (map == null) > { > return null; > } > map.height = mapHeight; > map.width = mapWidth; > MapScriptDotNet.imageObj img = map.draw(); > > string sMapImage = @"C:\windows\temp\map.png"; > img.save(sMapImage,map); > > //we need to load via a memory stream as the GDI+ locks the > image > System.IO.FileStream fs = new System.IO.FileStream(sMapImage, > FileMode.Open, FileAccess.Read, FileShare.Read); > System.Drawing.Image mapImage = > System.Drawing.Image.FromStream(fs); > fs.Close(); > fs = null; > File.Delete(sMapImage); > return mapImage; > > } > > Hope this helps > > Cheers > Mike Saunt > > Aha! I have a feeling we are going to discover a few more MapServer and .NET quirks yet. cheers, Se From jdport at VERITIME.COM Mon Apr 4 09:20:09 2005 From: jdport at VERITIME.COM (Jeff Portwine) Date: Mon, 4 Apr 2005 12:20:09 -0400 Subject: Need help with Layer->QueryByPoint Message-ID: Thanks a lot for the response... that should get me going in the right direction. As for the bug you mentioned, can I work around that by simply adding the layer to my map file and then opening it and adding the points via mapscript? That way the layer isn't actually generated by mapscript, it's only edited by mapscript... or would that cause the same problem? Thanks again! -Jeff ----- Original Message ----- From: "Camden Daily" To: Sent: Monday, April 04, 2005 11:09 AM Subject: Re: [UMN_MAPSERVER-USERS] Need help with Layer->QueryByPoint > Jeff, > > The first issue you're going to hit is a bug in mapscript that makes > the queryByPoint function useless against layers generated by > mapscript. There's a fix in the CVS version of the code, but for now > just search the listserv archives for the terms 'queryByPoint' and > 'index' to find some other threads regarding that bug. > > As for queryByPoint, here's a function I wrote for getting the closest > points from a layer. It may be overkill for your situation, but at > least it should demonstrate how queryByPoint works. It will return > multiple results in an array sorted by distance from the queried > point. It also reprojects the points to a projection that uses meters > as units so that I can calculate a distance of miles instead of DD or > whatever. > > Before you can query the layer, you'll need to set a template value > for your layer. This doesn't need to be a real template, just > something to keep mapserver from complaining. Just do something like > $layer->set("template", "dummy"). > > function get_closest($layer, $longitude, $latitude, $min_number_results) { > global $map, $meter_to_mile; > > // create a new point object to test against > $point = ms_newPointObj(); > $point->setXY($longitude, $latitude); > > $layer = $map->getLayerByName($layer); > > // toleranceunits do not need to be in the same units as the projections > $layer->set("toleranceunits", MS_MILES); > > // loop through, increasing our search radius by 1 mile each time > until we find some matches > $tolerance = 1; > $max_tolerance = 30; // won't search for points further than 30 miles > away > $found_flag = false; > while (!$found_flag AND ($tolerance < $max_tolerance)) { > $layer->set("tolerance", $tolerance); > $layer->queryByPoint($point, MS_MULTIPLE, -1); > $num_results = $layer->getNumResults(); > if ($num_results >= $min_number_results) { > $found_flag = true; } > else { > $tolerance++; } > } > > // if no results, return -1 to signify an error > if ($num_results == 0) { > return -1; } > > else { > // clone the point > $temp_point = ms_newPointObj(); > $temp_point->setXY($point->x, $point->y); > > // project cloned point to NAD83 / Illinois East so that our > calculated distance are in meters, not dd > $temp_point->project(ms_newprojectionobj("init=epsg:4326"), > ms_newprojectionobj("init=epsg:26971")); > > // loop through our results and add them to our return array > $layer->open(); > for ($i=0; $i < $num_results; $i++) { > $result = $layer->getResult($i); > $shape = $layer->getShape($result->tileindex, $result->shapeindex); > // reproject our shape to the same projection as our cloned point > $shape->project(ms_newprojectionobj("init=epsg:4326"), > ms_newprojectionobj("init=epsg:26971")); > $distance = $temp_point->distanceToShape($shape); > $distance = round($distance * $meter_to_mile, 2); > // add the data to our array > $return[$i]['distance'] = $distance; > $return[$i]['shape'] = $shape; > } > $layer->close(); > > // sort our multidimensional array on 'distance' > foreach ($return as $val) { > $sortarray[] = $val['distance']; } > array_multisort($sortarray, $return); > > return $return; > } > } > From cdaily at GMAIL.COM Mon Apr 4 09:31:50 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Mon, 4 Apr 2005 11:31:50 -0500 Subject: Need help with Layer->QueryByPoint In-Reply-To: <008c01c53932$2bbecdc0$1bf2fbd0@solo> Message-ID: I don't believe that would fix things. The issue is with mapserver not having access to set the 'index' value for the shapes you're adding in. With no index values, queryByPoint won't work at all. See the bug report on it at http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=806 It's been fixed in the CVS version apparently, but for now, try grabbing the modified version of the php_mapscript.c file linked on the bug report and use it to recompile mapscript (v 4.4.1). You should then be able to do $shape->set("index", $index). Just FYI, the indexes you set can not be arbitrarily assigned. They must be set in the same order that they are added to a layer, starting with 0 and incrementing by 1. Otherwise, queryByPoint() won't work. Hence, I would start with an empty layer, so that you know to start your indexing at 0. On Apr 4, 2005 11:20 AM, Jeff Portwine wrote: > Thanks a lot for the response... that should get me going in the right > direction. > As for the bug you mentioned, can I work around that by simply adding the > layer to my map file and then opening it and adding the points via > mapscript? That way the layer isn't actually generated by mapscript, it's > only edited by mapscript... or would that cause the same problem? > > Thanks again! > > -Jeff > > ----- Original Message ----- > From: "Camden Daily" > To: > Sent: Monday, April 04, 2005 11:09 AM > Subject: Re: [UMN_MAPSERVER-USERS] Need help with Layer->QueryByPoint > > > Jeff, > > > > The first issue you're going to hit is a bug in mapscript that makes > > the queryByPoint function useless against layers generated by > > mapscript. There's a fix in the CVS version of the code, but for now > > just search the listserv archives for the terms 'queryByPoint' and > > 'index' to find some other threads regarding that bug. > > > > As for queryByPoint, here's a function I wrote for getting the closest > > points from a layer. It may be overkill for your situation, but at > > least it should demonstrate how queryByPoint works. It will return > > multiple results in an array sorted by distance from the queried > > point. It also reprojects the points to a projection that uses meters > > as units so that I can calculate a distance of miles instead of DD or > > whatever. > > > > Before you can query the layer, you'll need to set a template value > > for your layer. This doesn't need to be a real template, just > > something to keep mapserver from complaining. Just do something like > > $layer->set("template", "dummy"). > > > > function get_closest($layer, $longitude, $latitude, $min_number_results) { > > global $map, $meter_to_mile; > > > > // create a new point object to test against > > $point = ms_newPointObj(); > > $point->setXY($longitude, $latitude); > > > > $layer = $map->getLayerByName($layer); > > > > // toleranceunits do not need to be in the same units as the projections > > $layer->set("toleranceunits", MS_MILES); > > > > // loop through, increasing our search radius by 1 mile each time > > until we find some matches > > $tolerance = 1; > > $max_tolerance = 30; // won't search for points further than 30 miles > > away > > $found_flag = false; > > while (!$found_flag AND ($tolerance < $max_tolerance)) { > > $layer->set("tolerance", $tolerance); > > $layer->queryByPoint($point, MS_MULTIPLE, -1); > > $num_results = $layer->getNumResults(); > > if ($num_results >= $min_number_results) { > > $found_flag = true; } > > else { > > $tolerance++; } > > } > > > > // if no results, return -1 to signify an error > > if ($num_results == 0) { > > return -1; } > > > > else { > > // clone the point > > $temp_point = ms_newPointObj(); > > $temp_point->setXY($point->x, $point->y); > > > > // project cloned point to NAD83 / Illinois East so that our > > calculated distance are in meters, not dd > > $temp_point->project(ms_newprojectionobj("init=epsg:4326"), > > ms_newprojectionobj("init=epsg:26971")); > > > > // loop through our results and add them to our return array > > $layer->open(); > > for ($i=0; $i < $num_results; $i++) { > > $result = $layer->getResult($i); > > $shape = $layer->getShape($result->tileindex, $result->shapeindex); > > // reproject our shape to the same projection as our cloned point > > $shape->project(ms_newprojectionobj("init=epsg:4326"), > > ms_newprojectionobj("init=epsg:26971")); > > $distance = $temp_point->distanceToShape($shape); > > $distance = round($distance * $meter_to_mile, 2); > > // add the data to our array > > $return[$i]['distance'] = $distance; > > $return[$i]['shape'] = $shape; > > } > > $layer->close(); > > > > // sort our multidimensional array on 'distance' > > foreach ($return as $val) { > > $sortarray[] = $val['distance']; } > > array_multisort($sortarray, $return); > > > > return $return; > > } > > } > > > > From fsozzi at INTERCAD.CH Mon Apr 4 09:31:51 2005 From: fsozzi at INTERCAD.CH (Francesco Sozzi) Date: Mon, 4 Apr 2005 18:31:51 +0200 Subject: Autodesk support Message-ID: Hi all, just a brief note to tell that the possibility to read dwg files should be highly desiderable, as this format is very used. The conversion from dwg to shp in many cases is not an option, because it requires too much work (I refer to the many users that have hundred dwg files with frequents updates). In these cases Mapserver can't be used. Best regards Francesco ----- Original Message ----- From: "Bart van den Eijnden" To: Sent: Friday, April 01, 2005 10:02 PM Subject: Re: [UMN_MAPSERVER-USERS] Autodesk support > Hi Tom, > > currently not that I know of. Ofcourse there have been wishes for this for > a long time. > > Your only option would be experimenting with Mapserver FastCGI in > combination with FMEObjects. > > Best regards, > Bart > > On Fri, 1 Apr 2005 14:52:31 -0500, Kralidis,Tom [Burlington] > wrote: > >> Hi, >> >> Is there any support in MapServer for Autodesk vector formats? >> >> Thanks >> >> ..Tom >> ========================= >> Tom Kralidis >> Senior Systems Scientist >> Environment Canada >> Tel: +01-905-336-4409 >> http://www.ec.gc.ca/ >> >> > > > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > > From ierickson at ANALYGIS.COM Mon Apr 4 09:32:19 2005 From: ierickson at ANALYGIS.COM (Ian Erickson) Date: Mon, 4 Apr 2005 09:32:19 -0700 Subject: Problems w/ MapScript C# In-Reply-To: Message-ID: Nope... This no-workie. It is not a GDI+ lock (at least in my case). For some reason, after 3-4 sequential calls to the MapRefresh function, suddenly the imageObj reference is suddenly null! I've downloaded the alternate set of binaries from Morten Nielsen - we'll evalutate that set of binaries and report back... - Ian Sean Gillies wrote: > On Apr 4, 2005, at 9:09 AM, Mike Saunt wrote: > >> Sean >> >> I replied to Ian last night but had hit reply and not reply all hence >> it hadn't come on to the list. I had a similar problem on a different >> project with the .NET GDI+ locking the image file and the following >> resolved it. >> >> public System.Drawing.Image MapRefresh(int mapHeight, int mapWidth) >> { >> if (map == null) >> { >> return null; >> } >> map.height = mapHeight; >> map.width = mapWidth; >> MapScriptDotNet.imageObj img = map.draw(); >> >> string sMapImage = @"C:\windows\temp\map.png"; >> img.save(sMapImage,map); >> >> //we need to load via a memory stream as the GDI+ locks the >> image >> System.IO.FileStream fs = new System.IO.FileStream(sMapImage, >> FileMode.Open, FileAccess.Read, FileShare.Read); >> System.Drawing.Image mapImage = >> System.Drawing.Image.FromStream(fs); >> fs.Close(); >> fs = null; >> File.Delete(sMapImage); >> return mapImage; >> >> } >> >> Hope this helps >> >> Cheers >> Mike Saunt >> >> > > Aha! I have a feeling we are going to discover a few more MapServer > and .NET quirks yet. > > cheers, > Se > -- Ian Erickson AnalyGIS, LLC From ierickson at ANALYGIS.COM Mon Apr 4 10:39:42 2005 From: ierickson at ANALYGIS.COM (Ian Erickson) Date: Mon, 4 Apr 2005 10:39:42 -0700 Subject: Problems w/ C# MapScript Message-ID: Alright, I've replaced the binaries I was using with the binaries Morten has provided and I get the same error. Essentially, the following line creates the first error: imageObj img = map.draw(); The exception is: System.NullReferenceException: Object reference not set to an instance of an object. at MapServer.mapscriptPINVOKE.mapObj_draw(IntPtr jarg1) at MapServer.mapObj.draw() at SimpleMap.Form1.drawMapImage() The .NET version is version 1.1.4322.573. I've tried this code on two different machines (with the same .NET version) to no avail. I'd be more than happy to send along the code to anyone who would be willing to test it! ** -- Ian Erickson AnalyGIS, LLC From craig.miller at SPATIALMINDS.COM Mon Apr 4 10:55:13 2005 From: craig.miller at SPATIALMINDS.COM (Craig Miller) Date: Mon, 4 Apr 2005 10:55:13 -0700 Subject: Problems w/ MapScript C# In-Reply-To: Message-ID: I'm no expert in Mapscript C#, but does the image need to be rewound before draw can be called again? --Craig -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Sean Gillies Sent: Monday, April 04, 2005 8:04 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Problems w/ MapScript C# On Apr 3, 2005, at 9:49 PM, Ian Erickson wrote: > I've successfully built the C# Mapscript assembly, and have > successfully > written code that generates an image file to disk. Everything seems to > work just fine until I make repeated calls to the map.draw() function. > I get the following exception after 3 or 4 calls to the private member > function drawMapImage(): > > System.NullReferenceException: Object reference not set to an instance > of an object. > at mapscriptPINVOKE.mapObj_draw(IntPtr jarg1) > at mapObj.draw() > at SimpleMap.Form1.drawMapImage() > [snip] Ian, When you say "repeated calls", do you mean that these are sequential or concurrent? I (with no other info) interpret the exception to be saying that "jarg1" is Null. As far as I can tell from the C# mapscript_wrap.c file this is a reference to the mapObj. Are you destroying your mapObj instance in the middle of your calls to drawMapImage()? Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From cdaily at GMAIL.COM Mon Apr 4 11:24:10 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Mon, 4 Apr 2005 13:24:10 -0500 Subject: Mapscript error when PHP compiled with GD support Message-ID: 'lo all. I'm having a strange issue. I wanted to experiment with creating a large mapserver image and then use the php image functions to resize and antialias it as I'd seen mentioned last week in a thread. However, after recompiling php and adding the following options (--with-gd --with-png-dir=/lib --with-jpeg-dir=/lib --with-zlib-dir=/lib) my mapscript is broken. PHP gives an error of "Call to a member function saveWebImage() on a non-object". What's strange is that if I leave all of my layers with a status of off, everything works peachy. As soon as I turn on any of my layers, though, things break. If I recompile PHP without the gd stuff, things run smoothly again. Mapserver isn't logging a thing, and the mapscript ms_GetErrorObj isn't giving me any clues, either. gd, libjpeg, libpng, and zlib (along with devel packages) were all installed from rpm. I'm running on Suse 9.1 with Mapserver v 4.4.1. If anyone has any clues on what might be happening, I'm all ears. I'd especially appreciate any ideas on how to truly debug what's going on, as mapserver is keeping things nice and secretive. -Camden From bartvde at XS4ALL.NL Mon Apr 4 11:28:50 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Mon, 4 Apr 2005 20:28:50 +0200 Subject: Autodesk support In-Reply-To: <013a01c53933$cee7cbe0$2d01a8c0@newsviluppo> Message-ID: Hi Francesco, I do agree, but money talks ofcourse when it comes to this type of enhancement. This enhancement is a bit too big for a developer to take on without funding. Maybe the people interested in partly funding this could add themselves to the cc in the following bug report, that could maybe start something: http://bugzilla.remotesensing.org/show_bug.cgi?id=227 Best regards, Bart On Mon, 4 Apr 2005 18:31:51 +0200, Francesco Sozzi wrote: > Hi all, > > just a brief note to tell that the possibility to read dwg files should > be > highly desiderable, as this format is very used. > The conversion from dwg to shp in many cases is not an option, because it > requires too much work (I refer to the many users that have hundred dwg > files with frequents updates). In these cases Mapserver can't be used. > > Best regards > > Francesco > > ----- Original Message ----- > From: "Bart van den Eijnden" > To: > Sent: Friday, April 01, 2005 10:02 PM > Subject: Re: [UMN_MAPSERVER-USERS] Autodesk support > > >> Hi Tom, >> >> currently not that I know of. Ofcourse there have been wishes for this >> for >> a long time. >> >> Your only option would be experimenting with Mapserver FastCGI in >> combination with FMEObjects. >> >> Best regards, >> Bart >> >> On Fri, 1 Apr 2005 14:52:31 -0500, Kralidis,Tom [Burlington] >> wrote: >> >>> Hi, >>> >>> Is there any support in MapServer for Autodesk vector formats? >>> >>> Thanks >>> >>> ..Tom >>> ========================= >>> Tom Kralidis >>> Senior Systems Scientist >>> Environment Canada >>> Tel: +01-905-336-4409 >>> http://www.ec.gc.ca/ >>> >>> >> >> >> >> -- >> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ >> >> > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From lists at WEBMAPIT.COM.BR Mon Apr 4 11:36:42 2005 From: lists at WEBMAPIT.COM.BR (Eduardo Patto Kanegae) Date: Mon, 4 Apr 2005 15:36:42 -0300 Subject: where to host python mapserver apps In-Reply-To: <71c3c6c5050404062929be60ee@mail.gmail.com> Message-ID: Take a look at http://www.locaweb.com ! best Eduardo Patto Kanegae http://www.webmapit.com.br Skype: eduardopattokanegae ICQ: 303747254 MSN: eduardo_patto at hotmail.com Treinamento em UMN MapServer - http://www.webmapit.com.br/ptbr/?menuoption=mapserver ***Fim da Mensagem / End of Message *** On Mon, 4 Apr 2005 08:29:35 -0500, David Bitner escreveu: > De: David Bitner > Data: Mon, 4 Apr 2005 08:29:35 -0500 > Para: MAPSERVER-USERS at LISTS.UMN.EDU > Assunto: Re: [UMN_MAPSERVER-USERS] where to host python mapserver apps > > I've been looking at Virtual Servers such as Linode.com which uses > user mode linux so you would have root access to install/compile > whatever you needed. It seems pretty reasonably priced and there are > other similar hosting plans elsewhere. I'm not sure if anyone on the > list has had any luck with any of these. You get machines with fast > processors, but your guaranteed ram is very low. > > On Apr 3, 2005 12:48 AM, Jon Saints wrote: > > Anyone have recomendations for budget hosting > > companies for python mapscript mapserver apps? > > > > I am looking at hub.org, but the 256mb of disk space > > wont cut it for my imagery. > > > > Specific requirements: > > - mod_python > > - postgis > > - mapserver, python mapscript > > > > I dont mind compiling/installing if i must. > > > > Thanks > > Jon > > > > > From cdaily at GMAIL.COM Mon Apr 4 12:42:35 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Mon, 4 Apr 2005 14:42:35 -0500 Subject: Mapscript error when PHP compiled with GD support In-Reply-To: <1112641011.42518df3df2ae@webmail.raad.tartu.ee> Message-ID: I hadn't realized that about PHP using it's own version of GD. That sounds like it could very well be the issue. However, now I'm having issues even compiling PHP with GD. For some reason, it wants to find gd.h and libgd.so in the same directory (even though one's under /usr/lib and the other's in /usr/include) If I point -with-gd= to one, it balks on not finding the other. Gotta love linux sometimes. I even tried adding an --includedir option for the other one, but no luck. Guess I've gotta hack the makefile now. I'll let you know if things clear up once I can get things to compile nicely. -Camden > Wiser men than me have said previously on this list that if you want to > build both PHP and PHP/Mapscript with GD, you better make sure you > build them both with the *same* GD. Otherwise strange things like the > one you are seeing can happen. > > So, if you have (for instance) installed GD into /usr/local and used > that GD for building php_mapscript, then you also need to build php > using --with-gd=/usr/local. By simply using --with-gd you get a version > of GD that is included with PHP, which is likely different from your > installed version of GD. > > HTH, > -- > Toomas > From woodbri at SWOODBRIDGE.COM Mon Apr 4 12:48:19 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Mon, 4 Apr 2005 15:48:19 -0400 Subject: Mapscript error when PHP compiled with GD support In-Reply-To: <16264e07050404124225de0402@mail.gmail.com> Message-ID: Try -with-gd=/usr Camden Daily wrote: > I hadn't realized that about PHP using it's own version of GD. That > sounds like it could very well be the issue. However, now I'm having > issues even compiling PHP with GD. For some reason, it wants to find > gd.h and libgd.so in the same directory (even though one's under > /usr/lib and the other's in /usr/include) If I point -with-gd= to > one, it balks on not finding the other. > > Gotta love linux sometimes. I even tried adding an --includedir > option for the other one, but no luck. Guess I've gotta hack the > makefile now. > > I'll let you know if things clear up once I can get things to compile nicely. > > -Camden > > >>Wiser men than me have said previously on this list that if you want to >>build both PHP and PHP/Mapscript with GD, you better make sure you >>build them both with the *same* GD. Otherwise strange things like the >>one you are seeing can happen. >> >>So, if you have (for instance) installed GD into /usr/local and used >>that GD for building php_mapscript, then you also need to build php >>using --with-gd=/usr/local. By simply using --with-gd you get a version >>of GD that is included with PHP, which is likely different from your >>installed version of GD. >> >>HTH, >>-- >>Toomas >> > > From cdaily at GMAIL.COM Mon Apr 4 12:53:14 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Mon, 4 Apr 2005 14:53:14 -0500 Subject: Mapscript error when PHP compiled with GD support In-Reply-To: <42519A03.8020708@swoodbridge.com> Message-ID: Brilliant. Thanks Stephen. -Camden From bill at BINKO.NET Mon Apr 4 14:27:19 2005 From: bill at BINKO.NET (Bill Binko) Date: Mon, 4 Apr 2005 17:27:19 -0400 Subject: Proof of Concept Gradient Coloring and Dev question Message-ID: Hi everyone, I have just implemented a quick hack to add gradient coloring to mapserver 4.4.1. This was just an itch I was scratching, but I'd be happy to feed it back into the code. My main question here is how do I do that: is there a CVS repository? Do I mail in patches? To whom? Regarding the gradient coloring, it works like this: you choose a numeric field in your data (I've tested with PostGIS, but anything you can use for classitem or labelitem should work), and create a style like this: STYLE COLOR 60 60 60 MINCOLOR 0 0 0 MAXCOLOR 255 255 0 MINVALUE 0.0 MAXVALUE 300000.0 GRADIENTITEM "sale_price" END That takes the sale_price field from the shapes values, maps its value to a percentage between MINVALUE and MAXVALUE and then picks the color that's appropriate from the color range. For a quick snapshot of how this looks, I've mapped relative size of parcels (as a percentage) to these colors: MINCOLOR 127 29 200 #Purple MAXCOLOR 255 255 0 #Yellow You can see the results here: http://www.binko.net/gradient.png As I said, this is still in the proof of concept stage, and I haven't tested against any rendering except GD (although in theory it should work). Any help on future direction and how to contribute back would be appreciated. Bill From cdaily at GMAIL.COM Mon Apr 4 14:29:08 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Mon, 4 Apr 2005 16:29:08 -0500 Subject: Mapscript error when PHP compiled with GD support In-Reply-To: <42519A03.8020708@swoodbridge.com> Message-ID: After learning the hard way that I needed the XFree86-devel and libxpm libraries for PHP to work with GD, everything compiled nicely and it all works great. Thanks for the assistance everyone! -Camden From gireddy at GMAIL.COM Mon Apr 4 14:31:49 2005 From: gireddy at GMAIL.COM (Shashi Gireddy) Date: Mon, 4 Apr 2005 16:31:49 -0500 Subject: blank map when a layer is defined from php In-Reply-To: <5f447e35050221132971d94930@mail.gmail.com> Message-ID: I spent a lot of time on it. I didn't found any solution. Is it appears to be a bug. because it is trying to open the expression as file, here is the error. Warning: [MapServer Error]: msSHPOpenFile(): (c:/ms/map_files/the geom from counties) in c:\inetpub\wwwroot\mapExamples\map3.php on line 22 here "the geom from counties" is the select statement. anybody has any idea. thank you, shashi. On Feb 21, 2005 4:29 PM, Shashi Gireddy wrote: > Hi all, > Thank you steven and Stephen for helping me in removing label > overlapping.I really appreciate your help. I am perfectly able to > join the geometry object with external database. Now I want to make > everything dynamic, i.e generate layers dynamically from php. I had a > problem doing so. > > I am getting a blank map when i tried to generate layers dynamically > from php, here is my code > > $map_path="c:/ms/map_files/"; > $map_file="Test.map"; > > $map = ms_newMapObj($map_path.$map_file); > $layer = ms_newLayerObj($map); > $lname="counties"; > $layer->set(name, $lname); > $layer->set(connectiontype, "postgis"); > $layer->set(connection, "user=root password=c3n5u5 dbname=census > host=localhost"); > $layer->set(data, "the_geom from calhoun_qry1 using srid=-1"); > $layer->set(type, MS_POLYGON); > $layer->set(status, MS_DEFAULT); > $class = ms_newClassObj($layer); > $class->set(name, "class1"); > $class->setexpression("[p001001]"); > $style = ms_newStyleObj($class); > $style->color->setRGB(10,100,10); > $i= $map->save("c:/inetpub/wwwroot/tmp/Test.map"); > if ($i != -1){ > $image=$map->draw(); > //$map->{imagecolor}= $map->addColor(0,0,255); > $image_url=$image->saveWebImage(); > } > > here is the error messages: > Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named > '(null)'. in c:\inetpub\wwwroot\mapExamples\map3.php on line 22 > > Warning: [MapServer Error]: msSHPOpenFile(): (c:/ms/map_files/the geom > from counties) in c:\inetpub\wwwroot\mapExamples\map3.php on line 22 > > Warning: [MapServer Error]: msSHPOpenFile(): (c:/ms/map_files/the geom > from counties) in c:\inetpub\wwwroot\mapExamples\map3.php on line 22 > > Fatal error: Call to a member function on a non-object in > c:\inetpub\wwwroot\mapExamples\map3.php on line 24 > > the worning message is not looking relevant c:/ms/map_files/the geom from ..... > > can anybody help me please.... > > > -- > Shashi Kiran Reddy. Gireddy, > Graduate Assistant, > CBER, University of Alabama. > http://www.cs.ua.edu/shashi > Home: 205-752-5137 Cell: 205-657-1438 > -- Shashi Kiran Reddy. Gireddy, Graduate Assistant, CBER, University of Alabama. http://www.cs.ua.edu/shashi Home: 205-752-5137 Cell: 205-657-1438 From kenlord at GMAIL.COM Mon Apr 4 14:35:25 2005 From: kenlord at GMAIL.COM (Ken Lord) Date: Mon, 4 Apr 2005 14:35:25 -0700 Subject: Proof of Concept Gradient Coloring and Dev question In-Reply-To: Message-ID: Bill, Well done! A lot of us have been hoping such a capability would be developed. Cheers, Ken Lord Vancouver BC On Apr 4, 2005 2:27 PM, Bill Binko wrote: > Hi everyone, > > I have just implemented a quick hack to add gradient coloring to mapserver > 4.4.1. This was just an itch I was scratching, but I'd be happy to feed > it back into the code. My main question here is how do I do that: is > there a CVS repository? Do I mail in patches? To whom? > > Regarding the gradient coloring, it works like this: you choose a numeric > field in your data (I've tested with PostGIS, but anything you can use for > classitem or labelitem should work), and create a style like this: > > STYLE > COLOR 60 60 60 > MINCOLOR 0 0 0 > MAXCOLOR 255 255 0 > MINVALUE 0.0 > MAXVALUE 300000.0 > GRADIENTITEM "sale_price" > END > > That takes the sale_price field from the shapes values, maps its value to > a percentage between MINVALUE and MAXVALUE and then picks the color that's > appropriate from the color range. > > For a quick snapshot of how this looks, I've mapped relative size of > parcels (as a percentage) to these colors: > > MINCOLOR 127 29 200 #Purple > MAXCOLOR 255 255 0 #Yellow > > You can see the results here: http://www.binko.net/gradient.png > > As I said, this is still in the proof of concept stage, and I haven't > tested against any rendering except GD (although in theory it should > work). > > Any help on future direction and how to contribute back would be > appreciated. > > Bill > From assefa at DMSOLUTIONS.CA Mon Apr 4 14:41:09 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Mon, 4 Apr 2005 17:41:09 -0400 Subject: blank map when a layer is defined from php In-Reply-To: <5f447e3505040414316deeb862@mail.gmail.com> Message-ID: I think you should use something like : $layer->set(connectiontype,MS_POSTGIS) instead of $layer->set(connectiontype, "postgis"); Later, Shashi Gireddy wrote: > I spent a lot of time on it. I didn't found any solution. Is it > appears to be a bug. because it is trying to open the expression as > file, here is the error. > > Warning: [MapServer Error]: msSHPOpenFile(): (c:/ms/map_files/the geom > from counties) in c:\inetpub\wwwroot\mapExamples\map3.php on line 22 > here "the geom from counties" is the select statement. anybody has any idea. > > thank you, > shashi. > > > On Feb 21, 2005 4:29 PM, Shashi Gireddy wrote: > >>Hi all, >>Thank you steven and Stephen for helping me in removing label >>overlapping.I really appreciate your help. I am perfectly able to >>join the geometry object with external database. Now I want to make >>everything dynamic, i.e generate layers dynamically from php. I had a >>problem doing so. >> >>I am getting a blank map when i tried to generate layers dynamically >>from php, here is my code >> >>$map_path="c:/ms/map_files/"; >> $map_file="Test.map"; >> >>$map = ms_newMapObj($map_path.$map_file); >>$layer = ms_newLayerObj($map); >>$lname="counties"; >>$layer->set(name, $lname); >>$layer->set(connectiontype, "postgis"); >>$layer->set(connection, "user=root password=c3n5u5 dbname=census >>host=localhost"); >>$layer->set(data, "the_geom from calhoun_qry1 using srid=-1"); >>$layer->set(type, MS_POLYGON); >>$layer->set(status, MS_DEFAULT); >>$class = ms_newClassObj($layer); >>$class->set(name, "class1"); >>$class->setexpression("[p001001]"); >>$style = ms_newStyleObj($class); >>$style->color->setRGB(10,100,10); >>$i= $map->save("c:/inetpub/wwwroot/tmp/Test.map"); >> if ($i != -1){ >> $image=$map->draw(); >> //$map->{imagecolor}= $map->addColor(0,0,255); >> $image_url=$image->saveWebImage(); >> } >> >>here is the error messages: >>Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named >>'(null)'. in c:\inetpub\wwwroot\mapExamples\map3.php on line 22 >> >>Warning: [MapServer Error]: msSHPOpenFile(): (c:/ms/map_files/the geom >>from counties) in c:\inetpub\wwwroot\mapExamples\map3.php on line 22 >> >>Warning: [MapServer Error]: msSHPOpenFile(): (c:/ms/map_files/the geom >>from counties) in c:\inetpub\wwwroot\mapExamples\map3.php on line 22 >> >>Fatal error: Call to a member function on a non-object in >>c:\inetpub\wwwroot\mapExamples\map3.php on line 24 >> >>the worning message is not looking relevant c:/ms/map_files/the geom from ..... >> >>can anybody help me please.... >> >> >>-- >>Shashi Kiran Reddy. Gireddy, >>Graduate Assistant, >>CBER, University of Alabama. >>http://www.cs.ua.edu/shashi >>Home: 205-752-5137 Cell: 205-657-1438 >> > > > > -- > Shashi Kiran Reddy. Gireddy, > Graduate Assistant, > CBER, University of Alabama. > http://www.cs.ua.edu/shashi > Home: 205-752-5137 Cell: 205-657-1438 > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From woklist at CHARTER.NET Mon Apr 4 15:55:15 2005 From: woklist at CHARTER.NET (William K) Date: Mon, 4 Apr 2005 17:55:15 -0500 Subject: No anti-aliasing for cartoline symbol? In-Reply-To: <16264e07050404150252e55088@mail.gmail.com> Message-ID: Well, I don't use the PHP-included GD with PHP. of course, I don't use imageantialias. let's see, here's an outline: 1. mapfile is set up 2x size, say. Use the usual map->draw and mapimage->savewebimage to get your temp image and a URL for that. 2. transform the image URL to a file path and load the image with imagecreatefrompng(), or whatever format you used 3. create an empty image with the target image size (imagecreatetruecolor()) 4. scale the loaded image into the empty image - imagecopyresampled 5. save the resampled image over the Mapserver-generated temp file A few notes: Since there is not control over scalebar line weights, I draw a scalebar manually and merge that with the resampled image before saving it. The same goes for legends (I use an html legend). And maybe for other embedded image items. You need to scale image coordinates received from user clicks back to the 2x size before sending them to MS zoom functions. Set everything in the map file to draw without antialiasing, including type and symbols from fonts, or they will come out a bit thin. Of course, you need to create symbols and patterns based on images at the larger size. The larger the initial image, the longer it takes MS to draw it (scaling and loading aren't affected as much). I find that 2x size gives a good speed vs. image quality balance, but 4x gives a better image if you have the CPU power. On Apr 4, 2005, at 5:02 PM, Camden Daily wrote: > William > > I tried your method of antialiasing that you'd suggested on the > mapserver mailing list. My only issue is that the PHP function > imageantialias says this on the php.net site: > Note: This function is only available if PHP is compiled with the > bundled version of the GD library. > > Did you have to build your mapserver against the GD that came bundled > with PHP? I had run into issues when the two were compiled against > different GD installs. > > Any help you could offer on this would be greatly appreciated. > > -Camden > >> I switched to a different method that gives accross-the-board >> antialiasing - design and draw the map at 2x or 4x size with no >> antialiasing anywhere, then use PHP's image functions to resample the >> image with antialiasing. I find that the antialiasing produced this >> way looks much better, closer to what I expect from using graphics >> programs, even for font rendering. Requires PHP-MapScript of course, >> and a bit of programming, but it works fine. Unless you have a fast >> processor, the 4x will be pretty slow, but it looks better. I even >> use >> this method for generating high quality PDF output, instead of using >> mapserver's builtin PDF output. > > ----- William Kyngesburye http://webpages.charter.net/kyngchaos/ "Those people who most want to rule people are, ipso-facto, those least suited to do it." - A rule of the universe, from the HitchHiker's Guide to the Galaxy -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2978 bytes Desc: not available URL: From woodbri at SWOODBRIDGE.COM Mon Apr 4 19:27:01 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Mon, 4 Apr 2005 22:27:01 -0400 Subject: Mapserver/PostGIS general questions about how best to do things Message-ID: Hi all, I posted the bulk of this on the PostGIS list, but got not comments back. Since this is also mapserver oriented and the questions are general in nature, I'm hoping I might get some suggestions here. First, I have to say getting PostGIS up and running on freeBSD was very easy so Kudos to the port maintainer and freeBSD. Also get data loaded and get mapserver running with PostGIS was not nearly as hard as I had thought it might be and I'm really liking what I see, even if I'm not sure what to do with it all yet. Also getting mapserver running was just as easy. What I have done (and I will try to get you a link soon to see it) is load up the Census zipcode polygons and some of the Census summary File 1 and 3 data and I can generate some thematic maps. Questions: 1) What are your thoughts on loading all Tiger into PostGIS versus keeping most of it in shapefiles and only using some of the data out of PostGIS? Performance? Are there other benefits to put it all in PostGIS? If I had it all in PostGIS, are there other cool features that I could have that I don't now with shapefiles? 2) What is the best way to scale or other map an attribute column into a known range for use with mapserver CLASS EXPRESSIONS. The Census data has literally thousands of columns any of which you might want to select as the basis for a thematic map, or even some expression of multiple columns. Conversely, a mapfile would have some fixed number of classes that would say render you polygons as say shades of color based on the attributes. Has anyone done this? anyone have any ideas or suggestions on how to do this? I realize that 2) is slightly off topic, but any help would be appreciated. Thanks, -Steve From woodbri at SWOODBRIDGE.COM Mon Apr 4 21:13:45 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Tue, 5 Apr 2005 00:13:45 -0400 Subject: Thematic Maps Demo Message-ID: Hi all, Sorry for the cross posting, but I said I would follow up it a url to some example thematic maps I have been working on. All the hits, and demographic information is coming out of postgres and the zipcode polygons are in postGIS, and placenames basemap layers are coming out of shapefiles. http://swoodbridge.com/test/postgis-maps.php This is an attempt at displaying hits by zipcode and comparing that against income or population by zipcode. The income and population values are scaled into 8 percentiles ranges and used to color the zipcode polygons. The hits are scaled into 8 ranges and used to display the circles or asterisks and sizes from small to large. In the first row of maps, I only display the top ranked hits. On rows 6+ the size of the font displaying the zipcode indicates the range of the hits. This still needs more work to figure out how to best display all this information at the various scales. And for that matter what is useful from an analysis point of view. I have hundreds of tables of demographic information, I would like to know how to correlate the hits against the various tables to find out if any of them a particularly significant or not. Open to any ideas suggestions or pointers. Thanks, -Steve From flavio at TYDAC.CH Mon Apr 4 23:00:57 2005 From: flavio at TYDAC.CH (Flavio Hendry) Date: Tue, 5 Apr 2005 08:00:57 +0200 Subject: Autodesk support In-Reply-To: Message-ID: hi all / hi frank might be a stupid question, but is it really suitable to live-read spatially unindexed stuff like dwg and dxf ??? to francesco: fme would do the job in efficiently translating dwg/dxf to something "smarter" such as a GIS format in batch ... see www.safe.com. Mit freundlichem Gruss / Best Regards Flavio Hendry ---------------------------------------------------------------- TYDAC NEWS http://www.tydac.ch/german/index.php?menu=News_actual ---------------------------------------------------------------- ############ Mit freundlichen Gruessen / Kind Regards ############ mailto:flavio at tydac.ch ############ TYDAC AG - http://www.tydac.ch #### #### Geographic Information Solutions #### #### Luternauweg 12 -- CH-3006 Bern ############ Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860 ---------------------------------------------------------------- From fwarmerdam at GMAIL.COM Tue Apr 5 00:30:21 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Tue, 5 Apr 2005 03:30:21 -0400 Subject: Autodesk support In-Reply-To: Message-ID: On Apr 5, 2005 2:00 AM, Flavio Hendry wrote: > hi all / hi frank > > might be a stupid question, but is it really suitable to live-read > spatially unindexed stuff like dwg and dxf ??? Flavio, Well this depends on the need for performance, and the organization of the data. Even spatial unindexed datasets can be quite performant if split into tiles and tileindexed for instance. And of course, many interesting datasets are small enough that reading the whole thing isn't too bad. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From havard.tveite at UMB.NO Tue Apr 5 00:42:23 2005 From: havard.tveite at UMB.NO (Havard Tveite) Date: Tue, 5 Apr 2005 09:42:23 +0200 Subject: Proof of Concept Gradient Coloring and Dev question In-Reply-To: Message-ID: I agree that it would be nice to have a way of rendering quantitative attributes in UMN Mapserver semi-automatically. What about making the functionality more "general" by for instance including the following STYLE items: NUMBEROFCLASSES - the number of classes used (if not speficied, a "continuous" rendering is performed). BREAKS - The method of classification - "naturalbreaks", "equalinterval", "histogramequal", ... or the actual breakpoints ("1000,5000,7000,13000,21000,26000,29000"). H?vard Tveite Bill Binko wrote: > Hi everyone, > > I have just implemented a quick hack to add gradient coloring to mapserver > 4.4.1. This was just an itch I was scratching, but I'd be happy to feed > it back into the code. My main question here is how do I do that: is > there a CVS repository? Do I mail in patches? To whom? > > Regarding the gradient coloring, it works like this: you choose a numeric > field in your data (I've tested with PostGIS, but anything you can use for > classitem or labelitem should work), and create a style like this: > > STYLE > COLOR 60 60 60 > MINCOLOR 0 0 0 > MAXCOLOR 255 255 0 > MINVALUE 0.0 > MAXVALUE 300000.0 > GRADIENTITEM "sale_price" > END > > That takes the sale_price field from the shapes values, maps its value to > a percentage between MINVALUE and MAXVALUE and then picks the color that's > appropriate from the color range. > > For a quick snapshot of how this looks, I've mapped relative size of > parcels (as a percentage) to these colors: > > MINCOLOR 127 29 200 #Purple > MAXCOLOR 255 255 0 #Yellow > > You can see the results here: http://www.binko.net/gradient.png > > As I said, this is still in the proof of concept stage, and I haven't > tested against any rendering except GD (although in theory it should > work). > > Any help on future direction and how to contribute back would be > appreciated. > > Bill > -- H?vard Tveite Department of Mathematical Sciences and Technology, UMB Dr?bakveien 14, POBox 5003, N-1432 ?s, NORWAY Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt From richard at DUIF.NET Tue Apr 5 00:55:16 2005 From: richard at DUIF.NET (Richard Duivenvoorde) Date: Tue, 5 Apr 2005 09:55:16 +0200 Subject: transparency flash movie OUTPUT_MOVIE=SINGLE/MULTIPLE Message-ID: Hi List members, using the mapserver (two layers) swf/flash output I tried both format options: FORMATOPTION "OUTPUT_MOVIE=MULTIPLE" FORMATOPTION "OUTPUT_MOVIE=SINGLE" Using the first one returns an 'index'-swf from which I can get the two layer swf's. This results in 'transparent' movies, that is I can show a bitmap behind the movie in the flashplayer. When using output SINGLE, I receive the right features, but on an non-transparant (white) background (without changing any other option in the mapfile)? Question: - does anyone know IF it is possible to make the SINGLE output movies transparent? - If yes, please tell me how? - Is there another way, then delving in the mapserver cpp code, to influence the code within the mapserver-returned-swf-files (for example to influence _root or using _parent references)? - Is there other flash-output specific documentation other then: the fmv flashexample: http://mapserver.gis.umn.edu/user_utilities/fmv.zip? Thanks in advance, Richard From flavio at TYDAC.CH Tue Apr 5 02:13:30 2005 From: flavio at TYDAC.CH (Flavio Hendry) Date: Tue, 5 Apr 2005 11:13:30 +0200 Subject: Autodesk support In-Reply-To: <931f8ea905040500306b58f2c4@mail.gmail.com> Message-ID: hi frank thanks for your quick answer, can't you sleep or are you not in canada? :-)) ... I am always thinking in large datasets ... such as surveying of a whole city which is in dxf/dwg normally in tens if not hundreds of mb ... so if I resume: one has at least to create tiles and tileindexes which involves as well work, so does it really make sense/cents ??? Isn't it faster and far more efficient to take good ol' fme and create and index shapes? Mit freundlichem Gruss / Best Regards Flavio Hendry ---------------------------------------------------------------- TYDAC NEWS http://www.tydac.ch/german/index.php?menu=News_actual ---------------------------------------------------------------- ############ Mit freundlichen Gruessen / Kind Regards ############ mailto:flavio at tydac.ch ############ TYDAC AG - http://www.tydac.ch #### #### Geographic Information Solutions #### #### Luternauweg 12 -- CH-3006 Bern ############ Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860 ---------------------------------------------------------------- From kristjan at TARKVARASTUUDIO.EE Tue Apr 5 02:20:19 2005 From: kristjan at TARKVARASTUUDIO.EE (Kristjan Annus) Date: Tue, 5 Apr 2005 12:20:19 +0300 Subject: transparency flash movie OUTPUT_MOVIE=SINGLE/MULTIPLE In-Reply-To: <42524464.10707@duif.net> Message-ID: I don't know about seting transparent backgrounds if swf output, but one solution for you is to put your bitmap background image also to your map file, and create one single swf output for all of your data. But I have encountered one problem with mapserver FLASH output too, thats the size of the swf file, when you use OUTPUT_MOVIE=SINGLE option. In my case it was about 2-5x of the file size of the same output in jpg format. Does anybody know is there some way to decrease the swf output file size? Kristjan > Hi List members, > > using the mapserver (two layers) swf/flash output I tried both format > options: > FORMATOPTION "OUTPUT_MOVIE=MULTIPLE" > FORMATOPTION "OUTPUT_MOVIE=SINGLE" > > Using the first one returns an 'index'-swf from which I can get the two > layer swf's. This results in 'transparent' movies, that is I can show a > bitmap behind the movie in the flashplayer. > > When using output SINGLE, I receive the right features, but on an > non-transparant (white) background (without changing any other option in > the mapfile)? > > Question: > - does anyone know IF it is possible to make the SINGLE output movies > transparent? > - If yes, please tell me how? > - Is there another way, then delving in the mapserver cpp code, to > influence the code within the mapserver-returned-swf-files (for example > to influence _root or using _parent references)? > - Is there other flash-output specific documentation other then: the fmv > flashexample: http://mapserver.gis.umn.edu/user_utilities/fmv.zip? > > Thanks in advance, > > Richard From chatterjee_sharmistha2 at REDIFFMAIL.COM Tue Apr 5 02:30:58 2005 From: chatterjee_sharmistha2 at REDIFFMAIL.COM (Sharmistha) Date: Tue, 5 Apr 2005 09:30:58 -0000 Subject: No subject Message-ID: Respected Sir/Madam, ?I m a new user of php-map script. i m not getting any examples of query map. and many others feature supported by mapserver. can u plz send me some examples of it. i am trying this without using the templete files. plz help me thanks & regards, Sharmistha -------------- next part -------------- An HTML attachment was scrubbed... URL: From chatterjee_sharmistha2 at REDIFFMAIL.COM Tue Apr 5 02:32:27 2005 From: chatterjee_sharmistha2 at REDIFFMAIL.COM (Sharmistha) Date: Tue, 5 Apr 2005 09:32:27 -0000 Subject: examles needed Message-ID: ?Respected Sir/Madam, I m a new user of php-map script. i m not getting any examples of query map. and many others feature supported by mapserver. can u plz send me some examples of it. i am trying this without using the templete files. plz help me thanks & regards, Sharmistha -------------- next part -------------- An HTML attachment was scrubbed... URL: From BEN at SYNCERA-ITSOLUTIONS.NL Tue Apr 5 02:57:31 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Tue, 5 Apr 2005 11:57:31 +0200 Subject: Proof of Concept Gradient Coloring and Dev question Message-ID: Hi Bill, Frank Warmerdam had this functionality (color-ramp) on his wishlist so you may want to check with him for ideas. General procedure would be opening up a bugzilla entry and add the patch as an attachment, and then send out a short e-mail to the mapserver-dev list with a link to the bug report. The bugzilla entry can then also be used to discuss the final implementation. There is a Mapserver CVS, although only the (core) developers have CVS write access. So probably one of the developers with CVS write access should apply your patch/feature (after they agree with the implementation ofcourse). Best regards, Bart Met vriendelijke groet, Bart van den Eijnden GIS specialist Syncera IT-Solutions >>> Bill Binko 04/04/05 11:27pm >>> Hi everyone, I have just implemented a quick hack to add gradient coloring to mapserver 4.4.1. This was just an itch I was scratching, but I'd be happy to feed it back into the code. My main question here is how do I do that: is there a CVS repository? Do I mail in patches? To whom? Regarding the gradient coloring, it works like this: you choose a numeric field in your data (I've tested with PostGIS, but anything you can use for classitem or labelitem should work), and create a style like this: STYLE COLOR 60 60 60 MINCOLOR 0 0 0 MAXCOLOR 255 255 0 MINVALUE 0.0 MAXVALUE 300000.0 GRADIENTITEM "sale_price" END That takes the sale_price field from the shapes values, maps its value to a percentage between MINVALUE and MAXVALUE and then picks the color that's appropriate from the color range. For a quick snapshot of how this looks, I've mapped relative size of parcels (as a percentage) to these colors: MINCOLOR 127 29 200 #Purple MAXCOLOR 255 255 0 #Yellow You can see the results here: http://www.binko.net/gradient.png As I said, this is still in the proof of concept stage, and I haven't tested against any rendering except GD (although in theory it should work). Any help on future direction and how to contribute back would be appreciated. Bill From richard at DUIF.NET Tue Apr 5 04:47:24 2005 From: richard at DUIF.NET (Richard Duivenvoorde) Date: Tue, 5 Apr 2005 13:47:24 +0200 Subject: transparency flash movie OUTPUT_MOVIE=SINGLE/MULTIPLE In-Reply-To: <42525853.70502@tarkvarastuudio.ee> Message-ID: Kristjan, Thanks I think you're right, I can try to make the bitmap (which is actually a call to another OGC mapserver) part of the mapserver mapfile. The mapserver then becomes a cascading mapserver? Don't know how you call the mapserver, but my swf's are exactly the same size as the images I request. I use calls like: "http://localhost/cgi-bin/mapserv.exe?map=fnl.map&mode=map&mapext=-20000%20300000%20300000%20620000&mapsize=300%20300" which returns a flashmovie of 300x300 to me IF you open the movie in the flashplayer. Opening it in a browser shows it indeed 5 times the normal size, but using it in another flashmovie is ok. Richard Kristjan Annus wrote: > I don't know about seting transparent backgrounds if swf output, but one > solution for you is to put your bitmap background image also to your map > file, and create one single swf output for all of your data. > > But I have encountered one problem with mapserver FLASH output too, > thats the size of the swf file, when you use OUTPUT_MOVIE=SINGLE option. > In my case it was about 2-5x of the file size of the same output in jpg > format. > Does anybody know is there some way to decrease the swf output file size? > > Kristjan > >> Hi List members, >> >> using the mapserver (two layers) swf/flash output I tried both format >> options: >> FORMATOPTION "OUTPUT_MOVIE=MULTIPLE" >> FORMATOPTION "OUTPUT_MOVIE=SINGLE" >> >> Using the first one returns an 'index'-swf from which I can get the two >> layer swf's. This results in 'transparent' movies, that is I can show a >> bitmap behind the movie in the flashplayer. >> >> When using output SINGLE, I receive the right features, but on an >> non-transparant (white) background (without changing any other option in >> the mapfile)? >> >> Question: >> - does anyone know IF it is possible to make the SINGLE output movies >> transparent? >> - If yes, please tell me how? >> - Is there another way, then delving in the mapserver cpp code, to >> influence the code within the mapserver-returned-swf-files (for example >> to influence _root or using _parent references)? >> - Is there other flash-output specific documentation other then: the fmv >> flashexample: http://mapserver.gis.umn.edu/user_utilities/fmv.zip? >> >> Thanks in advance, >> >> Richard > > > From kristjan at TARKVARASTUUDIO.EE Tue Apr 5 05:06:38 2005 From: kristjan at TARKVARASTUUDIO.EE (Kristjan Annus) Date: Tue, 5 Apr 2005 15:06:38 +0300 Subject: transparency flash movie OUTPUT_MOVIE=SINGLE/MULTIPLE In-Reply-To: <42527ACC.5090603@duif.net> Message-ID: Hi, the link you sent me is usable only from your own computer, so I cant see it. I'll send you a link from my Flash test application (player 7 required). http://www.tartu.ee/bi_kaart/tarkvarastuudio.html The opening page swf map file is about 100k in size. The same picture in jpg format in the same application is ~33k. I use it in another flash movie, but every time when the client is zooming a map he has to download about 100-300k new map image. Kristjan > > Kristjan, > > Thanks I think you're right, I can try to make the bitmap (which is > actually a call to another OGC mapserver) part of the mapserver > mapfile. The mapserver then becomes a cascading mapserver? > > Don't know how you call the mapserver, but my swf's are exactly the > same size as the images I request. I use calls like: > "http://localhost/cgi-bin/mapserv.exe?map=fnl.map&mode=map&mapext=-20000%20300000%20300000%20620000&mapsize=300%20300" > > which returns a flashmovie of 300x300 to me IF you open the movie in > the flashplayer. Opening it in a browser shows it indeed 5 times the > normal size, but using it in another flashmovie is ok. > > Richard > > Kristjan Annus wrote: > >> I don't know about seting transparent backgrounds if swf output, but one >> solution for you is to put your bitmap background image also to your map >> file, and create one single swf output for all of your data. >> >> But I have encountered one problem with mapserver FLASH output too, >> thats the size of the swf file, when you use OUTPUT_MOVIE=SINGLE option. >> In my case it was about 2-5x of the file size of the same output in jpg >> format. >> Does anybody know is there some way to decrease the swf output file >> size? >> >> Kristjan >> >>> Hi List members, >>> >>> using the mapserver (two layers) swf/flash output I tried both format >>> options: >>> FORMATOPTION "OUTPUT_MOVIE=MULTIPLE" >>> FORMATOPTION "OUTPUT_MOVIE=SINGLE" >>> >>> Using the first one returns an 'index'-swf from which I can get the two >>> layer swf's. This results in 'transparent' movies, that is I can show a >>> bitmap behind the movie in the flashplayer. >>> >>> When using output SINGLE, I receive the right features, but on an >>> non-transparant (white) background (without changing any other >>> option in >>> the mapfile)? >>> >>> Question: >>> - does anyone know IF it is possible to make the SINGLE output movies >>> transparent? >>> - If yes, please tell me how? >>> - Is there another way, then delving in the mapserver cpp code, to >>> influence the code within the mapserver-returned-swf-files (for example >>> to influence _root or using _parent references)? >>> - Is there other flash-output specific documentation other then: the >>> fmv >>> flashexample: http://mapserver.gis.umn.edu/user_utilities/fmv.zip? >>> >>> Thanks in advance, >>> >>> Richard >> >> >> >> From gerry.creager at TAMU.EDU Tue Apr 5 05:48:59 2005 From: gerry.creager at TAMU.EDU (Gerry Creager N5JXS) Date: Tue, 5 Apr 2005 07:48:59 -0500 Subject: Mapserver/PostGIS general questions about how best to do things In-Reply-To: <4251F775.4000508@swoodbridge.com> Message-ID: Hmmm. I thought I saw a discussion of doing #1 *on* the PostGIS list. I seem to recall a general sentiment that the up-front work sould be tedious but the overall result would be faster queries/maps. Regards #2, I think you're treading on unploughed (plowed? it's still early) ground for Mapserver. I run into the same sort of thing with the myriad of weather data I've got. I've decided that, for my page, I'm simply making a decision on what the users can get at. HOWEVER, I believe a php-based page could render a new mapfile on the fly while allowing column selections, and you could then work it by calling that new mapfile. I've not tried that. Just a thought. gerry Stephen Woodbridge wrote: > Hi all, > > I posted the bulk of this on the PostGIS list, but got not comments > back. Since this is also mapserver oriented and the questions are > general in nature, I'm hoping I might get some suggestions here. > > First, I have to say getting PostGIS up and running on freeBSD was very > easy so Kudos to the port maintainer and freeBSD. Also get data loaded > and get mapserver running with PostGIS was not nearly as hard as I had > thought it might be and I'm really liking what I see, even if I'm not > sure what to do with it all yet. Also getting mapserver running was just > as easy. > > What I have done (and I will try to get you a link soon to see it) is > load up the Census zipcode polygons and some of the Census summary File > 1 and 3 data and I can generate some thematic maps. > > Questions: > > 1) What are your thoughts on loading all Tiger into PostGIS versus > keeping most of it in shapefiles and only using some of the data out of > PostGIS? Performance? Are there other benefits to put it all in PostGIS? > If I had it all in PostGIS, are there other cool features that I could > have that I don't now with shapefiles? > > 2) What is the best way to scale or other map an attribute column into a > known range for use with mapserver CLASS EXPRESSIONS. The Census data > has literally thousands of columns any of which you might want to select > as the basis for a thematic map, or even some expression of multiple > columns. Conversely, a mapfile would have some fixed number of classes > that would say render you polygons as say shades of color based on the > attributes. > > Has anyone done this? anyone have any ideas or suggestions on how to do > this? I realize that 2) is slightly off topic, but any help would be > appreciated. > > Thanks, > -Steve -- Gerry Creager -- gerry.creager at tamu.edu Texas Mesonet -- AATLT, Texas A&M University Cell: 979.229.5301 Office: 979.458.4020 FAX: 979.847.8578 Page: 979.228.0173 Office: 903A Eller Bldg, TAMU, College Station, TX 77843 From fwarmerdam at GMAIL.COM Tue Apr 5 06:17:51 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Tue, 5 Apr 2005 09:17:51 -0400 Subject: Proof of Concept Gradient Coloring and Dev question In-Reply-To: <4252415F.2050000@umb.no> Message-ID: On Apr 5, 2005 3:42 AM, Havard Tveite wrote: > I agree that it would be nice to have a way of rendering > quantitative attributes in UMN Mapserver semi-automatically. > > What about making the functionality more "general" by for > instance including the following STYLE items: > > NUMBEROFCLASSES - the number of classes used (if not speficied, > a "continuous" rendering is performed). > BREAKS - The method of classification - "naturalbreaks", > "equalinterval", "histogramequal", ... or the actual > breakpoints ("1000,5000,7000,13000,21000,26000,29000"). H?vard, While the idea of generalizing this to generating a set of classes has merit, I don't think it is suitable when you use Bill's method of putting the controls in a STYLE. In fact, Bill's approach is to say that there would only be one class for gradient fill (what I would call color ramped) and that it is implemented as a specialized rendering style but STYLES are nested inside a single class. So we can't very well have a class with a style that generates a set of classes. At the very least it would be very confusing. Of course we could just call these "subclasses" breaks, but then you still end up duplicating alot of the descrete class mechanism. Better to just manually or though mapscript create a set of descrete classes if that is what you want. I certainly do like Bill's original approach for continuous gradient fill. In addition to using it for the rendering, I would also like legends to know how to show a gradient fill styled class as a color ramp with min, max and perhaps some intermediate values. Of course we will also need some control over how these legend entries are generated. PS. I would be interested in implementing the same STYLE mechanism for rasters if you changes make it into CVS. But we would still need someone to tackle the legend support. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From fwarmerdam at GMAIL.COM Tue Apr 5 06:27:52 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Tue, 5 Apr 2005 09:27:52 -0400 Subject: Autodesk support In-Reply-To: Message-ID: On Apr 5, 2005 5:13 AM, Flavio Hendry wrote: > hi frank > > thanks for your quick answer, can't you sleep or are you not in > canada? :-)) ... Flavio, I'm afraid I was in post-gaming email cleanup, and much too late at night. I'm suffering for it this morning. > I am always thinking in large datasets ... such as surveying of a whole > city which is in dxf/dwg normally in tens if not hundreds of mb ... so > if I resume: one has at least to create tiles and tileindexes which > involves as well work, so does it really make sense/cents ??? Isn't it > faster and far more efficient to take good ol' fme and create and index > shapes? There are a variety of possible situations, but if I had large DWG files, I would likely still want to translate them even if I could use them directly for the very reasons you mention. Also, depending on the nature of the DWG files, it might be very advantagous to setup a customized FME processing pipeline to translate the files into a format more suitable for direct mapping use. Spliting out just the data needed, and organizing it into sensible layers. I'm not really very familiar with DWG, but in DGN files (another CAD format) I have often found files to be organized in a way somewhat foreign to my GIS background. A translation operation can be helpful to regroup things, and through away extraneous stuff. Also, FME no doubt offers more sophisticated DWG support and transformation options than any general purpose OGR driver ever would. But I can still imagine a case where an organization might have thousands of DWG drawings in a database, and want to be able to pull any one out based on some criteria, and display it as a map. In that case, on the fly rendering might be better than trying to keep them all up to date. In any event, since we don't currently have DWG support, translation is pretty much the only option - or the FMEObjects link though that certains adds additional complications and performance overhead. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From bill at BINKO.NET Tue Apr 5 06:38:02 2005 From: bill at BINKO.NET (Bill Binko) Date: Tue, 5 Apr 2005 09:38:02 -0400 Subject: Proof of Concept Gradient Coloring and Dev question In-Reply-To: <931f8ea90504050617cd40ce6@mail.gmail.com> Message-ID: On Tue, 5 Apr 2005, Frank Warmerdam wrote: > On Apr 5, 2005 3:42 AM, Havard Tveite wrote: > > I agree that it would be nice to have a way of rendering > > quantitative attributes in UMN Mapserver semi-automatically. > > > > What about making the functionality more "general" by for > > instance including the following STYLE items: > > > > NUMBEROFCLASSES - the number of classes used (if not speficied, > > a "continuous" rendering is performed). > > BREAKS - The method of classification - "naturalbreaks", > > "equalinterval", "histogramequal", ... or the actual > > breakpoints ("1000,5000,7000,13000,21000,26000,29000"). > > H?vard, > > While the idea of generalizing this to generating a set of > classes has merit, I don't think it is suitable when you > use Bill's method of putting the controls in a STYLE. In > fact, Bill's approach is to say that there would only be one > class for gradient fill (what I would call color ramped) and that > it is implemented as a specialized rendering style but STYLES > are nested inside a single class. So we can't very well have a > class with a style that generates a set of classes. At the very > least it would be very confusing. One of the features I've considered (but haven't implemented yet) is an "INCREMENT" command. That would allow you to provide a fixed numbers of colors and would be a simple modification. I really like the continuous colors though, so I think the default for that would be "0". :) Regarding how to break it up, I think a first pass would just let you do something like this: STYLE MINCOLOR 0 0 0 MAXCOLOR 255 255 0 GRADIENTITEM "foo" MINVALUE 0.0 MAXVALUE 100.0 INCREMENT 20.0 END That would give you 5 steps from black to yellow. Another thing you should be aware of is that I'm using PostGIS layers as the data sources for these. That lets me do 'real' manipulation of the data realtime before it gets mapped. So I can do a complicated select that maps values to things like log scaling etc. and I don't have to add support into mapserver for it. I just thought I'd mention it as there are some that might like a more flexible (and complicated) solution here. > I certainly do like Bill's original approach for continuous gradient > fill. In addition to using it for the rendering, I would also like legends > to know how to show a gradient fill styled class as a color ramp with > min, max and perhaps some intermediate values. Of course we will > also need some control over how these legend entries are generated. (Thanks!) I agree: legends are a must, and I have not even begun to look at it. If anyone has legend experience, please let me know! I'm posting a patch to bug 1305 which I just created. If anyone wants a copy, just email me. Bill From sgillies at FRII.COM Tue Apr 5 07:21:06 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Tue, 5 Apr 2005 08:21:06 -0600 Subject: Proof of Concept Gradient Coloring and Dev question In-Reply-To: Message-ID: On Apr 5, 2005, at 7:17 AM, Frank Warmerdam wrote: > On Apr 5, 2005 3:42 AM, Havard Tveite wrote: >> I agree that it would be nice to have a way of rendering >> quantitative attributes in UMN Mapserver semi-automatically. >> =20 >> What about making the functionality more "general" by for >> instance including the following STYLE items: >> =20 >> NUMBEROFCLASSES - the number of classes used (if not speficied, >> a "continuous" rendering is performed). >> BREAKS - The method of classification - "naturalbreaks", >> "equalinterval", "histogramequal", ... or the actual >> breakpoints ("1000,5000,7000,13000,21000,26000,29000"). > =20 > H=E5vard, > > While the idea of generalizing this to generating a set of=20 > classes has merit, I don't think it is suitable when you=20 > use Bill's method of putting the controls in a STYLE. In > fact, Bill's approach is to say that there would only be one > class for gradient fill (what I would call color ramped) and that > it is implemented as a specialized rendering style but STYLES > are nested inside a single class. So we can't very well have a > class with a style that generates a set of classes. At the very > least it would be very confusing.=20 > > Of course we could just call these "subclasses" breaks, but=20 > then you still end up duplicating alot of the descrete class > mechanism. Better to just manually or though mapscript > create a set of descrete classes if that is what you want.=20 > > I certainly do like Bill's original approach for continuous gradient > fill. In addition to using it for the rendering, I would also like > legends > to know how to show a gradient fill styled class as a color ramp with > min, max and perhaps some intermediate values. Of course we will > also need some control over how these legend entries are generated. > > PS. I would be interested in implementing the same STYLE mechanism > for rasters if you changes make it into CVS. But we would still > need=20 > someone to tackle the legend support.=20 > > Best regards, > --=20 As I told Frank on IRC yesterday, I'm concerned that eventually users will want this continuous style feature applied to outline colors, font colors, font sizes, symbol sizes, and so on. The mapserver style could become an unwieldy object, and user data could become littered with *ITEM fields. I assert that there is nothing demonstrated here by Bill Binko that can't be accomplished by N classes and simple legend filtering. These N classes and filtered legends wouldn't have to be edited by hand, they could be generated using any flavor of mapscript. Don't take this the wrong way, Bill, I'm not dissing your creativity and hard work. I'm not actively opposed, just wanting to make sure that unintended consequences are considered. Additionally, "gradient fill" is not the right term to use for this new concept. A gradient fill is generally understood to be the painting of a single polygon or region with a smoothly varying color. I know you understand, Frank, I am just pointing out that it would be best to head off possible confusion. Just my $.02 Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From bill at BINKO.NET Tue Apr 5 07:35:37 2005 From: bill at BINKO.NET (Bill Binko) Date: Tue, 5 Apr 2005 10:35:37 -0400 Subject: Proof of Concept Gradient Coloring and Dev question In-Reply-To: <42529784.7090407@tamu.edu> Message-ID: On Tue, 5 Apr 2005, Gerry Creager N5JXS wrote: > I've gotta go back and look at the archives; I missed this on the first > pass. I've got the "lots of classes" solution when plotting > precipitable water vapor and it's really messy. > > Do you have simple tutorial on what you're doing I could snag? Please?! > > Thanks, Gerry I tried to keep it simple, so here's a quick run-down. Please remember, this is not gospel and may be dropped/rewritten -- I've gotten no feedback from Stephen Lime or others yet. If you want to try this out and your using linux/unix/bsd/etc., go to the bug at: http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1305 Download the patch (gradient.patch.gz) and save it in your (virgin) mapserver-4.4.1 source directory. run: $ zcat gradient.patch.gz | patch $ make clean all install as you normally do (in my case, I just copy the mapserv to my cgi-bin directory). Then you can add several new elements to your mapfiles: STYLE GRADIENTITEM "fieldName" #Must be numeric (float/int) MINVALUE 0.0 #The low end of the data values MAXVALUE 100.0 #The hight end of the data values MINCOLOR 255 0 0 #A color to match low values MAXCOLOR 0 255 0 #A color to match high values COLOR 0 0 0 #A dummy color - some parts of the #code won't draw without this # - I'll fix it later :-) END If your value is lower than MINVALUE, it will get the MINCOLOR (likewise for MAX). Values between MIN and MAX will get mapped (linearly) between the MINCOLOR and MAXCOLOR. I find that using the Gimp to make some simple linear gradients helps me pick good colors. I'll add INCREMENT in the not too distant future and update the patch. Bill From richard at DUIF.NET Tue Apr 5 07:49:20 2005 From: richard at DUIF.NET (Richard Duivenvoorde) Date: Tue, 5 Apr 2005 16:49:20 +0200 Subject: transparency flash movie OUTPUT_MOVIE=SINGLE/MULTIPLE In-Reply-To: <42527F4E.6000409@tarkvarastuudio.ee> Message-ID: Hi, sorry, I thought you had troubles with the image size (instead of the file size). I think a swf file is always bigger, because it contains more information? (haven't tried it with layers in my app...) But that is exactly the reason I opt for a mixed application: for background/reference map's I want to use images, but for points of interest (POI's) I want to use a (small) swf files. Other options are to retrieve xml instead of swf, and use the information from this xml to put POI's on your movie runtime. Why would you use swf maps anyway if you do not want to do something with (parts) of the data? Richard Kristjan Annus wrote: > Hi, > > the link you sent me is usable only from your own computer, so I cant > see it. > I'll send you a link from my Flash test application (player 7 required). > > http://www.tartu.ee/bi_kaart/tarkvarastuudio.html > > The opening page swf map file is about 100k in size. The same picture in > jpg format in the same application is ~33k. > I use it in another flash movie, but every time when the client is > zooming a map he has to download about 100-300k > new map image. > > Kristjan > >> >> Kristjan, >> >> Thanks I think you're right, I can try to make the bitmap (which is >> actually a call to another OGC mapserver) part of the mapserver >> mapfile. The mapserver then becomes a cascading mapserver? >> >> Don't know how you call the mapserver, but my swf's are exactly the >> same size as the images I request. I use calls like: >> "http://localhost/cgi-bin/mapserv.exe?map=fnl.map&mode=map&mapext=-20000%20300000%20300000%20620000&mapsize=300%20300" >> >> >> which returns a flashmovie of 300x300 to me IF you open the movie in >> the flashplayer. Opening it in a browser shows it indeed 5 times the >> normal size, but using it in another flashmovie is ok. >> >> Richard >> >> Kristjan Annus wrote: >> >>> I don't know about seting transparent backgrounds if swf output, but one >>> solution for you is to put your bitmap background image also to your map >>> file, and create one single swf output for all of your data. >>> >>> But I have encountered one problem with mapserver FLASH output too, >>> thats the size of the swf file, when you use OUTPUT_MOVIE=SINGLE option. >>> In my case it was about 2-5x of the file size of the same output in jpg >>> format. >>> Does anybody know is there some way to decrease the swf output file >>> size? >>> >>> Kristjan >>> >>>> Hi List members, >>>> >>>> using the mapserver (two layers) swf/flash output I tried both format >>>> options: >>>> FORMATOPTION "OUTPUT_MOVIE=MULTIPLE" >>>> FORMATOPTION "OUTPUT_MOVIE=SINGLE" >>>> >>>> Using the first one returns an 'index'-swf from which I can get the two >>>> layer swf's. This results in 'transparent' movies, that is I can show a >>>> bitmap behind the movie in the flashplayer. >>>> >>>> When using output SINGLE, I receive the right features, but on an >>>> non-transparant (white) background (without changing any other >>>> option in >>>> the mapfile)? >>>> >>>> Question: >>>> - does anyone know IF it is possible to make the SINGLE output movies >>>> transparent? >>>> - If yes, please tell me how? >>>> - Is there another way, then delving in the mapserver cpp code, to >>>> influence the code within the mapserver-returned-swf-files (for example >>>> to influence _root or using _parent references)? >>>> - Is there other flash-output specific documentation other then: the >>>> fmv >>>> flashexample: http://mapserver.gis.umn.edu/user_utilities/fmv.zip? >>>> >>>> Thanks in advance, >>>> >>>> Richard >>> >>> >>> >>> >>> > > From bill at BINKO.NET Tue Apr 5 07:53:13 2005 From: bill at BINKO.NET (Bill Binko) Date: Tue, 5 Apr 2005 10:53:13 -0400 Subject: Proof of Concept Gradient Coloring and Dev question In-Reply-To: <96b89507bb354f251aec9f19a4400c69@frii.com> Message-ID: On Tue, 5 Apr 2005, Sean Gillies wrote: > As I told Frank on IRC yesterday, I'm concerned that eventually users > will want this continuous style feature applied to outline colors, font > colors, font sizes, symbol sizes, and so on. The mapserver style could > become an unwieldy object, and user data could become littered with > *ITEM fields. I assert that there is nothing demonstrated here by Bill > Binko that can't be accomplished by N classes and simple legend > filtering. These N classes and filtered legends wouldn't have to be > edited by hand, they could be generated using any flavor of mapscript. > Don't take this the wrong way, Bill, I'm not dissing your creativity > and hard work. I'm not actively opposed, just wanting to make sure > that unintended consequences are considered. (First, don't worry: I'm hard to offend :) It's interesting: the very first thing I tried to do with mapserver was get things go "paint by number". I had a dataset from the state of Florida with "average daily traffic" and I wanted to get roads to color accordingly. I was actually very surprised to find that there was no way to use the values in the data to color the shapes. I later figured out classes and the expressions there, but to get a decent display, I had to have 25 classes in my layer! Since my map had 12 layers, this was NUTS! I'm sure there are currently solutions to this: I just think this works, and makes life much simpler. To claim that this will make mapfiles unwieldy seems a bit backward: doing this now is clumsy. That said, I'm open to suggestions on better ways to structure the file elements! Originally, I was going to change the existing COLOR element to allow you to use data fields and expressions in the RBG(A) values. That was very flexible, but doing the basics became complicated: MINCOLOR 255 0 0 MAXCOLOR 0 0 255 MINVALUE 1 MAXVALUE 3 GRADIENT "foo" became: COLOR (255+((0-255)*[foo](3-1))) 0 (0+((255-0)*[foo](3-1))) It works, but it's tough to explain (I practice these on my wife :) It's also quite a bit harder to implement than what I have done. > > Additionally, "gradient fill" is not the right term to use for this new > concept. A gradient fill is generally understood to be the painting of > a single polygon or region with a smoothly varying color. I know you > understand, Frank, I am just pointing out that it would be best to head > off possible confusion. I'm not attached to the word gradient: I just based it on the Gimp tool that I used for picking colors. Color-ramp seems to have been bandied about earlier (although I'm not a huge fan of that one either :). Again, I did this to make my maps work: I'm not picky about when/how/if it makes it into the main distribution. I'm just trying to give back. :) Bill From stephane.riff at CERENE.FR Tue Apr 5 07:52:19 2005 From: stephane.riff at CERENE.FR (=?ISO-8859-1?Q?St=E9phane_RIFF?=) Date: Tue, 5 Apr 2005 16:52:19 +0200 Subject: REsize window question In-Reply-To: <42494E90.7090202@cerene.fr> Message-ID: To close this post i give what i did, it's not as good as i hope but if someone interested. $w_ratio = $old_width / $new_width; $h_ratio = $old_height / $new_height; $new_geo_width = ($xmax - $xmin) / $w_ratio; $new_geo_height = ($ymax - $ymin) / $h_ratio; $w_geo_diff = ($xmax - $xmin) - $new_geo_width ; $h_geo_diff = ($ymax - $ymin) - $new_geo_height ; $map->setextent( $xmin+$w_geo_diff/2 , $ymin+$h_geo_diff/2 , $xmax-$w_geo_diff/2 , $ymax-$h_geo_diff/2 ); $my_point = ms_newpointObj(); $my_point->setXY($width/2,$height/2); $my_extent = ms_newrectObj(); $my_extent->setextent($map->extent->minx,$map->extent->miny,$map->extent->maxx,$map->extent->maxy); $gps_map->zoomscale($map->scale,$my_point,$new_width,$new_height,$my_extent); Voila, the scale varying a little but it's significant Bye St?phane RIFF wrote: > Thanks for answered.... > > I realize that my question was not really clear :) > > In fact, i want to keep the scale not the extent because > when the map is resized and (if i keep the extent) of course scale > change, then > the active layer may change regards to scale and it's not very intuitive > for the > user to understand why. > So how can i calculate the new extent to keep same scale with different > map size ? > I use phpmapscript 4.2.5. > > Voila, thanks all > > Martin Weinelt wrote: > >> On Friday 18 March 2005 09:35, St?phane RIFF wrote: >> >> >>> My mapserver application need to redraw the map when the window is >>> resized. >>> My problem is that i don't know how to keep the same extent >>> in two map with different size !!! >>> >>> >> >> Using mapserver CGI you just send MAPEXTENT and MAPSIZE >> to the CGI (together with layers, etc.) and that's it. >> >> >> >>> in fact i don't want the map >>> to change its scale when i resize the window. >>> >>> >> >> Keeping mapextent at different mapsize yields another scale, no? >> >> >> >>> How can i calculate the newExtent to do that ??? >>> Is it possible ??? >>> >>> >> >> You do not calculate it, you just reuse the image extent from the >> previous >> map (which can be sent by the CGI together with the image). >> >> >> >>> How do you handle that kind of function ? example ? >>> >>> >> >> I do it on the client side with js: >> >> function setMapSize() { >> // mimg is a div in the doc with the map as background image >> mimg.style.backgroundImage='url(images/waiting.gif)'; >> // a 'wait indicator' is shown until the new image arrives >> // w is the browser window >> var mh = (w.innerHeight) ? w.innerHeight : d.body.clientHeight; >> var mw = (w.innerWidth) ? w.innerWidth : d.body.clientWidth; >> mh-=60; mw-=230; // correct for other elements which >> also need a bit of screen real estate >> mimg.style.width=mw; mimg.style.height=mh; // set the div to the >> new size >> myMap.mode='browse'; // myMap is an object which holds >> some map parameters >> myMap.mapsize=[mw,mh]; // ... mapsize for instance >> myMap.mapext.set(myMap.imgext.get()); // or map extent - here >> copied from the last image recieved >> var s=myMap.getReqStr('mapsize','mapext'); // this glues a >> GET-string for the new map request >> getMap(s); // invokes the new map >> } >> >> this is just an example, the same purpose can be served in a more >> traditional way. >> >> Cheers, Martin >> >> >> >> >> > > From woodbri at SWOODBRIDGE.COM Tue Apr 5 08:29:19 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Tue, 5 Apr 2005 11:29:19 -0400 Subject: Proof of Concept Gradient Coloring and Dev question In-Reply-To: Message-ID: Bill Binko wrote: > On Tue, 5 Apr 2005, Sean Gillies wrote: > > >>As I told Frank on IRC yesterday, I'm concerned that eventually users >>will want this continuous style feature applied to outline colors, font >>colors, font sizes, symbol sizes, and so on. The mapserver style could >>become an unwieldy object, and user data could become littered with >>*ITEM fields. I assert that there is nothing demonstrated here by Bill >>Binko that can't be accomplished by N classes and simple legend >>filtering. These N classes and filtered legends wouldn't have to be >>edited by hand, they could be generated using any flavor of mapscript. >>Don't take this the wrong way, Bill, I'm not dissing your creativity >>and hard work. I'm not actively opposed, just wanting to make sure >>that unintended consequences are considered. > > > (First, don't worry: I'm hard to offend :) > > It's interesting: the very first thing I tried to do with mapserver was > get things go "paint by number". I had a dataset from the state of > Florida with "average daily traffic" and I wanted to get roads to color > accordingly. I was actually very surprised to find that there was no way > to use the values in the data to color the shapes. I later figured out > classes and the expressions there, but to get a decent display, I had to > have 25 classes in my layer! Since my map had 12 layers, this was NUTS! This has been a frustration of mine also. We can get text angles from attributes but not set colors from attributes (without defining lots of classes). Granted a "color" is actually three values for RGB and not a single value. I had thought about another way of doing something similar that could be used with attributes easily. That would be to define a named color table using your ideas for ramps, or discrete color entries. The to reference the named table and an attribute column. COLORTABLE "foo" MINCOLOR 255 0 0 MAXCOLOR 0 0 255 STEPS 10 END COLORTABLE "bar" COLOR 255 0 0 # 0 COLOR 238 0 0 # 1 COLOR 221 0 0 # 2 ... COLOR 0 0 0 # n OFFRANGE 0 255 0 # color to display if the index is out of range END Then in a layer be able to reference it along with an column COLORTABLEITEM "bar" "attribute" Or something along these lines. I am glad that you actually implemented a prototype and it is generating a lot of discussion. I think it shows the need for this kind of feature. > I'm sure there are currently solutions to this: I just think this works, > and makes life much simpler. To claim that this will make mapfiles > unwieldy seems a bit backward: doing this now is clumsy. If our mapfiles are getting unwieldy, then maybe it is time to rethink them in general. I know this is heresy, because so much of mapserver code it tied to the structure of the mapfiles. But they have experienced a lot of growth over the last few years and if we want to experience continued growth as our community grows and the needs grow we need to be able to add features like this. Some of our most experienced users are working about the limitations and restriction in mapfiles today by using the C preprocessor and other tools for automatic generation of mapfiles, based on their needs. Anyway, something for our developer to think about. -Steve > That said, I'm open to suggestions on better ways to structure the file > elements! Originally, I was going to change the existing COLOR element to > allow you to use data fields and expressions in the RBG(A) values. That > was very flexible, but doing the basics became complicated: > > MINCOLOR 255 0 0 > MAXCOLOR 0 0 255 > MINVALUE 1 > MAXVALUE 3 > GRADIENT "foo" > > became: > > COLOR (255+((0-255)*[foo](3-1))) 0 (0+((255-0)*[foo](3-1))) > > It works, but it's tough to explain (I practice these on my wife :) It's > also quite a bit harder to implement than what I have done. > > >>Additionally, "gradient fill" is not the right term to use for this new >>concept. A gradient fill is generally understood to be the painting of >>a single polygon or region with a smoothly varying color. I know you >>understand, Frank, I am just pointing out that it would be best to head >>off possible confusion. > > > I'm not attached to the word gradient: I just based it on the Gimp tool > that I used for picking colors. Color-ramp seems to have been bandied > about earlier (although I'm not a huge fan of that one either :). > > Again, I did this to make my maps work: I'm not picky about when/how/if it > makes it into the main distribution. I'm just trying to give back. :) > > Bill > From dldeskins at GMAIL.COM Tue Apr 5 08:41:37 2005 From: dldeskins at GMAIL.COM (Don Deskins) Date: Tue, 5 Apr 2005 10:41:37 -0500 Subject: MySQL and mapfile Message-ID: Hello, Again, I am new to mapserver. I have finally gotten my map to display properly but it is very slow, so I am interested in getting all of the data into a database (MySQL). I have data (in .shp, .dbf, and .shx files) that I have converted using mygisimport. This produce an sql file which I imported into the MySql db. I am now having trouble accessing this data with the mapfile. Here is what I have: LAYER NAME "SCAP_Cert2004_ParcelsUTM16M" CONNECTIONTYPE mygis CONNECTION "host:user:password:db:bin:" #geo is the name of the column DATA "geo from Parcels feature" STATUS ON TYPE POLYGON CLASS OUTLINECOLOR 255 0 0 TEMPLATE "template.html" END MAXSCALE 40000 TOLERANCE 0 TOLERANCEUNITS PIXELS END I get the following error: Warning: [MapServer Error]: SELECT feature.id, feature.vertices, geometry.WKB_GEOMETRY from bad mysql query : bad mysql query in on line 217 Can anyone help with this? BTW, I tried to use shp2mysql.pl, but got several failures. Thanks, Don From stephane.riff at CERENE.FR Tue Apr 5 08:55:52 2005 From: stephane.riff at CERENE.FR (=?ISO-8859-1?Q?St=E9phane_RIFF?=) Date: Tue, 5 Apr 2005 17:55:52 +0200 Subject: setLayersDrawingOrder problem Message-ID: Hi I have a mapfile with one layer inside. In my application i add some dynamic layer by mapscript. I want that the static layer alwayes drawn last so i used setLayersDrawingOrder but i can't get it works. I did $map->save() (just after setLayersDrawingOrder and map->draw) and look at it : My dynamic layer is the last in the mapfile . Does someone success with that Thanks From havard.tveite at UMB.NO Tue Apr 5 09:02:14 2005 From: havard.tveite at UMB.NO (Havard Tveite) Date: Tue, 5 Apr 2005 18:02:14 +0200 Subject: Proof of Concept Gradient Coloring and Dev question In-Reply-To: <931f8ea90504050617cd40ce6@mail.gmail.com> Message-ID: Frank, I agree with you in most of the things you write below, but I still think that a built-in, general way of rendering layers based on ordinal, interval or ratio attributes using Mapserver could be quite useful. There are cartographical rules to support such an approach. Mapserver currently provides built-in mechanisms that are conveniently used for rendering layers based on nominal / qualitative (discrete) attributes. LABELSIZEITEM can also be used to control size in a rendering based on a quantitative attribute (STYLEITEM?) It is not very complicated to do customized rendering using the basic mechanisms and Mapscript, but since quantitative attributes are so common, it would be nice to have built in support for rendering maps based on them. Mapscript is for power users. It would also be nice to have built-in support for legends for renderings based on quantitative attributes. For layer rendering based on quantitative attributes, what we need to define is a CLASSITEM (which is already there). In addition we need to specify the method for classifying and rendering based on this item/attribute. The CLASS object is currently a very central component of the LAYER object. Classifying and "rendering" could be done by using a "dummy" CLASS object with a STYLE object that specifies the rendering (as proposed in this thread). This is, as Frank points out, confusing, since classification is performed in the STYLE object of a CLASS object. Another approach is use some (new?) kind of style object (perhaps a new name is needed?) that is a direct member of the LAYER object. Since new elements of the STYLE object now have been suggested that do not have a use for non-quantitative attributes, it could perhaps be just as well to introduce a new concept at the LAYER level instead? Classes could then be defined using the current (discrete) CLASS approach or the "new" approach, depending on the level of measurment of the attributes that are used for the LAYER rendering. This is probably not a trivial enhancement, and something for the wish-list. What I am worried about is that such a future development could be blocked by the introduction of the "light-weight" gradient colouring support. Just some thoughts/ideas... H?vard Frank Warmerdam wrote: > On Apr 5, 2005 3:42 AM, Havard Tveite wrote: > >>I agree that it would be nice to have a way of rendering >>quantitative attributes in UMN Mapserver semi-automatically. >> >>What about making the functionality more "general" by for >>instance including the following STYLE items: >> >>NUMBEROFCLASSES - the number of classes used (if not speficied, >> a "continuous" rendering is performed). >>BREAKS - The method of classification - "naturalbreaks", >> "equalinterval", "histogramequal", ... or the actual >> breakpoints ("1000,5000,7000,13000,21000,26000,29000"). > > > H?vard, > > While the idea of generalizing this to generating a set of > classes has merit, I don't think it is suitable when you > use Bill's method of putting the controls in a STYLE. In > fact, Bill's approach is to say that there would only be one > class for gradient fill (what I would call color ramped) and that > it is implemented as a specialized rendering style but STYLES > are nested inside a single class. So we can't very well have a > class with a style that generates a set of classes. At the very > least it would be very confusing. > > Of course we could just call these "subclasses" breaks, but > then you still end up duplicating alot of the descrete class > mechanism. Better to just manually or though mapscript > create a set of descrete classes if that is what you want. > > I certainly do like Bill's original approach for continuous gradient > fill. In addition to using it for the rendering, I would also like legends > to know how to show a gradient fill styled class as a color ramp with > min, max and perhaps some intermediate values. Of course we will > also need some control over how these legend entries are generated. > > PS. I would be interested in implementing the same STYLE mechanism > for rasters if you changes make it into CVS. But we would still need > someone to tackle the legend support. > > Best regards, -- H?vard Tveite Department of Mathematical Sciences and Technology, UMB Dr?bakveien 14, POBox 5003, N-1432 ?s, NORWAY Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt From lfilak at MEDINACO.ORG Tue Apr 5 09:04:50 2005 From: lfilak at MEDINACO.ORG (Lowell Filak) Date: Tue, 5 Apr 2005 12:04:50 -0400 Subject: MySQL and mapfile Message-ID: The following message was sent by Don Deskins on Tue, 5 Apr 2005 10:41:37 -0500. > Hello, > > Again, I am new to mapserver. I have finally gotten my map to display > properly but it is very slow, so I am interested in getting all of the data > into a database (MySQL). > > I have data (in .shp, .dbf, and .shx files) that I have converted using > mygisimport. This produce an sql file which I imported into the MySql db. > I am now having trouble accessing this data with the mapfile. Here is what > I have: > > LAYER > NAME "SCAP_Cert2004_ParcelsUTM16M" > CONNECTIONTYPE mygis > CONNECTION "host:user:password:db:bin:" > #geo is the name of the column > DATA "geo from Parcels feature" > STATUS ON > TYPE POLYGON > CLASS > OUTLINECOLOR 255 0 0 > TEMPLATE "template.html" > END > MAXSCALE 40000 > TOLERANCE 0 > TOLERANCEUNITS PIXELS > END > > I get the following error: > > Warning: [MapServer Error]: SELECT feature.id, feature.vertices, > geometry.WKB_GEOMETRY from bad mysql query : bad mysql query in and name> on line 217 > > Can anyone help with this? > > BTW, I tried to use shp2mysql.pl, but got several failures. > > Thanks, Don, This may be a good time to record a recent run-in I had with shp2mysql.pl while helping another person, we don't actually use it: 1) If you're using Geo::Shapelib-0.12 you need to change 'ShapeRecords' to 'Shaperecords' in shp2mysql.pl. 2) If you're using Geo::Shapelib-0.13 you need to leave 'ShapeRecords' as 'ShapeRecords' but - Change: for ($v = 0; $v < $vars; $v++){ to for $v ( keys %{${$shape->{ShapeRecords}}[0]} ) { in shp2mysql.pl As far as improving speed, you have many options available. Have you searched the archives for tiling & indexing shapefiles yet? Lowell From gireddy at GMAIL.COM Tue Apr 5 09:12:15 2005 From: gireddy at GMAIL.COM (Shashi Gireddy) Date: Tue, 5 Apr 2005 11:12:15 -0500 Subject: blank map when a layer is defined from php In-Reply-To: <4251B475.10809@dmsolutions.ca> Message-ID: I found MS_POSTGIS in archives, but no use. any other ideas please. thank you, On Apr 4, 2005 4:41 PM, Yewondwossen Assefa wrote: > I think you should use something like : > > $layer->set(connectiontype,MS_POSTGIS) instead of > > $layer->set(connectiontype, "postgis"); > > Later, > > > Shashi Gireddy wrote: > > I spent a lot of time on it. I didn't found any solution. Is it > > appears to be a bug. because it is trying to open the expression as > > file, here is the error. > > > > Warning: [MapServer Error]: msSHPOpenFile(): (c:/ms/map_files/the geom > > from counties) in c:\inetpub\wwwroot\mapExamples\map3.php on line 22 > > here "the geom from counties" is the select statement. anybody has any idea. > > > > thank you, > > shashi. > > > > > > On Feb 21, 2005 4:29 PM, Shashi Gireddy wrote: > > > >>Hi all, > >>Thank you steven and Stephen for helping me in removing label > >>overlapping.I really appreciate your help. I am perfectly able to > >>join the geometry object with external database. Now I want to make > >>everything dynamic, i.e generate layers dynamically from php. I had a > >>problem doing so. > >> > >>I am getting a blank map when i tried to generate layers dynamically > >>from php, here is my code > >> > >>$map_path="c:/ms/map_files/"; > >> $map_file="Test.map"; > >> > >>$map = ms_newMapObj($map_path.$map_file); > >>$layer = ms_newLayerObj($map); > >>$lname="counties"; > >>$layer->set(name, $lname); > >>$layer->set(connectiontype, "postgis"); > >>$layer->set(connection, "user=root password=c3n5u5 dbname=census > >>host=localhost"); > >>$layer->set(data, "the_geom from calhoun_qry1 using srid=-1"); > >>$layer->set(type, MS_POLYGON); > >>$layer->set(status, MS_DEFAULT); > >>$class = ms_newClassObj($layer); > >>$class->set(name, "class1"); > >>$class->setexpression("[p001001]"); > >>$style = ms_newStyleObj($class); > >>$style->color->setRGB(10,100,10); > >>$i= $map->save("c:/inetpub/wwwroot/tmp/Test.map"); > >> if ($i != -1){ > >> $image=$map->draw(); > >> //$map->{imagecolor}= $map->addColor(0,0,255); > >> $image_url=$image->saveWebImage(); > >> } > >> > >>here is the error messages: > >>Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named > >>'(null)'. in c:\inetpub\wwwroot\mapExamples\map3.php on line 22 > >> > >>Warning: [MapServer Error]: msSHPOpenFile(): (c:/ms/map_files/the geom > >>from counties) in c:\inetpub\wwwroot\mapExamples\map3.php on line 22 > >> > >>Warning: [MapServer Error]: msSHPOpenFile(): (c:/ms/map_files/the geom > >>from counties) in c:\inetpub\wwwroot\mapExamples\map3.php on line 22 > >> > >>Fatal error: Call to a member function on a non-object in > >>c:\inetpub\wwwroot\mapExamples\map3.php on line 24 > >> > >>the worning message is not looking relevant c:/ms/map_files/the geom from ..... > >> > >>can anybody help me please.... > >> > >> > >>-- > >>Shashi Kiran Reddy. Gireddy, > >>Graduate Assistant, > >>CBER, University of Alabama. > >>http://www.cs.ua.edu/shashi > >>Home: 205-752-5137 Cell: 205-657-1438 > >> > > > > > > > > -- > > Shashi Kiran Reddy. Gireddy, > > Graduate Assistant, > > CBER, University of Alabama. > > http://www.cs.ua.edu/shashi > > Home: 205-752-5137 Cell: 205-657-1438 > > > > -- > ---------------------------------------------------------------- > Assefa Yewondwossen > Software Analyst > > Email: assefa at dmsolutions.ca > http://www.dmsolutions.ca/ > > Phone: (613) 565-5056 (ext 14) > Fax: (613) 565-0925 > ---------------------------------------------------------------- > > -- Shashi Kiran Reddy. Gireddy, Graduate Assistant, CBER, University of Alabama. http://www.cs.ua.edu/shashi Home: 205-752-5137 Cell: 205-657-1438 From woodbri at SWOODBRIDGE.COM Tue Apr 5 09:11:54 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Tue, 5 Apr 2005 12:11:54 -0400 Subject: MySQL and mapfile In-Reply-To: Message-ID: Don Deskins wrote: > Hello, > > Again, I am new to mapserver. I have finally gotten my map to display > properly but it is very slow, so I am interested in getting all of the data > into a database (MySQL). Shapefiles are very fast if they are set up correctly and indexed. You would be wise to understand and resolve the performance issues before moving the data to mysql as it is not likely to be faster. For example do all you shapefiles have *.qix file? How is your mapfile structured? Are you trying to draw too much detail at larger zoom values? When is it slow? Zoomed in or zoomed out or both. If we had some more information we might be able to help you resolve the performance issues. Understanding these issues might also help you when you get the data loaded into mygis. -Steve W. > I have data (in .shp, .dbf, and .shx files) that I have converted using > mygisimport. This produce an sql file which I imported into the MySql db. > I am now having trouble accessing this data with the mapfile. Here is what > I have: > > LAYER > NAME "SCAP_Cert2004_ParcelsUTM16M" > CONNECTIONTYPE mygis > CONNECTION "host:user:password:db:bin:" > #geo is the name of the column > DATA "geo from Parcels feature" > STATUS ON > TYPE POLYGON > CLASS > OUTLINECOLOR 255 0 0 > TEMPLATE "template.html" > END > MAXSCALE 40000 > TOLERANCE 0 > TOLERANCEUNITS PIXELS > END > > I get the following error: > > Warning: [MapServer Error]: SELECT feature.id, feature.vertices, > geometry.WKB_GEOMETRY from bad mysql query : bad mysql query in and name> on line 217 > > Can anyone help with this? > > BTW, I tried to use shp2mysql.pl, but got several failures. > > Thanks, > > Don > From agomez at CCCMM.CESGA.ES Tue Apr 5 08:13:15 2005 From: agomez at CCCMM.CESGA.ES (=?iso-8859-1?Q?Alberto_G=F3mez?=) Date: Tue, 5 Apr 2005 17:13:15 +0200 Subject: Can't access jbox applet through javascript Message-ID: When i try to call dragon() or boxon() methods from javascript [ document.jbox.boxon(); ] i get an error, object is null. I follow all steps in howto. I can navigate basically when i define "box" and "drag" vars at the first time, but if i set "box=true" then it never changes. I'm using iis 5.1 in xp and CGI Mapserv 4.4. I've read a lot and i haven't found a solution. Can anyone helpme please? Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nbarker at RSINC.COM Tue Apr 5 09:18:23 2005 From: nbarker at RSINC.COM (Norman Barker) Date: Tue, 5 Apr 2005 17:18:23 +0100 Subject: MapServer WCS - Jpeg2000 Message-ID: Hi, been looking at the WCS impl again, with particular reference to NetCDF. A comment by Frank Warmerdam said any format that supported bands could be used, not necessarily geotiff. Well compression in geotiff does nothing for NetCDF but JP2k had a compression ratio of 40% (obviously this changes due to quality levels etc.) This leads to some questions 1) The WMS supports JP2k, any reason why it should work with the WCS? 2) JP2K over http doesn't give many advantages apart from disk storage size, are they any plans to implement jpip over http to give streaming capabilities? 3) Finally if anyone knows how to implement the temporal dimension in the WCS I would be grateful!! OpenGIS announced an initiative to put GML coverages inside Jpeg2000 which is interesting, but I just want to serve the data at the moment, and use the XML inside the Jpeg2000 to hold a scaling value since Jp2k can't hold floating points. I hope we can discuss this further on this list. Norman -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of Lowell Filak Sent: Tuesday, April 05, 2005 5:05 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] MySQL and mapfile The following message was sent by Don Deskins on Tue, 5 Apr 2005 10:41:37 -0500. > Hello, > > Again, I am new to mapserver. I have finally gotten my map to display > properly but it is very slow, so I am interested in getting all of the data > into a database (MySQL). > > I have data (in .shp, .dbf, and .shx files) that I have converted using > mygisimport. This produce an sql file which I imported into the MySql db. > I am now having trouble accessing this data with the mapfile. Here is what > I have: > > LAYER > NAME "SCAP_Cert2004_ParcelsUTM16M" > CONNECTIONTYPE mygis > CONNECTION "host:user:password:db:bin:" > #geo is the name of the column > DATA "geo from Parcels feature" > STATUS ON > TYPE POLYGON > CLASS > OUTLINECOLOR 255 0 0 > TEMPLATE "template.html" > END > MAXSCALE 40000 > TOLERANCE 0 > TOLERANCEUNITS PIXELS > END > > I get the following error: > > Warning: [MapServer Error]: SELECT feature.id, feature.vertices, > geometry.WKB_GEOMETRY from bad mysql query : bad mysql query in and name> on line 217 > > Can anyone help with this? > > BTW, I tried to use shp2mysql.pl, but got several failures. > > Thanks, Don, This may be a good time to record a recent run-in I had with shp2mysql.pl while helping another person, we don't actually use it: 1) If you're using Geo::Shapelib-0.12 you need to change 'ShapeRecords' to 'Shaperecords' in shp2mysql.pl. 2) If you're using Geo::Shapelib-0.13 you need to leave 'ShapeRecords' as 'ShapeRecords' but - Change: for ($v = 0; $v < $vars; $v++){ to for $v ( keys %{${$shape->{ShapeRecords}}[0]} ) { in shp2mysql.pl As far as improving speed, you have many options available. Have you searched the archives for tiling & indexing shapefiles yet? Lowell From fwarmerdam at GMAIL.COM Tue Apr 5 09:26:46 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Tue, 5 Apr 2005 12:26:46 -0400 Subject: MapServer WCS - Jpeg2000 In-Reply-To: Message-ID: On Apr 5, 2005 12:18 PM, Norman Barker wrote: > Hi, > > been looking at the WCS impl again, with particular reference to NetCDF. > > A comment by Frank Warmerdam said any format that supported bands could be used, > not necessarily geotiff. Well compression in geotiff does nothing for NetCDF but > JP2k had a compression ratio of 40% (obviously this changes due to quality levels etc.) > > This leads to some questions > > 1) The WMS supports JP2k, any reason why it should work with the WCS? Norman, JP2K should work fine with WCS - assuming your WCS client knows what to do with the files. > 2) JP2K over http doesn't give many advantages apart from disk storage size, are they > any plans to implement jpip over http to give streaming capabilities? This does not make sense in the MapServer context. GDAL client support for JPIP was incorporated some time ago but I could never get it to work very well. I have no immediately plans to pursue that further. > 3) Finally if anyone knows how to implement the temporal dimension in the WCS I would > be grateful!! Steve Lime has examples of this up somewhere. Hopefully he'll follow up on this. But you might find info in the WCS topic in the wiki. > OpenGIS announced an initiative to put GML coverages inside Jpeg2000 which is interesting, but > I just want to serve the data at the moment, and use the XML inside the Jpeg2000 to hold a scaling value > since Jp2k can't hold floating points. Getting the scaling value into the JP2K file will require some custom work for you both on the server and the client. I am interested in carrying scale and offset values in GML coverages in J2K files but haven't started to explore that. I only just recently added support in GDAL for reading and writing them in GeoTIFF (in a custom tag). Even with that done, it still doesn't kick in with MapServer since MapServer doesn't try to copy that sort of metadata into the generated map. Perhaps we will eventually need OutputFormat options to attach extra metadata to output files. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From ARyan at CO.LINN.OR.US Tue Apr 5 11:18:22 2005 From: ARyan at CO.LINN.OR.US (Ryan, Adam) Date: Tue, 5 Apr 2005 11:18:22 -0700 Subject: setLayersDrawingOrder problem Message-ID: > -----Original Message----- > From: St?phane RIFF [mailto:stephane.riff at CERENE.FR] > Sent: Tuesday, April 05, 2005 8:56 AM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: [UMN_MAPSERVER-USERS] setLayersDrawingOrder problem > > > Hi > > I have a mapfile with one layer inside. > In my application i add some dynamic layer by mapscript. > I want that the static layer alwayes drawn last so i used > setLayersDrawingOrder but i can't get it works. > > I did $map->save() (just after setLayersDrawingOrder and > map->draw) and look at it : > > My dynamic layer is the last in the mapfile . > > Does someone success with that > Thanks > St?phane, Try using ... $map -> moveLayerUp($layerIndexNumber) ... instead of setLayersDrawingOrder. Adam From dldeskins at GMAIL.COM Tue Apr 5 11:23:03 2005 From: dldeskins at GMAIL.COM (Don Deskins) Date: Tue, 5 Apr 2005 14:23:03 -0400 Subject: MySQL and mapfile In-Reply-To: <4252B8CA.5050807@swoodbridge.com> Message-ID: Steve, Thank you very much for your reply. I am sorry to say that I didn't know there was a ".qix" file. With my database background, I assumed that an indexed database field would be faster than a flat file. Of course, that is correct if the flat file is not index. I searched through the archives and found out what a .qix file was all about. I created one for each of my shapes and sped up download time by 50%. Now on to tiling the shp files :) Thanks again On Apr 5, 2005 12:11 PM, Stephen Woodbridge wrote: > Don Deskins wrote: > > Hello, > > > > Again, I am new to mapserver. I have finally gotten my map to display > > properly but it is very slow, so I am interested in getting all of the data > > into a database (MySQL). > > Shapefiles are very fast if they are set up correctly and indexed. You > would be wise to understand and resolve the performance issues before > moving the data to mysql as it is not likely to be faster. > > For example do all you shapefiles have *.qix file? > How is your mapfile structured? Are you trying to draw too much detail > at larger zoom values? > > When is it slow? Zoomed in or zoomed out or both. If we had some more > information we might be able to help you resolve the performance issues. > > Understanding these issues might also help you when you get the data > loaded into mygis. > > -Steve W. > > > I have data (in .shp, .dbf, and .shx files) that I have converted using > > mygisimport. This produce an sql file which I imported into the MySql db. > > I am now having trouble accessing this data with the mapfile. Here is what > > I have: > > > > LAYER > > NAME "SCAP_Cert2004_ParcelsUTM16M" > > CONNECTIONTYPE mygis > > CONNECTION "host:user:password:db:bin:" > > #geo is the name of the column > > DATA "geo from Parcels feature" > > STATUS ON > > TYPE POLYGON > > CLASS > > OUTLINECOLOR 255 0 0 > > TEMPLATE "template.html" > > END > > MAXSCALE 40000 > > TOLERANCE 0 > > TOLERANCEUNITS PIXELS > > END > > > > I get the following error: > > > > Warning: [MapServer Error]: SELECT feature.id, feature.vertices, > > geometry.WKB_GEOMETRY from bad mysql query : bad mysql query in > and name> on line 217 > > > > Can anyone help with this? > > > > BTW, I tried to use shp2mysql.pl, but got several failures. > > > > Thanks, > > > > Don > > > > -- Don Deskins From dldeskins at GMAIL.COM Tue Apr 5 11:26:19 2005 From: dldeskins at GMAIL.COM (Don Deskins) Date: Tue, 5 Apr 2005 14:26:19 -0400 Subject: MySQL and mapfile In-Reply-To: <20050405160441.C54F91A65A5@mail.medinaco.org> Message-ID: > > As far as improving speed, you have many options available. Have you > searched the archives for tiling & indexing shapefiles yet? > > Lowell > Lowell, Thanks for your reply... I will try that now. Boy am I getting an education! :) From jdport at VERITIME.COM Tue Apr 5 11:43:00 2005 From: jdport at VERITIME.COM (Jeff Portwine) Date: Tue, 5 Apr 2005 14:43:00 -0400 Subject: MySQL and mapfile Message-ID: You don't happen to have a link to that post about .qix files do you? I have no idea what they are about, but I know that most of my shapefiles don't have them. If I can create them and speed up my application I'd love to do so :) -Jeff ----- Original Message ----- From: "Don Deskins" To: Sent: Tuesday, April 05, 2005 2:23 PM Subject: Re: [UMN_MAPSERVER-USERS] MySQL and mapfile > Steve, > > Thank you very much for your reply. I am sorry to say that I didn't > know there was a ".qix" file. With my database background, I assumed > that an indexed database field would be faster than a flat file. Of > course, that is correct if the flat file is not index. I searched > through the archives and found out what a .qix file was all about. I > created one for each of my shapes and sped up download time by 50%. > Now on to tiling the shp files :) > > > Thanks again > > On Apr 5, 2005 12:11 PM, Stephen Woodbridge > wrote: >> Don Deskins wrote: >> > Hello, >> > >> > Again, I am new to mapserver. I have finally gotten my map to display >> > properly but it is very slow, so I am interested in getting all of the >> > data >> > into a database (MySQL). >> >> Shapefiles are very fast if they are set up correctly and indexed. You >> would be wise to understand and resolve the performance issues before >> moving the data to mysql as it is not likely to be faster. >> >> For example do all you shapefiles have *.qix file? >> How is your mapfile structured? Are you trying to draw too much detail >> at larger zoom values? >> >> When is it slow? Zoomed in or zoomed out or both. If we had some more >> information we might be able to help you resolve the performance issues. >> >> Understanding these issues might also help you when you get the data >> loaded into mygis. >> >> -Steve W. >> >> > I have data (in .shp, .dbf, and .shx files) that I have converted using >> > mygisimport. This produce an sql file which I imported into the MySql >> > db. >> > I am now having trouble accessing this data with the mapfile. Here is >> > what >> > I have: >> > >> > LAYER >> > NAME "SCAP_Cert2004_ParcelsUTM16M" >> > CONNECTIONTYPE mygis >> > CONNECTION "host:user:password:db:bin:" >> > #geo is the name of the column >> > DATA "geo from Parcels feature" >> > STATUS ON >> > TYPE POLYGON >> > CLASS >> > OUTLINECOLOR 255 0 0 >> > TEMPLATE "template.html" >> > END >> > MAXSCALE 40000 >> > TOLERANCE 0 >> > TOLERANCEUNITS PIXELS >> > END >> > >> > I get the following error: >> > >> > Warning: [MapServer Error]: SELECT feature.id, feature.vertices, >> > geometry.WKB_GEOMETRY from bad mysql query : bad mysql query in >> > > > and name> on line 217 >> > >> > Can anyone help with this? >> > >> > BTW, I tried to use shp2mysql.pl, but got several failures. >> > >> > Thanks, >> > >> > Don >> > >> >> > > > -- > Don Deskins > From woodbri at SWOODBRIDGE.COM Tue Apr 5 12:06:34 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Tue, 5 Apr 2005 15:06:34 -0400 Subject: MySQL and mapfile In-Reply-To: <008601c53a0f$4aefff10$1bf2fbd0@solo> Message-ID: Jeff, In short story is, do: find /path/to/data -name "*.shp" -exec shptree {} \; on Linux will add a spatial index file to each of your shapefiles which will greatly speed up mapserver. -Steve W. Jeff Portwine wrote: > You don't happen to have a link to that post about .qix files do you? I > have no idea what they are about, but I know that most of my shapefiles > don't have them. If I can create them and speed up my application I'd > love > to do so :) > > -Jeff > > ----- Original Message ----- > From: "Don Deskins" > To: > Sent: Tuesday, April 05, 2005 2:23 PM > Subject: Re: [UMN_MAPSERVER-USERS] MySQL and mapfile > > >> Steve, >> >> Thank you very much for your reply. I am sorry to say that I didn't >> know there was a ".qix" file. With my database background, I assumed >> that an indexed database field would be faster than a flat file. Of >> course, that is correct if the flat file is not index. I searched >> through the archives and found out what a .qix file was all about. I >> created one for each of my shapes and sped up download time by 50%. >> Now on to tiling the shp files :) >> >> >> Thanks again >> >> On Apr 5, 2005 12:11 PM, Stephen Woodbridge >> wrote: >> >>> Don Deskins wrote: >>> > Hello, >>> > >>> > Again, I am new to mapserver. I have finally gotten my map to display >>> > properly but it is very slow, so I am interested in getting all of the >>> > data >>> > into a database (MySQL). >>> >>> Shapefiles are very fast if they are set up correctly and indexed. You >>> would be wise to understand and resolve the performance issues before >>> moving the data to mysql as it is not likely to be faster. >>> >>> For example do all you shapefiles have *.qix file? >>> How is your mapfile structured? Are you trying to draw too much detail >>> at larger zoom values? >>> >>> When is it slow? Zoomed in or zoomed out or both. If we had some more >>> information we might be able to help you resolve the performance issues. >>> >>> Understanding these issues might also help you when you get the data >>> loaded into mygis. >>> >>> -Steve W. >>> >>> > I have data (in .shp, .dbf, and .shx files) that I have converted >>> using >>> > mygisimport. This produce an sql file which I imported into the MySql >>> > db. >>> > I am now having trouble accessing this data with the mapfile. Here is >>> > what >>> > I have: >>> > >>> > LAYER >>> > NAME "SCAP_Cert2004_ParcelsUTM16M" >>> > CONNECTIONTYPE mygis >>> > CONNECTION "host:user:password:db:bin:" >>> > #geo is the name of the column >>> > DATA "geo from Parcels feature" >>> > STATUS ON >>> > TYPE POLYGON >>> > CLASS >>> > OUTLINECOLOR 255 0 0 >>> > TEMPLATE "template.html" >>> > END >>> > MAXSCALE 40000 >>> > TOLERANCE 0 >>> > TOLERANCEUNITS PIXELS >>> > END >>> > >>> > I get the following error: >>> > >>> > Warning: [MapServer Error]: SELECT feature.id, feature.vertices, >>> > geometry.WKB_GEOMETRY from bad mysql query : bad mysql query in >>> > >> > and name> on line 217 >>> > >>> > Can anyone help with this? >>> > >>> > BTW, I tried to use shp2mysql.pl, but got several failures. >>> > >>> > Thanks, >>> > >>> > Don >>> > >>> >>> >> >> >> -- >> Don Deskins >> > From lluisgm at GMAIL.COM Tue Apr 5 12:08:54 2005 From: lluisgm at GMAIL.COM (=?ISO-8859-1?Q?Llu=EDs_Garcia_i_Mestres?=) Date: Tue, 5 Apr 2005 21:08:54 +0200 Subject: [UMN_MAPSERVER-USERS] jBox image problem In-Reply-To: Message-ID: Thanks Richard, Finally I can see the applet. My first error was to use the konqueror, so I changed to Firefox and then I linked the plugin of jre. Now it?s fine. Llu?s On Apr 2, 2005 4:01 PM, Richard Greenwood wrote: > > On Apr 1, 2005 9:33 PM, Llu?s Garcia i Mestres gmail.com> wrote: > > > Hi, > > > > > > My own mapserver maps were working ok, and I decide to implement the > > > jBox. I followed the instructions, but any image is displayed. I've > > > j2sdk installed. The image (png) is created in tmp directory but not > > > in the browser. > > > > > > > > codebase="/mapserver/dades/java/jBox" > > > archive="jBoxPNG.jar,png.jar"" > > > code="jBoxPNG.class" > > > width="500" > > > height="400" > > > name="jBox" > > > MAYSCRIPT> > > > > > > > > > > > > Even any box appears in the area where should be the image. Any > > > suggestion to figure out this? > > > > > > Llu?s > > > > > > > -- > > luca marletta icq: 70590647 > > > > 1. You have an extra quote mark at the end of the line: > archive="jBoxPNG.jar,png.jar"" > 2. You do not need to use jBoxPNG with the Sun Java VM, so try with just: > archive="jBox.jar" > code="jBox.class" > 3. Is jBox.jar in /mapserver/dades/java/jBox ? > 4. Is your browser reporting any errors? > > Rich > From dldeskins at GMAIL.COM Tue Apr 5 12:21:34 2005 From: dldeskins at GMAIL.COM (Don Deskins) Date: Tue, 5 Apr 2005 15:21:34 -0400 Subject: MySQL and mapfile In-Reply-To: <008601c53a0f$4aefff10$1bf2fbd0@solo> Message-ID: Jeff, The article that I saw is on the mailing list. All you have to do is to use the command line tool shptree in the form: shptree shapefile.shp It creates the .qix files. On Apr 5, 2005 2:43 PM, Jeff Portwine wrote: > You don't happen to have a link to that post about .qix files do you? I > have no idea what they are about, but I know that most of my shapefiles > don't have them. If I can create them and speed up my application I'd love > to do so :) > > -Jeff > > ----- Original Message ----- > From: "Don Deskins" > To: > Sent: Tuesday, April 05, 2005 2:23 PM > Subject: Re: [UMN_MAPSERVER-USERS] MySQL and mapfile > > > Steve, > > > > Thank you very much for your reply. I am sorry to say that I didn't > > know there was a ".qix" file. With my database background, I assumed > > that an indexed database field would be faster than a flat file. Of > > course, that is correct if the flat file is not index. I searched > > through the archives and found out what a .qix file was all about. I > > created one for each of my shapes and sped up download time by 50%. > > Now on to tiling the shp files :) > > > > > > Thanks again > > > > On Apr 5, 2005 12:11 PM, Stephen Woodbridge > > wrote: > >> Don Deskins wrote: > >> > Hello, > >> > > >> > Again, I am new to mapserver. I have finally gotten my map to display > >> > properly but it is very slow, so I am interested in getting all of the > >> > data > >> > into a database (MySQL). > >> > >> Shapefiles are very fast if they are set up correctly and indexed. You > >> would be wise to understand and resolve the performance issues before > >> moving the data to mysql as it is not likely to be faster. > >> > >> For example do all you shapefiles have *.qix file? > >> How is your mapfile structured? Are you trying to draw too much detail > >> at larger zoom values? > >> > >> When is it slow? Zoomed in or zoomed out or both. If we had some more > >> information we might be able to help you resolve the performance issues. > >> > >> Understanding these issues might also help you when you get the data > >> loaded into mygis. > >> > >> -Steve W. > >> > >> > I have data (in .shp, .dbf, and .shx files) that I have converted using > >> > mygisimport. This produce an sql file which I imported into the MySql > >> > db. > >> > I am now having trouble accessing this data with the mapfile. Here is > >> > what > >> > I have: > >> > > >> > LAYER > >> > NAME "SCAP_Cert2004_ParcelsUTM16M" > >> > CONNECTIONTYPE mygis > >> > CONNECTION "host:user:password:db:bin:" > >> > #geo is the name of the column > >> > DATA "geo from Parcels feature" > >> > STATUS ON > >> > TYPE POLYGON > >> > CLASS > >> > OUTLINECOLOR 255 0 0 > >> > TEMPLATE "template.html" > >> > END > >> > MAXSCALE 40000 > >> > TOLERANCE 0 > >> > TOLERANCEUNITS PIXELS > >> > END > >> > > >> > I get the following error: > >> > > >> > Warning: [MapServer Error]: SELECT feature.id, feature.vertices, > >> > geometry.WKB_GEOMETRY from bad mysql query : bad mysql query in > >> > >> > and name> on line 217 > >> > > >> > Can anyone help with this? > >> > > >> > BTW, I tried to use shp2mysql.pl, but got several failures. > >> > > >> > Thanks, > >> > > >> > Don > >> > > >> > >> > > > > > > -- > > Don Deskins > > > > -- Don Deskins From mleon at SCIENTIFICINFORMATICS.COM Tue Apr 5 12:41:10 2005 From: mleon at SCIENTIFICINFORMATICS.COM (Mauricio Leon) Date: Tue, 5 Apr 2005 14:41:10 -0500 Subject: Geocoding Message-ID: I need to implement a method for translations between a US street address and a latlong coordinate (and vice versa) are there any openly available tools/technologies for this purpose? Thanks Mauricio From bartvde at XS4ALL.NL Tue Apr 5 12:49:04 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Tue, 5 Apr 2005 21:49:04 +0200 Subject: Geocoding In-Reply-To: Message-ID: Hi, There have been so many threads about this in the past months. Search the archives for "geocoding". http://lists.umn.edu/cgi-bin/wa?S1=mapserver-users&X=- Best regards, Bart On Tue, 5 Apr 2005 14:41:10 -0500, Mauricio Leon wrote: > I need to implement a method for translations between a US street address > and a latlong coordinate (and vice versa) are there any openly available > tools/technologies for this purpose? > > Thanks > > Mauricio > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From jdport at VERITIME.COM Tue Apr 5 13:05:56 2005 From: jdport at VERITIME.COM (Jeff Portwine) Date: Tue, 5 Apr 2005 16:05:56 -0400 Subject: Geocoding Message-ID: The best solution I've been able to find so far is the perl library geo::coder::us , which you can find at CPAN (http://search.cpan.org). In order to use it, you will have to download the tiger data for the area you want to geocode and make a db file with the import script that comes with this library. -Jeff ----- Original Message ----- From: "Mauricio Leon" To: Sent: Tuesday, April 05, 2005 3:41 PM Subject: [UMN_MAPSERVER-USERS] Geocoding >I need to implement a method for translations between a US street address > and a latlong coordinate (and vice versa) are there any openly available > tools/technologies for this purpose? > > Thanks > > Mauricio > From cdaily at GMAIL.COM Tue Apr 5 14:57:26 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Tue, 5 Apr 2005 16:57:26 -0500 Subject: antialias() function Message-ID: I've written a nice php/mapscript antialiasing function and thought I'd post it if anybody is looking to add antialiasing. It uses the method of drawing the map at a larger size, then uses php mapscript to sample the image back down. It scales all of the symbols, etc up and down as necessary. It also renders any annotation layers and the scalebar seperately and then combines that over the antialiased map so the text isn't blurred. Therefore, you won't have to go through and manually scale all of your .map entries or worry about scaling your click points or anything. It's pretty self contained. The .map file needs to output the image as png initially, so that the background is transparent. PHP needs to be compiled --with-gd. It's called like this: $image_url = antialias(2); where the two denotes to draw the original map at twice the size, then scale it down. The scale can be increased for higher image quality, but it will of course take longer. -Camden /////////////////////////////////////////////////////////////// // // function antialias() // // draws our map at a larger size, then samples it back down to provide // antialiasing. annotation layers and the scalebar are drawn seperately // and combined over the resulting image, so that they are not distroted. // // using this function, all labels must be drawn as seperate annotation layers. // // the .map file should be configured to output as png for transparency. // /////////////////////////////////////////////////////////////// function antialias($scale) { global $map, $root_directory; // get the dimensions of the image $image_width = $map->width; $image_height = $map->height; // scale the map up $map->set("width", $image_width * $scale); $map->set("height", $image_height * $scale); // turn off the scalebar if there is one $scalebar_present = false; $scalebar = $map->scalebar; if ($scalebar->status == MS_ON) { $scalebar->set("status", MS_OFF); $scalebar_present = true; } // loop through our layers, and if it's status is on, loop through the classes scaling the sizes for ($i=0; $i < $map->numlayers; $i++) { $layer = $map->getLayer($i); if ($layer->status == MS_ON) { for ($j=0; $j < $layer->numclasses; $j++) { $class = $layer->getClass($j); for ($k=0; $k < $class->numstyles; $k++) { $style = $class->getStyle($k); // scale the size and offsets $style->set("size", $style->size * $scale); $style->set("offsetx", $style->offsetx * $scale); $style->set("offsety", $style->offsety * $scale); // for symbols with styles and points in them, we need to scale those as well $symbol_id = $style->symbol; $symbol = $map->getsymbolobjectbyid($symbol_id); // symbol style $points = $scaled_points = $symbol->getstylearray; for ($l=0; $lsetstyle($scaled_points); // symbol points $points = $scaled_points = $symbol->getpointsarray; for ($l=0; $lsetpoints($scaled_points); } } } } // loop through and turn off our annotation layers for now, keeping track of them $labels = array(); for ($i=0; $i < $map->numlayers; $i++) { $layer = $map->getLayer($i); if ($layer->type == MS_LAYER_ANNOTATION AND $layer->status == MS_ON) { array_push($labels, $layer); $layer->set("status", MS_OFF); } } // draw our image $image = $map->draw(); $image_url = $image->saveWebImage('MS_PNG', 1, 1, 0); // create our image objects $old = imagecreatefrompng($root_directory . $image_url); $new = imagecreatetruecolor($image_width, $image_height); // the background color gets dropped from our transparent pngs, so start by filling our new image with it $back_color = $map->imagecolor; $back_color = imagecolorallocate($new, $back_color->red, $back_color->green, $back_color->blue); imagefill($new, 0, 0, $back_color); // resample the image back down to the original size (antialiasing it) imagecopyresampled($new, $old, 0, 0, 0, 0, $image_width, $image_height, $image_width * $scale, $image_height * $scale); // scale the map down $map->set("width", $image_width); $map->set("height", $image_height); // flip off all layers on the map for ($i=0; $i < $map->numlayers; $i++) { $layer = $map->getLayer($i); $layer->set("status", MS_OFF); } // flip on those annotation layers we turned off earlier for ($i=0; $i < count($labels); $i++) { $labels[$i]->set("status", MS_ON); } // turn the scalebar back on if ($scalebar_present) { $scalebar->set("status", MS_EMBED); } // draw our image again, this time with just the annotations $label_image = $map->draw(); $label_url = $label_image->saveWebImage('MS_PNG', 1, 1, 0); // merge the text from our new image over the old one $old = imagecreatefrompng($root_directory . $label_url); imagecopyresampled($new, $old, 0, 0, 0, 0, $image_width, $image_height, $image_width, $image_height); // change our filename extention from .png to .jpg $image_url = substr($image_url, 0, -3) . "jpg"; // save our new image imagejpeg($new, $root_directory . $image_url); // free up memory imagedestroy($im); imagedestroy($new); // return the location of our new image return $image_url; } From woklist at CHARTER.NET Tue Apr 5 15:28:13 2005 From: woklist at CHARTER.NET (William K) Date: Tue, 5 Apr 2005 17:28:13 -0500 Subject: antialias() function In-Reply-To: Message-ID: Hm, that's an interesting idea - splitting text and linework. One other issue that I forgot about is that for labels outlines are fixed at 1 pixel. When that gets scaled back down, it mostly disappears. This looks like a good way to deal with that. And let the builtin text-drawing functions handle text antialiasing. Yet, I found that the scaled antialiasing method looked better even for text. I guess I'm used to high-end graphics antialiasing like is done in Illustrator and Photoshop. Freetype falls a little short of that, but is still pretty good. As for scaling a normal-size mapfile up, when I first started working on this method, that's what I started with (manually, not programmatically), but after fine-tuning a scaled mapfile, found that odd number in many cases gave better resampled output (ie a 1-pixel line might look better, in some cases, as 3-pixels scaled up at 2x instead of 2-pixels). Also, it doesn't look like it deals with scaling pattern fills or point symbols based on images. Or it may (just a quick skim of the code), but scale an image up, then back down antialiased and it'll look odd. But I'm sure this will work well for many. And you don't have to worry about scaling incoming image coordinates to the scaled mapfile. Or a manual scalebar overlay. With a little tuning, this function could be really nice. Eventually, with tuning my mapscript code as I have time, I'll probably have something similar (I don't know if I'll have a chance to test your function). On Apr 5, 2005, at 4:57 PM, Camden Daily wrote: > I've written a nice php/mapscript antialiasing function and thought > I'd post it if anybody is looking to add antialiasing. It uses the > method of drawing the map at a larger size, then uses php mapscript to > sample the image back down. It scales all of the symbols, etc up and > down as necessary. It also renders any annotation layers and the > scalebar seperately and then combines that over the antialiased map so > the text isn't blurred. Therefore, you won't have to go through and > manually scale all of your .map entries or worry about scaling your > click points or anything. It's pretty self contained. > ----- William Kyngesburye http://webpages.charter.net/kyngchaos/ "Time is an illusion - lunchtime doubly so." - Ford Prefect -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2378 bytes Desc: not available URL: From whiting at MAXNET.CO.NZ Tue Apr 5 18:15:47 2005 From: whiting at MAXNET.CO.NZ (Matthew Whiting) Date: Wed, 6 Apr 2005 13:15:47 +1200 Subject: PHP MapScript zoompoint Message-ID: Hello all, Have been trying without success to successfully implement a zoom out feature in my application using the zoompoint() function and -2 as the zoom factor. For some reason, the image does not end up centred on the point clicked on but on a different spot altogether. I'm getting nowhere with this. I tried manually changing the extent and this works fine. Any suggestions? Thanks Matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3182 bytes Desc: S/MIME Cryptographic Signature URL: From richard.greenwood at GMAIL.COM Tue Apr 5 19:37:03 2005 From: richard.greenwood at GMAIL.COM (Richard Greenwood) Date: Wed, 6 Apr 2005 02:37:03 +0000 Subject: =?utf-8?b?W1VNTl9NQVBTRVJWRVItVVNFUlNd?= =?utf-8?b?W1VNTl9NQVBTRVJWRVItVVNFUlNd?= jBox image problem Message-ID: Llu?s Garcia i Mestres GMAIL.COM> writes: > > Thanks Richard, > > Finally I can see the applet. My first error was to use the konqueror, > so I changed to Firefox and then I linked the plugin of jre. Now it?s > fine. > > Llu?s So is it still not working with Konqueror? Last time I checked it was fine with Konqueror. If you could check again and let me know I would appreciate it. And what OS are you running Konqueror on? Rich From richard.greenwood at GMAIL.COM Tue Apr 5 19:42:58 2005 From: richard.greenwood at GMAIL.COM (Richard Greenwood) Date: Wed, 6 Apr 2005 02:42:58 +0000 Subject: =?utf-8?b?W1VNTl9NQVBTRVJWRVItVVNFUlNd?= Can't access jbox applet through javascript Message-ID: Alberto G?mez CCCMM.CESGA.ES> writes: > > When i try to call dragon() or boxon() methods from javascript [ document.jbox.boxon(); ] i get an error, > object is null. I follow all steps in howto. I can navigate basically when i define "box" and "drag" vars at > the first time, but if i set "box=true" then it never changes. I'm using iis 5.1 in xp and CGI Mapserv 4.4. > > I've read a lot and i haven't found a solution. Can anyone helpme please? Can you provide a URL where we can see the error? If not, then you need to provide some more details, and enough of your code so that we see what you are doing. rich From chatterjee_sharmistha2 at REDIFFMAIL.COM Tue Apr 5 22:31:08 2005 From: chatterjee_sharmistha2 at REDIFFMAIL.COM (Sharmistha) Date: Wed, 6 Apr 2005 05:31:08 -0000 Subject: No subject Message-ID: ?Respected Sir/Madam, can someone plz send me the deatails that how can i perform a query option in map by php-mapscript like how can i show the attributes of a area selected by user its very urgent thanks and regards sharmistha -------------- next part -------------- An HTML attachment was scrubbed... URL: From whiting at MAXNET.CO.NZ Wed Apr 6 00:01:56 2005 From: whiting at MAXNET.CO.NZ (Matthew Whiting) Date: Wed, 6 Apr 2005 19:01:56 +1200 Subject: PHP MapScript zoompoint In-Reply-To: <42533843.8020804@maxnet.co.nz> Message-ID: After hours working on this, I finally found the problem. Setting x and y for the PointObj like this: $point->x = $x; $point->y = $y; does not work. This does: $point->setxy($x,$y); Why is this a problem? Interestingly after setting the points explicitly (as opposed to setxy()) and then printing the contents, it seems the values are actually set! Matthew > Hello all, > > Have been trying without success to successfully implement a zoom out > feature in my application using the zoompoint() function and -2 as the > zoom factor. For some reason, the image does not end up centred on the > point clicked on but on a different spot altogether. I'm getting > nowhere with this. I tried manually changing the extent and this works > fine. Any suggestions? > > Thanks > Matthew > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3182 bytes Desc: S/MIME Cryptographic Signature URL: From stephane.riff at CERENE.FR Wed Apr 6 00:00:36 2005 From: stephane.riff at CERENE.FR (=?ISO-8859-1?Q?St=E9phane_RIFF?=) Date: Wed, 6 Apr 2005 09:00:36 +0200 Subject: setLayersDrawingOrder problem In-Reply-To: <8292E3D1E5E2EF4A94C36FE80D2443A83A8266@linnms,> Message-ID: Ryan, Adam wrote: >>-----Original Message----- >>From: St?phane RIFF [mailto:stephane.riff at CERENE.FR] >>Sent: Tuesday, April 05, 2005 8:56 AM >>To: MAPSERVER-USERS at LISTS.UMN.EDU >>Subject: [UMN_MAPSERVER-USERS] setLayersDrawingOrder problem >> >> >>Hi >> >>I have a mapfile with one layer inside. >>In my application i add some dynamic layer by mapscript. >>I want that the static layer alwayes drawn last so i used >>setLayersDrawingOrder but i can't get it works. >> >>I did $map->save() (just after setLayersDrawingOrder and >>map->draw) and look at it : >> >>My dynamic layer is the last in the mapfile . >> >>Does someone success with that >>Thanks >> >> >> > >St?phane, > >Try using ... $map -> moveLayerUp($layerIndexNumber) ... instead of >setLayersDrawingOrder. > >Adam > > > > This doesn't seem to work too... Is there something special to do before manipulating layer drawing order ??? From kristjan at TARKVARASTUUDIO.EE Wed Apr 6 00:06:00 2005 From: kristjan at TARKVARASTUUDIO.EE (Kristjan Annus) Date: Wed, 6 Apr 2005 10:06:00 +0300 Subject: transparency flash movie OUTPUT_MOVIE=SINGLE/MULTIPLE In-Reply-To: <4252A570.1000801@duif.net> Message-ID: I wanted to do just the same thing as you, to have some base map and some layers in vector flash format with some tooltips and onmouseower coloring etc. For point data it is easy to use xml instead of SWF, but if you want to show some polygons, or lines, then it is more complicated. And there's one more problem to this solution. The Mapserver produces progressive JPG output, and Flash does not support progressive JPG input (at least it was what I figured out). So we have some nice problems on every step :-) Kristjan > Hi, > > sorry, I thought you had troubles with the image size (instead of the > file size). I think a swf file is always bigger, because it contains > more information? (haven't tried it with layers in my app...) > > But that is exactly the reason I opt for a mixed application: for > background/reference map's I want to use images, but for points of > interest (POI's) I want to use a (small) swf files. > > Other options are to retrieve xml instead of swf, and use the > information from this xml to put POI's on your movie runtime. Why > would you use swf maps anyway if you do not want to do something with > (parts) of the data? > > Richard > > Kristjan Annus wrote: > >> Hi, >> >> the link you sent me is usable only from your own computer, so I cant >> see it. >> I'll send you a link from my Flash test application (player 7 required). >> >> http://www.tartu.ee/bi_kaart/tarkvarastuudio.html >> >> The opening page swf map file is about 100k in size. The same picture in >> jpg format in the same application is ~33k. >> I use it in another flash movie, but every time when the client is >> zooming a map he has to download about 100-300k >> new map image. >> >> Kristjan >> >>> >>> Kristjan, >>> >>> Thanks I think you're right, I can try to make the bitmap (which is >>> actually a call to another OGC mapserver) part of the mapserver >>> mapfile. The mapserver then becomes a cascading mapserver? >>> >>> Don't know how you call the mapserver, but my swf's are exactly the >>> same size as the images I request. I use calls like: >>> "http://localhost/cgi-bin/mapserv.exe?map=fnl.map&mode=map&mapext=-20000%20300000%20300000%20620000&mapsize=300%20300" >>> >>> >>> which returns a flashmovie of 300x300 to me IF you open the movie in >>> the flashplayer. Opening it in a browser shows it indeed 5 times the >>> normal size, but using it in another flashmovie is ok. >>> >>> Richard >>> >>> Kristjan Annus wrote: >>> >>>> I don't know about seting transparent backgrounds if swf output, >>>> but one >>>> solution for you is to put your bitmap background image also to >>>> your map >>>> file, and create one single swf output for all of your data. >>>> >>>> But I have encountered one problem with mapserver FLASH output too, >>>> thats the size of the swf file, when you use OUTPUT_MOVIE=SINGLE >>>> option. >>>> In my case it was about 2-5x of the file size of the same output in >>>> jpg >>>> format. >>>> Does anybody know is there some way to decrease the swf output file >>>> size? >>>> >>>> Kristjan >>>> >>>>> Hi List members, >>>>> >>>>> using the mapserver (two layers) swf/flash output I tried both format >>>>> options: >>>>> FORMATOPTION "OUTPUT_MOVIE=MULTIPLE" >>>>> FORMATOPTION "OUTPUT_MOVIE=SINGLE" >>>>> >>>>> Using the first one returns an 'index'-swf from which I can get >>>>> the two >>>>> layer swf's. This results in 'transparent' movies, that is I can >>>>> show a >>>>> bitmap behind the movie in the flashplayer. >>>>> >>>>> When using output SINGLE, I receive the right features, but on an >>>>> non-transparant (white) background (without changing any other >>>>> option in >>>>> the mapfile)? >>>>> >>>>> Question: >>>>> - does anyone know IF it is possible to make the SINGLE output movies >>>>> transparent? >>>>> - If yes, please tell me how? >>>>> - Is there another way, then delving in the mapserver cpp code, to >>>>> influence the code within the mapserver-returned-swf-files (for >>>>> example >>>>> to influence _root or using _parent references)? >>>>> - Is there other flash-output specific documentation other then: the >>>>> fmv >>>>> flashexample: http://mapserver.gis.umn.edu/user_utilities/fmv.zip? >>>>> >>>>> Thanks in advance, >>>>> >>>>> Richard >>>> >>>> >>>> >>>> >>>> >>>> >> >> From richard at DUIF.NET Wed Apr 6 00:16:23 2005 From: richard at DUIF.NET (Richard Duivenvoorde) Date: Wed, 6 Apr 2005 09:16:23 +0200 Subject: transparency flash movie OUTPUT_MOVIE=SINGLE/MULTIPLE In-Reply-To: <42538A58.1020903@tarkvarastuudio.ee> Message-ID: Hi Kristjan, Consider the problem of progressive JPG's solved :-) from my mapfile: OUTPUTFORMAT NAME jpeg MIMETYPE "image/jpeg" DRIVER "GD/JPEG" IMAGEMODE RGB FORMATOPTION "QUALITY=80" FORMATOPTION "INTERLACE=OFF" END (actually the line FORMATOPTION "INTERLACE=OFF") makes mapserver producing non-progressive aka non interlaced output which can be used in flash. I'm already combining swf and jpeg's from a mapserver in a flash client, but have some transpency problems when I use the SINGLE option, and positioning problems (the swf always is going to the 0,0 of _root...) when using the MULTIPLE option. If someone has an example/idea for those problems... Richard Kristjan Annus wrote: > I wanted to do just the same thing as you, to have some base map and > some layers in vector flash format with some > tooltips and onmouseower coloring etc. For point data it is easy to use > xml instead of SWF, but if you want to show some polygons, or lines, > then it is more complicated. > And there's one more problem to this solution. The Mapserver produces > progressive JPG output, and Flash does not support > progressive JPG input (at least it was what I figured out). So we have > some nice problems on every step :-) > > Kristjan > >> Hi, >> >> sorry, I thought you had troubles with the image size (instead of the >> file size). I think a swf file is always bigger, because it contains >> more information? (haven't tried it with layers in my app...) >> >> But that is exactly the reason I opt for a mixed application: for >> background/reference map's I want to use images, but for points of >> interest (POI's) I want to use a (small) swf files. >> >> Other options are to retrieve xml instead of swf, and use the >> information from this xml to put POI's on your movie runtime. Why >> would you use swf maps anyway if you do not want to do something with >> (parts) of the data? >> >> Richard >> >> Kristjan Annus wrote: >> >>> Hi, >>> >>> the link you sent me is usable only from your own computer, so I cant >>> see it. >>> I'll send you a link from my Flash test application (player 7 required). >>> >>> http://www.tartu.ee/bi_kaart/tarkvarastuudio.html >>> >>> The opening page swf map file is about 100k in size. The same picture in >>> jpg format in the same application is ~33k. >>> I use it in another flash movie, but every time when the client is >>> zooming a map he has to download about 100-300k >>> new map image. >>> >>> Kristjan >>> >>>> >>>> Kristjan, >>>> >>>> Thanks I think you're right, I can try to make the bitmap (which is >>>> actually a call to another OGC mapserver) part of the mapserver >>>> mapfile. The mapserver then becomes a cascading mapserver? >>>> >>>> Don't know how you call the mapserver, but my swf's are exactly the >>>> same size as the images I request. I use calls like: >>>> "http://localhost/cgi-bin/mapserv.exe?map=fnl.map&mode=map&mapext=-20000%20300000%20300000%20620000&mapsize=300%20300" >>>> >>>> >>>> >>>> which returns a flashmovie of 300x300 to me IF you open the movie in >>>> the flashplayer. Opening it in a browser shows it indeed 5 times the >>>> normal size, but using it in another flashmovie is ok. >>>> >>>> Richard >>>> >>>> Kristjan Annus wrote: >>>> >>>>> I don't know about seting transparent backgrounds if swf output, >>>>> but one >>>>> solution for you is to put your bitmap background image also to >>>>> your map >>>>> file, and create one single swf output for all of your data. >>>>> >>>>> But I have encountered one problem with mapserver FLASH output too, >>>>> thats the size of the swf file, when you use OUTPUT_MOVIE=SINGLE >>>>> option. >>>>> In my case it was about 2-5x of the file size of the same output in >>>>> jpg >>>>> format. >>>>> Does anybody know is there some way to decrease the swf output file >>>>> size? >>>>> >>>>> Kristjan >>>>> >>>>>> Hi List members, >>>>>> >>>>>> using the mapserver (two layers) swf/flash output I tried both format >>>>>> options: >>>>>> FORMATOPTION "OUTPUT_MOVIE=MULTIPLE" >>>>>> FORMATOPTION "OUTPUT_MOVIE=SINGLE" >>>>>> >>>>>> Using the first one returns an 'index'-swf from which I can get >>>>>> the two >>>>>> layer swf's. This results in 'transparent' movies, that is I can >>>>>> show a >>>>>> bitmap behind the movie in the flashplayer. >>>>>> >>>>>> When using output SINGLE, I receive the right features, but on an >>>>>> non-transparant (white) background (without changing any other >>>>>> option in >>>>>> the mapfile)? >>>>>> >>>>>> Question: >>>>>> - does anyone know IF it is possible to make the SINGLE output movies >>>>>> transparent? >>>>>> - If yes, please tell me how? >>>>>> - Is there another way, then delving in the mapserver cpp code, to >>>>>> influence the code within the mapserver-returned-swf-files (for >>>>>> example >>>>>> to influence _root or using _parent references)? >>>>>> - Is there other flash-output specific documentation other then: the >>>>>> fmv >>>>>> flashexample: http://mapserver.gis.umn.edu/user_utilities/fmv.zip? >>>>>> >>>>>> Thanks in advance, >>>>>> >>>>>> Richard >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>> >>> > > From stephane.riff at CERENE.FR Wed Apr 6 00:51:31 2005 From: stephane.riff at CERENE.FR (=?ISO-8859-1?Q?St=E9phane_RIFF?=) Date: Wed, 6 Apr 2005 09:51:31 +0200 Subject: setLayersDrawingOrder problem In-Reply-To: <42538914.10602@cerene.fr> Message-ID: Wiith $map->moveLayerUp($index) it right change the layer position in mapfile and drawing order array but when i render the map it still the wrong result. here is the drawing order array : Array ( [0] => 0 [1] => 1 [2] => 3 [3] => 2 ) the layer i want to draw last is index 2 but even with this order the layer 0,1,3 are drawn over the 2. layer 2 is type point with image symbols and the others are annotation layers with truetype text The result i want is : the image symbols must be drawn over annotation text. Do i miss something ? St?phane RIFF wrote: > Ryan, Adam wrote: > >>> -----Original Message----- >>> From: St?phane RIFF [mailto:stephane.riff at CERENE.FR] >>> Sent: Tuesday, April 05, 2005 8:56 AM >>> To: MAPSERVER-USERS at LISTS.UMN.EDU >>> Subject: [UMN_MAPSERVER-USERS] setLayersDrawingOrder problem >>> >>> >>> Hi >>> >>> I have a mapfile with one layer inside. >>> In my application i add some dynamic layer by mapscript. >>> I want that the static layer alwayes drawn last so i used >>> setLayersDrawingOrder but i can't get it works. >>> >>> I did $map->save() (just after setLayersDrawingOrder and >>> map->draw) and look at it : >>> >>> My dynamic layer is the last in the mapfile . >>> >>> Does someone success with that >>> Thanks >>> >>> >>> >> >> St?phane, >> >> Try using ... $map -> moveLayerUp($layerIndexNumber) ... instead of >> setLayersDrawingOrder. >> >> Adam >> >> >> >> > This doesn't seem to work too... > Is there something special to do before manipulating layer drawing > order ??? > > From sbeorchia at GI-LEMANS.COM Wed Apr 6 00:44:48 2005 From: sbeorchia at GI-LEMANS.COM (Sylvain Beorchia) Date: Wed, 6 Apr 2005 09:44:48 +0200 Subject: No subject Message-ID: Hi Sharmistha, Did u already have an application which display a map with mapserver ? Do u just want to query on that map, or u don't have anything yet ? What do u want to display ? (shp, mapfinfo...) are u connected to a database (mysql, oracle) ? Sylvain. ----- Original Message ----- From: Sharmistha To: MAPSERVER-USERS at LISTS.UMN.EDU Sent: Wednesday, April 06, 2005 7:31 AM Subject: [UMN_MAPSERVER-USERS] Respected Sir/Madam, can someone plz send me the deatails that how can i perform a query option in map by php-mapscript like how can i show the attributes of a area selected by user its very urgent thanks and regards sharmistha -------------- next part -------------- An HTML attachment was scrubbed... URL: From schiplunkar at GMAIL.COM Wed Apr 6 00:57:42 2005 From: schiplunkar at GMAIL.COM (Shailesh Chiplunkar) Date: Wed, 6 Apr 2005 13:27:42 +0530 Subject: Hi Message-ID: Hi, I'm new to this mailing list and also to the concept of Mapserver. It'd be great if any of u cld tell me where exactly to read form and how to start using the mapserver too? Thanx Shailesh From ferencik.ioan at PERSONAL.RO Wed Apr 6 02:38:20 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Wed, 6 Apr 2005 12:38:20 +0300 Subject: tutorial problem Message-ID: I am running MS4W, it is working fine, I downloaded Mapserver tutorial and passed through it till example1-9. I have the folowing problem: when I type: http://localhost/cgi-bin/mapserv.exe? map=c:\ms4w\tutorial\example1-9.map&mode=browse I see only 1 map though I should see pursunat to template file 2 maps: one png image is generate in map mode and the other in browse mode. Instead of second map I see a blank square and inside it is wtritten: Submit query. Can you guys help me? Here is the map file: MAP NAME EX1.9_ IMAGETYPE PNG24 EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514 # LAEA #EXTENT -97.5 41.619778 -82.122902 49.38562 # Geographic SIZE 400 300 SHAPEPATH "data" SYMBOLSET "symbols/symbols35.sym" FONTSET "fonts/fonts.list" WEB TEMPLATE 'example1-9.html' IMAGEPATH 'tmp' IMAGEURL 'tmp' END PROJECTION # "proj=laea" # "ellps=clrk66" # "lat_0=45" # "lon_0=-100" # # Alternatively, you can specify an EPSG code. "init=epsg:2163" # END # Start of LAYER DEFINITIONS --------------------------------------------- LAYER # States polygon layer begins here NAME states DATA states_ugl STATUS OFF TYPE POLYGON PROJECTION "init=epsg:4326" END CLASSITEM "CLASS" CLASS EXPRESSION 'land' SYMBOL 0 COLOR 232 232 232 END END # States polygon layer ends here LAYER # MODIS raster layer begins here NAME modis DATA "raster/mod09a12003161_ugl_ll_8bit.tif" STATUS DEFAULT TYPE RASTER PROCESSING "BANDS=1,2,3" OFFSITE 71 74 65 PROJECTION "init=epsg:4326" END END # MODIS raster layer ends here LAYER # LandSat WMS map from JPL (or from USGS) NAME LandSat TYPE RASTER OFFSITE 0 0 0 STATUS OFF CONNECTIONTYPE WMS CONNECTION "http://wms.jpl.nasa.gov/wms.cgi? REQUEST=map&LAYERS=us_landsat7&STYLES=&FORMAT=png&TRANSPARENT=true" #CONNECTION "http://gisdata.usgs.net/servlet/com.esri.wms.Esrimap? ServiceName=USGS_WMS_LANDSAT7&VERSION=1.0.0&REQUEST=map&Layers=LANDSAT7&SRS=EPSG :4326&REASPECT=false&Format=png&" METADATA "wms_title" "LandSat" "wms_name" "us_landsat7" "wms_server_version" "1.0.0" "wms_srs" "epsg:4326" "wms_format" "image/png" #"wms_title" "US_Landsat7" # "wms_srs" "epsg:4326" # "wms_connectiontimeout" "1000" END PROJECTION "init=epsg:4326" END END # LandSat WMS image ends here LAYER # States line layer begins here NAME states DATA states_ugl STATUS DEFAULT TYPE LINE PROJECTION "init=epsg:4326" END CLASSITEM "CLASS" CLASS EXPRESSION 'land' SYMBOL 'line5' COLOR 64 64 64 SIZE 1 END END # States line layer ends here LAYER # States label layer begins here NAME states DATA states_ugl STATUS DEFAULT TYPE ANNOTATION PROJECTION "init=epsg:4326" END CLASSITEM "CLASS" LABELITEM "STATE" CLASS EXPRESSION 'land' COLOR -1 -1 -1 LABEL COLOR 255 255 255 TYPE TRUETYPE FONT arial-bold SIZE 12 ANTIALIAS FALSE POSITION CL PARTIALS FALSE MINDISTANCE 300 BUFFER 4 END # end of label END # end of class END # States label layer ends here # End of LAYER DEFINITIONS ------------------------------- END # end of map file Here is the template file: MapServer 4.0 Tutorial

MapServer Tutorial:
Example 1.9

The map above was created in "map" mode. It is a static map.

This dynamic map is being generated in "browse" mode. Click on any point in the map and see what happens.

Both of these maps use the same mapfile definitions. The difference is that the second map (the dynamically created one) relies on HTML form for interactivity. If you look at how this page is linked from the previous page, you'll see that it isn't the same as the previous examples. This page is what's called, in MapServer terms, an HTML template. You will learn more about HTML templates in section 2.


have a look at the "form" block within this page (right click on your browser and select "view source" or something similar):

  <!-- START OF MAPSERVER FORM -->
  <form name="mapserv" method="GET" action="/cgi-
bin/mapserv40">
     <!-- HIDDEN MAPSERVER CGI VARIABLES -->
     <input type="hidden" name="map"
value="[map]">
     <input type="hidden" name="imgext"
value="[mapext]">
     <input type="hidden" name="imgxy" value="199.5
149.5">
     <input type="hidden" name="zoom"
value="1">
     <input type="hidden" name="mode"
value="browse">

     <div align="center">
          <table border="1" cellpadding="0"
cellspacing="0">
             <tr><td>
           <!-- THE INTERACTIVE, DYNAMICALLY CREATED MAP --
           <input type="image" name="img"
src="[ img ]" width="400"
height="300">
        </td></tr>
     </table>
     </div>
  </form>

This block executes the MapServer CGI program ("/cgi- bin/mapserv40") each time a user clicks on the map. The map is actually another form "input", represented here by the line:

<input type="image" name="img"
src="[img]" width="400"
height="300">
The items in square brackets ([map], [mapext], and [img]) are what's known as MapServer tags--these are MapServer CGI variables and they get replaced by the MapServer CGI program when it reloads. The tag [map] is a placeholder for the mapfile path so it's replaced with "[map]" when MapServer runs. The tag [mapext] is replaced with the current map extent, "[mapext]", and the [img] tag is replaced with the path to the image the MapServer CGI program creates, "[img]".

The hidden variable "mode" with the value "browse" tells the CGI program that it needs to create and dump an image in the "tmp" directory. This image is then referenced as [img] and this is what you see on your browser.


Now, have a look at the mapfile:

MAP
NAME           EX1.9_
IMAGETYPE      PNG24
EXTENT        201621.496941 -294488.285333 1425518.020722 498254.511514 # LAEA
#EXTENT         -97.5 41.619778 -82.122902 49.38562 # Geographic
SIZE           400 300
SHAPEPATH      "data"
SYMBOLSET      "symbols/symbols35.sym"
FONTSET        "fonts/fonts.list"

WEB
  TEMPLATE  'example1-9.html'
  IMAGEPATH '/tmp/'
  IMAGEURL  '/tmp/'
END

PROJECTION
#  "proj=laea"
#  "ellps=clrk66"
#  "lat_0=45"
#  "lon_0=-100"
#
# Alternatively, you can specify an EPSG code.
 "init=epsg:2163"
#
END

# Start of LAYER DEFINITIONS ---------------------------------------------
LAYER # States polygon layer begins here
  NAME         states
  DATA         states_ugl
  STATUS       OFF
  TYPE         POLYGON

  PROJECTION
    "init=epsg:4326"
  END

  CLASSITEM    "CLASS"
  CLASS
    EXPRESSION 'land'
    SYMBOL     0
    COLOR      232 232 232
  END
END # States polygon layer ends here

LAYER # MODIS raster layer begins here
  NAME         modis
  DATA         "raster/mod09a12003161_ugl_ll_8bit.tif"
  STATUS       DEFAULT
  TYPE         RASTER
  PROCESSING   "BANDS=1,2,3"
  OFFSITE      71 74 65

  PROJECTION
    "init=epsg:4326"
  END
END # MODIS raster layer ends here

LAYER # LandSat WMS map from JPL (or from USGS)
  NAME         LandSat
  TYPE         RASTER
  OFFSITE      0 0 0
  STATUS       OFF
  CONNECTIONTYPE     WMS
  CONNECTION         "http://wms.jpl.nasa.gov/wms.cgi?
REQUEST=map&LAYERS=us_landsat7&STYLES=
  &FORMAT=png&TRANSPARENT=true"
  #CONNECTION "http://gisdata.usgs.net/servlet/com.esri.wms.Esrimap?
ServiceName=USGS_WMS_LANDSAT7

&VERSION=1.0.0&REQUEST=map&Layers=LANDSAT7&SRS=EPSG:4326&REASPECT=false&Format=p
ng&"

  METADATA
    "wms_title" "LandSat"
    "wms_name" "us_landsat7"
    "wms_server_version" "1.0.0"
    "wms_srs" "epsg:4326"
    "wms_format" "image/png"
    #"wms_title" "US_Landsat7"
    # "wms_srs" "epsg:4326"
    # "wms_connectiontimeout" "1000"
  END

  PROJECTION
    "init=epsg:4326"
  END
END # LandSat WMS image ends here

LAYER # States line layer begins here
  NAME         states
  DATA         states_ugl
  STATUS       DEFAULT
  TYPE         LINE

  PROJECTION
    "init=epsg:4326"
  END

  CLASSITEM    "CLASS"
  CLASS
    EXPRESSION 'land'
    SYMBOL     'line5'
    COLOR      64 64 64
    SIZE       1
  END
END # States line layer ends here

LAYER # States label layer begins here
  NAME         states
  DATA         states_ugl
  STATUS       DEFAULT
  TYPE         ANNOTATION

  PROJECTION
    "init=epsg:4326"
  END

  CLASSITEM    "CLASS"
  LABELITEM    "STATE"
  CLASS
    EXPRESSION 'land'
    COLOR      -1 -1 -1
    LABEL
      COLOR    255 255 255
      TYPE     TRUETYPE
      FONT     arial-bold
      SIZE     12
      ANTIALIAS    FALSE
      POSITION     CL
      PARTIALS     FALSE
      MINDISTANCE  300
      BUFFER       4
    END # end of label
  END # end of class
END # States label layer ends here
# End of LAYER DEFINITIONS -------------------------------

END # end of map file

There's really only one thing that's been added to the mapfile:

TEMPLATE 'example1-9.html'
This tells MapServer to use the page "example1-9.html" as a template file. MapServer will process this file and replace the tags it encounters before sending it to the web browser. This is how the next two sections in this tutorial works.


This marks the end of Section 1. I hope you leave this section with enough knowledge on how things are set in a MapServer MapFile. I can't stress enough the importance of keeping the MapServer MapFile Reference open as you create your own mapfile and application. Without it, I wouldn't have gone very far with this tutorial.. For a hierarchical view of the mapfile objects and keywords, please have a look at the reference page from Earth Data Analysis Center (EDAC) at the University of New Mexico.


Back to Example 1.8 | Back to Section 1 | Back to the Sections Page | Proceed to Section 2

I have modified the httpd.conf in this way: Alias /tutorial/ "/ms4w/tutorial/" Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all I believe that i am missing something with WEB object(IMAGEURL) Can you give me from what I have written a hint about what should I write at IMAGEPATH and IMAGEURL? Thanks _____________________________________________ Castiga peste 1000 de premii cu Wella Design! http://wella.boom.ro From expander at MAIL.COM Wed Apr 6 04:18:07 2005 From: expander at MAIL.COM (Diego Tiozzo) Date: Wed, 6 Apr 2005 12:18:07 +0100 Subject: Customizing Mapserver and MapLab Message-ID: -- Dear Sirs, I want to congratulate for good work DM Solutions Group made with MS4W - MapServer for Windows, version 1.0.3; I came from early version of MapLab and I confess, some year ago, to have renounced to use this product because too complex to configure and to make working: on one hand MapLab (early version) had some little critical bug, on the other my Apache, PHP and MapServer configuring ability was, perhaps, a little poor. Anyway, now I really appreciate efforts made for a preconfigured product with all needed components working inside... As already said, I use MS4W for Windows, version 1.0.3, and it works with no problems if one doesn't need a too much custom tool; problems start when you decide to make this product a little more sharpen. For example, a) I need to work with a custom legend different from which generated by traditional behaviour. For every map layer, or only for specific ones, I need to use "static" small gif images rather than ones automatically generated by MapServer so to produce a final Map page with a specific graphic layers legend rather than one based on "generic" Esri/ArcView symbols set. Furthermore I need to show or to hide different layers by group with a legend that gives me capacity to select or deselect both entire group or, inside it, every single layer. In "MapServer HTML Legend HOWTO" document I was not able to find a valid help: this document describes many things but it doesn't pratically say which files to modify but assumes only a certain ability to set MapServer templates. This opens next question, that is b) how does really templates work? Problem is every time I try to modify layout of final map including custom components (like buttons, links), or to change manually original layout or to translate contents in another languate than english, GMapFactory restores original template. Searching in published documentation I have found exhaustive references on how to set a template mapfile (.map), but not where MapLab stores GMapFactory settings; I think this is a crucial question because from GMapFactory depends layout definition of final map application and it makes possible to specify which mapping interface components to include or exclude... Certainly a great work has been done both in terms of programming both in making of detailed documentation but what I think is still weak is absence of a comprehensive description of entire working process of Mapserver and relative MapLab applications. Regards, DIEGO TIOZZO NETTI -- -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm From cpurvis at ASG.SC.EDU Wed Apr 6 05:17:40 2005 From: cpurvis at ASG.SC.EDU (Charlton Purvis) Date: Wed, 6 Apr 2005 07:17:40 -0500 Subject: Google maps w/ satellite imagery Message-ID: For those of you who haven't seen it, you're missing out. http://maps.google.com has satellite imagery that performs spectacularly. Enter an address; the satellite option is a link in the upper RH corner of that page. Even the dingbat public is tuned in to the site, http://www.cnn.com/2005/TECH/internet/04/05/google.maps.ap/index.html. Charlton From pauljame at GMAIL.COM Wed Apr 6 05:59:51 2005 From: pauljame at GMAIL.COM (Paul james) Date: Wed, 6 Apr 2005 09:59:51 -0300 Subject: Label layer... Message-ID: Hi, I have a point layer with a label... I?d like to know how can I turn on/turn off only the label ... May I do other layer ? Sample?? I?m using php/mapscript Thank you LAYER NAME state TYPE POINT STATUS ON CONNECTIONTYPE POSTGIS CONNECTION "user=x password=x dbname=x host= x" DATA "the_geom from states" LABELITEM "name" LABELCACHE ON CLASS NAME "state_" OUTLINECOLOR 255 0 0 COLOR 10 90 10 SYMBOL 'circle' SIZE 5 LABEL FONT fritqat SIZE 6 TYPE TRUETYPE COLOR 255 0 0 FORCE TRUE OUTLINECOLOR 255 200 200 PARTIALS TRUE POSITION AUTO END END From Tim.Pascoe at EC.GC.CA Wed Apr 6 06:01:01 2005 From: Tim.Pascoe at EC.GC.CA (Pascoe,Tim [Burlington]) Date: Wed, 6 Apr 2005 09:01:01 -0400 Subject: Google maps w/ satellite imagery Message-ID: Take a look at: http://adaptivepath.com/publications/essays/archives/000385.php I believe this is the technology behind the Google Maps interface. Tim -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu] On Behalf Of Charlton Purvis Sent: April 6, 2005 8:18 AM To: MAPSERVER-USERS at lists.umn.edu Subject: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery For those of you who haven't seen it, you're missing out. http://maps.google.com has satellite imagery that performs spectacularly. Enter an address; the satellite option is a link in the upper RH corner of that page. Even the dingbat public is tuned in to the site, http://www.cnn.com/2005/TECH/internet/04/05/google.maps.ap/index.html. Charlton From Tom.Kralidis at EC.GC.CA Wed Apr 6 06:12:33 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Wed, 6 Apr 2005 09:12:33 -0400 Subject: Unexpected WFS GetFeature results Message-ID: Hi, (MapServer CVS, FC2, latest stable supporting libs). I have a WFS instance running against a PostGIS table, and when I invoke a Filter'd GetFeature operation (bbox AND a nested OR), I expect one result to be returned (only one record in the DB satisfies this request). I've attached a sample HTML form page to correctly invoke the request. However, I receive all records back in the DB. Any idea what's going on here? FYI, here's my DATA string in the LAYER object: DATA "the_geom from (select service_endpoints.organization as organization,service_endpoints.endpoint_getresource as endpoint_getresource,service_endpoints.service_type as service_type,service_endpoints.service_version as service_version,service_resources.the_geom as the_geom,service_resources.resource_id as resource_id,service_resources.service_id as service_id,service_resources.name as name,service_resources.title as title,service_resources.abstract as abstract,service_resources.keywords as keywords,service_resources.dataurl as dataurl,service_resources.metadataurl as metadataurl,service_resources.legendurl as legendurl,service_resources.scale_min as scale_min,service_resources.scale_max as scale_max,service_resources.srs as srs,service_endpoints.format_list as format_list,service_resources.style_list as style_list,service_resources.time_extent as time_extent,service_resources.queryable as queryable from service_resources inner join service_endpoints on service_endpoints.service_id = service_resources.service_id) as t using unique resource_id" Thanks ..Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Fawcett at STATE.MN.US Wed Apr 6 06:20:25 2005 From: David.Fawcett at STATE.MN.US (Fawcett, David) Date: Wed, 6 Apr 2005 08:20:25 -0500 Subject: Google maps w/ satellite imagery Message-ID: Perhaps there is an opportunity (formal or informal) at the MUM 2005 for people to show how they have been using an AJAX-esque approach to MapServer applications. David Fawcett Minnesota Office of Environmental Assistance david.fawcett at moea.state.mn.us 651.215.0200 -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of Pascoe,Tim [Burlington] Sent: Wednesday, April 06, 2005 8:01 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery Take a look at: http://adaptivepath.com/publications/essays/archives/000385.php I believe this is the technology behind the Google Maps interface. Tim -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu] On Behalf Of Charlton Purvis Sent: April 6, 2005 8:18 AM To: MAPSERVER-USERS at lists.umn.edu Subject: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery For those of you who haven't seen it, you're missing out. http://maps.google.com has satellite imagery that performs spectacularly. Enter an address; the satellite option is a link in the upper RH corner of that page. Even the dingbat public is tuned in to the site, http://www.cnn.com/2005/TECH/internet/04/05/google.maps.ap/index.html. Charlton From rob at DATAFLOWDESIGN.COM Wed Apr 6 06:26:38 2005 From: rob at DATAFLOWDESIGN.COM (Rob P.) Date: Wed, 6 Apr 2005 08:26:38 -0500 Subject: Label layer... In-Reply-To: <33fad68805040605592167ee11@mail.gmail.com> Message-ID: >>>>> "Paul" == Paul james writes: Paul> Hi, I have a point layer with a label... I?d like to know Paul> how can I turn on/turn off only the label ... May I do other Paul> layer ? Sample?? I?m using php/mapscript I do it like this: $layerObj->set("labelminscale", 0); $layerObj->set("labelmaxscale", 0); Regards, Rob Paul> Thank you Paul> LAYER NAME state TYPE POINT STATUS ON CONNECTIONTYPE POSTGIS Paul> CONNECTION "user=x password=x dbname=x host= x" DATA Paul> "the_geom from states" LABELITEM "name" LABELCACHE ON Paul> CLASS NAME "state_" OUTLINECOLOR 255 0 0 COLOR 10 90 Paul> 10 SYMBOL 'circle' SIZE 5 LABEL FONT fritqat SIZE 6 TYPE Paul> TRUETYPE COLOR 255 0 0 FORCE TRUE OUTLINECOLOR 255 200 200 Paul> PARTIALS TRUE POSITION AUTO END END From jdport at VERITIME.COM Wed Apr 6 06:24:20 2005 From: jdport at VERITIME.COM (Jeff Portwine) Date: Wed, 6 Apr 2005 09:24:20 -0400 Subject: Label layer... Message-ID: I generally make 2 layers.. one of type point, and one of type annotation. You can choose whether or not to display the annotation layer at any time without affecting the point layer at all. Here is an example that i pulled out of one of my map files, and edited to make an example. LAYER Name cities DATA citiesx020 STATUS default TYPE point PROJECTION "proj=latlong" END CLASS NAME "Cities" symbol "circle" color 0 0 0 END END LAYER NAME city_name_labels DATA citiesx020 STATUS default TYPE annotation LABELITEM "name" PROJECTION "proj=latlong" END CLASS LABEL FORCE TRUE COLOR 0 0 0 SIZE tiny POSITION CC PARTIALS false END END Hope that helps. -Jeff ----- Original Message ----- From: "Paul james" To: Sent: Wednesday, April 06, 2005 8:59 AM Subject: [UMN_MAPSERVER-USERS] Label layer... Hi, I have a point layer with a label... I?d like to know how can I turn on/turn off only the label ... May I do other layer ? Sample?? I?m using php/mapscript Thank you LAYER NAME state TYPE POINT STATUS ON CONNECTIONTYPE POSTGIS CONNECTION "user=x password=x dbname=x host= x" DATA "the_geom from states" LABELITEM "name" LABELCACHE ON CLASS NAME "state_" OUTLINECOLOR 255 0 0 COLOR 10 90 10 SYMBOL 'circle' SIZE 5 LABEL FONT fritqat SIZE 6 TYPE TRUETYPE COLOR 255 0 0 FORCE TRUE OUTLINECOLOR 255 200 200 PARTIALS TRUE POSITION AUTO END END From d.huisman at INGBCC.NL Wed Apr 6 06:55:17 2005 From: d.huisman at INGBCC.NL (Dirk-Jan Huisman) Date: Wed, 6 Apr 2005 15:55:17 +0200 Subject: Mapserver IIS error Message-ID: Hi all, I upgraded Mapserver from 4.0 to 4.4.1. The installation of PHP with MapServer 4.4.1 with PHP mapscript on Apache works fine. But when installed on IIS on a Windows2000 machine i get the following error: libpng warning: Incomplete compressed datastream in iCCP chunk The sites are created with MapLab. I know that MapLab requires Mapserver4.0 and works best with MS4.2. But the sites are created when i used MS4.0. Does someone know what this error means and is there a solution? best regards, Dirk Huisman ------------------------------------------------------------------------------ Prins Mauritsstraat 17, Postbus 75, 4140 AB Leerdam Telefoon (0345) 63 96 96, Fax (0345) 63 96 66, E-mail post at ingbcc.nl Internet www.ingbcc.nl ------------------------------------------------------------------------------ Deze e-mail en de eventuele bestanden die meegezonden zijn, zijn vertrouwelijk en alleen bedoeld voor het gebruik door de individu of instelling aan wie deze e-mail geadresseerd is. Als u deze e-mail onterecht ontvangen heeft wilt u het ons dan laten weten. ------------------------------------------------------------------------------ This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the system manager. ------------------------------------------------------------------------------ From bobbyfung at HOTMAIL.COM Wed Apr 6 07:01:24 2005 From: bobbyfung at HOTMAIL.COM (Libo) Date: Wed, 6 Apr 2005 09:01:24 -0500 Subject: How can I draw a symbol or label on the map given a coordinate? Message-ID: Hi, I am working on an address matching program. I have set up a WMS server using MapServer and found a way to get a coordinate for an civic address. It is possible to draw a symbol or a label or anything on that coordinate? Does MapServer has a build-in feature? Or do I have to use write my own program using MapScript? I appreciate any help! From jmckenna at DMSOLUTIONS.CA Wed Apr 6 07:23:34 2005 From: jmckenna at DMSOLUTIONS.CA (Jeff McKenna) Date: Wed, 6 Apr 2005 10:23:34 -0400 Subject: tutorial problem In-Reply-To: <200504060938.j369cKX09244@zerg.astral.ro> Message-ID: Ferencik, Hmm, for myself to get this tutorial to work just now with MS4W I made the following change to example1-9.map: WEB TEMPLATE 'example1-9.html' IMAGEPATH '/ms4w/tmp/ms_tmp/' IMAGEURL '/ms_tmp/' END What happens when you try that? jeff Ferencik Ioan wrote: > I am running MS4W, it is working fine, I downloaded Mapserver tutorial and > passed through it till example1-9. I have the folowing problem: > when I type: http://localhost/cgi-bin/mapserv.exe? > map=c:\ms4w\tutorial\example1-9.map&mode=browse > > I see only 1 map though I should see pursunat to template file 2 maps: one png > image is generate in map mode and the other in browse mode. Instead of second > map I see a blank square and inside it is wtritten: Submit query. > > Can you guys help me? > > WEB > TEMPLATE 'example1-9.html' > IMAGEPATH 'tmp' > IMAGEURL 'tmp' > END > > I believe that i am missing something with WEB object(IMAGEURL) > Can you give me from what I have written a hint about what should I write at > IMAGEPATH and IMAGEURL? > Thanks > > _____________________________________________ > Castiga peste 1000 de premii cu Wella Design! > http://wella.boom.ro > -- Jeff McKenna DM Solutions Group Inc. http://www.dmsolutions.ca From rob at DATAFLOWDESIGN.COM Wed Apr 6 07:26:00 2005 From: rob at DATAFLOWDESIGN.COM (Rob P.) Date: Wed, 6 Apr 2005 09:26:00 -0500 Subject: Label layer... In-Reply-To: <16979.58255.137383.17430@ursus.waterpathcanoe.com> Message-ID: >>>>> "Rob" == Rob P writes: >>>>> "Paul" == Paul james writes: Paul> Hi, I have a point layer with a label... I?d like to know Paul> how can I turn on/turn off only the label ... May I do other Paul> layer ? Sample?? I?m using php/mapscript Rob> I do it like this: Rob> $layerObj->set("labelminscale", 0); Rob> $layerObj->set("labelmaxscale", 0); Rob> Regards, Rob Sorry to post twice. The above needs more explanation. To turn off labelling, set both the labelmin/max scale values to zero. In php/mapscript, I use code like this: $layerObj->set("labelminscale", 0); $layerObj->set("labelmaxscale", 0); . By not specifying LABELMIN/MAXSCALE in your map file, you will get labels. But to turn on labeling from php, I think (never had to turn them back on) you can set the labelmin/max scale values to bracket the $mapObj->scale. So if your map scale ($mapObj->scale) is 20000, then do something like this: $layerObj->set("labelminscale", 0); $layerObj->set("labelmaxscale", 100000000); This is the only way I know. If there's another way, please let me know. Rob Paul> Thank you Paul> LAYER NAME state TYPE POINT STATUS ON CONNECTIONTYPE POSTGIS Paul> CONNECTION "user=x password=x dbname=x host= x" DATA Paul> "the_geom from states" LABELITEM "name" LABELCACHE ON Paul> CLASS NAME "state_" OUTLINECOLOR 255 0 0 COLOR 10 90 10 Paul> SYMBOL 'circle' SIZE 5 LABEL FONT fritqat SIZE 6 TYPE Paul> TRUETYPE COLOR 255 0 0 FORCE TRUE OUTLINECOLOR 255 200 200 Paul> PARTIALS TRUE POSITION AUTO END END -- ------------------- Robert G. Piepul PO Box 52405 Tulsa OK 74152-0405 918-749-8454 From robert.wanczyk at PROGEA.PL Wed Apr 6 07:23:05 2005 From: robert.wanczyk at PROGEA.PL (Robert Wanczyk) Date: Wed, 6 Apr 2005 09:23:05 -0500 Subject: Red Hat & PHP/MapScripts Message-ID: Hi I have some problems to installantion PHP,I do the same like the page http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?RedHat9AndMapserver40 ****************************************** wget http://us2.php.net/get/php-4.3.2.tar.gz/from/us3.php.net/mirror tar xzf php-4.3.2.tar.gz cd php-4.3.2 make clean rm -f config.cache ./configure --enable-force-cgi-redirect --with-config-file- path=/etc/httpd/ --with-gd=/usr/local --with-jpeg-dir=/usr/lib --with-png- dir=/usr/lib --with-tiff-dir=/usr/lib --with-zlib-dir=/usr/lib --with- freetype-dir --without-ttf --with-pdflib --with-mysql --with-regex=system - -with-ming --enable-dbase --enable-dbx --enable-versioning make cp sapi/cgi/php /var/www/cgi-bin make install ********************************** but when I give comand "make" i have some the massage. /usr/local/php-4.3.8/ext/standard/image.c:212: undefined reference to `uncompress' ext/standard/image.o(.text+0x56a):/usr/local/php- 4.3.8/ext/standard/image.c:230: undefined reference to `uncompress' main/output.o(.text+0x945): In function `php_ob_init_named': /usr/local/php-4.3.8/main/output.c:428: undefined reference to `php_ob_gzhandler_check' collect2: ld returned 1 exit status make: *** [sapi/cgi/php] B??d 1 I have install before php 4.3.8, how uinstall PHP? Thanks for help in advance. Robert From williampaul28 at YAHOO.COM Wed Apr 6 07:40:19 2005 From: williampaul28 at YAHOO.COM (william paul) Date: Wed, 6 Apr 2005 07:40:19 -0700 Subject: Mapsurfer IIS error Message-ID: Hi, I have mapserver 4.4.1 and Mapsurfer 1.5. When I use Apache with Windows XP th demo data works just fine, but when I use IIS with Windows XP I receive the following error: CGI ErrorThe specified CGI application misbehaved by not returning a complete set of HTTP headers. Can anyone help me to make mapsurfer work with IIS? Thank you in advance William --------------------------------- Yahoo! Messenger Show us what our next emoticon should look like. Join the fun. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sknutti at SMUMN.EDU Wed Apr 6 07:34:14 2005 From: sknutti at SMUMN.EDU (Scott Knutti) Date: Wed, 6 Apr 2005 09:34:14 -0500 Subject: Terraserver Message-ID: Has anyone been able to add the Terraserver imagery as a WMS layer to a Mapserver application? Are there any other WMS layers out there where we can obtain imagery? Scott Knutti From nacional at CBS.UMN.EDU Wed Apr 6 07:48:22 2005 From: nacional at CBS.UMN.EDU (Pericles S. Nacionales) Date: Wed, 6 Apr 2005 09:48:22 -0500 Subject: tutorial problem In-Reply-To: <200504060938.j369cKX09244@zerg.astral.ro> Message-ID: Since you are using MS4W, you should change your IMAGEPATH to "C:/ms4w/tmp/ms_tmp/" and your IMAGEURL to "/ms_tmp/". Don't forget to include the trailing slashes. You'll notice that the IMAGEPATH points to your local directory while the IMAGEPATH points to the Apache Alias directory (or virtual directory in IIS parlance). MapServer dumps the output map to the IMAGEPATH and uses IMAGEURL to reference it for HTML template output. If you ran example 1.9 correctly, you will noticec that the "[img]" tag in the HTML template has been replaced with "/ms_tmp/". Lastly, note that you no longer call example 1.9 as http://localhost/tutorial/example1-9.html (this is probably what you did). Instead you pass example1-9.html to the MapServer CGI program by calling http://localhost/cgi-bin/mapserv50?map=/ms4w/apps/tutorial/example1-9.map. Example1-9.html is no longer a plain web page but a MapServer HTML template. Good luck! -Perry On Wednesday 06 April 2005 04:38 am, Ferencik Ioan wrote: > I am running MS4W, it is working fine, I downloaded Mapserver tutorial and > passed through it till example1-9. I have the folowing problem: > when I type: ?http://localhost/cgi-bin/mapserv.exe? > map=c:\ms4w\tutorial\example1-9.map&mode=browse > > I see only 1 map though I should see ?pursunat to template file 2 maps: one > png image is generate in map mode and the other in browse mode. Instead of > second map I see a blank square and inside it is wtritten: Submit query. > > Can you guys help me? -- Pericles S. Nacionales Dept. of Ecology, Evolution, and Behavior University of Minnesota work: 612 624 6713 e-mail: nacional at cbs.umn.edu From cdaily at GMAIL.COM Wed Apr 6 07:57:02 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Wed, 6 Apr 2005 09:57:02 -0500 Subject: antialias() function In-Reply-To: <8dd2aaf34fd1a3ef4dd35b89ee88e422@charter.net> Message-ID: And of course, the two lines that read for ($l=0; $l Message-ID: It seems that many of the member values of mapscript objects are not directly accessible. They are only available to be set with the set() function. I do not know if this is a bug or a design decision, but it would certainly be nice to make those variables all public. -Camden On Apr 6, 2005 2:01 AM, Matthew Whiting wrote: > After hours working on this, I finally found the problem. > > Setting x and y for the PointObj like this: > $point->x = $x; > $point->y = $y; > does not work. > > This does: > $point->setxy($x,$y); > > Why is this a problem? > > Interestingly after setting the points explicitly (as opposed to setxy()) > and then printing the contents, it seems the values are actually set! > > Matthew > Hello all, > > Have been trying without success to successfully implement a zoom out > feature in my application using the zoompoint() function and -2 as the zoom > factor. For some reason, the image does not end up centred on the point > clicked on but on a different spot altogether. I'm getting nowhere with > this. I tried manually changing the extent and this works fine. Any > suggestions? > > Thanks > Matthew > > > > From cdaily at GMAIL.COM Wed Apr 6 08:04:21 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Wed, 6 Apr 2005 10:04:21 -0500 Subject: Terraserver In-Reply-To: <4253F366.9060500@smumn.edu> Message-ID: I use it like this: LAYER NAME "aerial" TYPE RASTER STATUS OFF MINSCALE 1000 # trying to grab too small a scale might result in an error from terraservice CONNECTIONTYPE WMS CONNECTION "http://terraservice.net/ogcmap.ashx?VERSION=1.1.1&SERVICE=wms&LAYERS=urbanarea&FORMAT=image/jpeg&STYLES=" METADATA "wms_srs" "EPSG:4326" "wms_extent" "-100 20 -60 60" # this line overcomes a mapscript bug [no. 1118] END END On Apr 6, 2005 9:34 AM, Scott Knutti wrote: > Has anyone been able to add the Terraserver imagery as a WMS layer to a > Mapserver application? Are there any other WMS layers out there where > we can obtain imagery? > > Scott Knutti > From ariel at FORWARDBUSINESS.COM.AR Wed Apr 6 07:55:01 2005 From: ariel at FORWARDBUSINESS.COM.AR (Ariel Dario) Date: Wed, 6 Apr 2005 09:55:01 -0500 Subject: contains() don't works Message-ID: Hello All I need to know if a piont is in shape, I try to use shapeobj:contains() but it allways rturns me MS_FALSE. this is de code I made: $polyz = ms_newShapeObj(MS_SHAPE_POLYGON); $lineaz = ms_newLineObj(); $pz = ms_newPointObj(); $layerz = $map->getLayerByName("Zonas"); $layerz->set('status', MS_ON); $lineaz->addXY(0,0); $lineaz->addXY(0,-10); $lineaz->addXY(-10,-10); $lineaz->addXY(-10,0); $lineaz->addXY(0,0); $polyz->add($lineaz); $pz->setXY(-1,-1); $polyz->draw($map, $layerz, $image, 0, "Zona"); if ($polyz->contains($pz)!=MS_TRUE){ $outzona=1; echo $outzona ; } Please if someone can help me I'll appreciate it. Thanks!! From jdport at VERITIME.COM Wed Apr 6 08:09:00 2005 From: jdport at VERITIME.COM (Jeff Portwine) Date: Wed, 6 Apr 2005 11:09:00 -0400 Subject: antialias() function Message-ID: PHP doesn't catch infinite loops. If you run the code, and it hits an infinite loop the page will run for a few minutes and when it doesn't have its result it will time out. -Jeff ----- Original Message ----- From: "Camden Daily" To: Sent: Wednesday, April 06, 2005 10:57 AM Subject: Re: [UMN_MAPSERVER-USERS] antialias() function > And of course, the two lines that read > for ($l=0; $l should read > for ($l=0; $l > Does PHP catch infinite loops? Seems that code mistake should have > broken my function somehow. > > -Camden > From nunoragil at GMAIL.COM Wed Apr 6 08:16:48 2005 From: nunoragil at GMAIL.COM (Nuno Gil) Date: Wed, 6 Apr 2005 16:16:48 +0100 Subject: exception mime format in GetMap request Message-ID: Dear Listers, I'm trying to access a layer being served as a cascaded data source through my MapServer. Well, no image is displayed. Here is the problem... I request that layer from MapServer using the parameter "exceptions=application/vnd.ogc.se_xml" (the one that should be supported by all servers, accordingly to OGC specs, and the only one supported by the original server where the data is locally stored), however MapServer sends a GetMap request to the original server using the parameter "exceptions=application/vnd.ogc.se_inimage" (an optionally supported MIME type accordingly to OGC specs). Is there any way around this? Any ideas would be appreciated. Regards and thanks for your help, Nuno From robert.wanczyk at PROGEA.PL Wed Apr 6 08:22:45 2005 From: robert.wanczyk at PROGEA.PL (Robert Wanczyk) Date: Wed, 6 Apr 2005 10:22:45 -0500 Subject: Red Hat & PHP/MapScripts Message-ID: Hi I have some problems to installantion PHP,I do the same like the page http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?RedHat9AndMapserver40 ****************************************** wget http://us2.php.net/get/php-4.3.2.tar.gz/from/us3.php.net/mirror tar xzf php-4.3.2.tar.gz cd php-4.3.2 make clean rm -f config.cache ./configure --enable-force-cgi-redirect --with-config-file- path=/etc/httpd/ --with-gd=/usr/local --with-jpeg-dir=/usr/lib --with-png- dir=/usr/lib --with-tiff-dir=/usr/lib --with-zlib-dir=/usr/lib --with- freetype-dir --without-ttf --with-pdflib --with-mysql --with-regex=system - -with-ming --enable-dbase --enable-dbx --enable-versioning make cp sapi/cgi/php /var/www/cgi-bin make install ********************************** but when I give comand "make" i have some the massage. /usr/local/php-4.3.8/ext/standard/image.c:212: undefined reference to `uncompress' ext/standard/image.o(.text+0x56a):/usr/local/php- 4.3.8/ext/standard/image.c:230: undefined reference to `uncompress' main/output.o(.text+0x945): In function `php_ob_init_named': /usr/local/php-4.3.8/main/output.c:428: undefined reference to `php_ob_gzhandler_check' collect2: ld returned 1 exit status make: *** [sapi/cgi/php] B??d 1 I have install before php 4.3.8, how uinstall PHP . Thanks for help in advance. Robert From lluisgm at GMAIL.COM Wed Apr 6 08:27:33 2005 From: lluisgm at GMAIL.COM (=?ISO-8859-1?Q?Llu=EDs_Garcia_i_Mestres?=) Date: Wed, 6 Apr 2005 17:27:33 +0200 Subject: [UMN_MAPSERVER-USERS] [UMN_MAPSERVER-USERS] jBox image problem In-Reply-To: Message-ID: The applet is still not working in Konqueror, also have many problems with javascripts, so it's better to work with firefox. I'm using Mandrake 10.1 and mapserver 4.4.1. Llu?s On Apr 6, 2005 4:37 AM, Richard Greenwood wrote: > Llu?s Garcia i Mestres GMAIL.COM> writes: > > > > > Thanks Richard, > > > > Finally I can see the applet. My first error was to use the konqueror, > > so I changed to Firefox and then I linked the plugin of jre. Now it?s > > fine. > > > > Llu?s > > So is it still not working with Konqueror? Last time I checked it was fine with > Konqueror. If you could check again and let me know I would appreciate it. And > what OS are you running Konqueror on? > > Rich > From paul.oduro at SPPS.ORG Wed Apr 6 08:31:51 2005 From: paul.oduro at SPPS.ORG (Paul Smith) Date: Wed, 6 Apr 2005 10:31:51 -0500 Subject: Geocoding Message-ID: Hello All Will geo::coder::us do geocoding on the fly. I need to generate maps on the fly for a school district so they can produce maps of where their students reside in the city for their different schools. In the future they would want to tie this to census data to do some socio-economic analyses. I have obtained the streetlines for the county in which the school district is located. Any help and comments on possible design would be very much appreciated. I have successfully installed mapserver on a suse linux box and both the Itasca and the Gmap demos are working flawlessly. Paul On Tue, 5 Apr 2005 16:05:56 -0400, Jeff Portwine wrote: >The best solution I've been able to find so far is the perl library >geo::coder::us , which you can find at CPAN (http://search.cpan.org). > >In order to use it, you will have to download the tiger data for the area >you want to geocode and make a db file with the import script that comes >with this library. > >-Jeff > >----- Original Message ----- >From: "Mauricio Leon" >To: >Sent: Tuesday, April 05, 2005 3:41 PM >Subject: [UMN_MAPSERVER-USERS] Geocoding > > >>I need to implement a method for translations between a US street address >> and a latlong coordinate (and vice versa) are there any openly available >> tools/technologies for this purpose? >> >> Thanks >> >> Mauricio >> From BEN at SYNCERA-ITSOLUTIONS.NL Wed Apr 6 08:32:57 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Wed, 6 Apr 2005 17:32:57 +0200 Subject: exception mime format in GetMap request Message-ID: Hi Nuno, unfortunately there is not, see: http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1246 I don't know if you have funding but you could consider getting this fixed by eg DM Solutions. Best regards, Bart Bart van den Eijnden GIS specialist Syncera IT-Solutions >>> Nuno Gil 04/06/05 05:16pm >>> Dear Listers, I'm trying to access a layer being served as a cascaded data source through my MapServer. Well, no image is displayed. Here is the problem... I request that layer from MapServer using the parameter "exceptions=application/vnd.ogc.se_xml" (the one that should be supported by all servers, accordingly to OGC specs, and the only one supported by the original server where the data is locally stored), however MapServer sends a GetMap request to the original server using the parameter "exceptions=application/vnd.ogc.se_inimage" (an optionally supported MIME type accordingly to OGC specs). Is there any way around this? Any ideas would be appreciated. Regards and thanks for your help, Nuno From jdport at VERITIME.COM Wed Apr 6 08:43:20 2005 From: jdport at VERITIME.COM (Jeff Portwine) Date: Wed, 6 Apr 2005 11:43:20 -0400 Subject: Geocoding Message-ID: You could do it on the fly, but it would be faster to read the addresses from a database table, geocode them, and write the latitudes and longitudes to a table ahead of time so that when you are generating the map all you have to do is a database lookup to get the coordinates instead of executing the geocoding script for each address every time a map is generated. -Jeff ----- Original Message ----- From: "Paul Smith" To: Sent: Wednesday, April 06, 2005 11:31 AM Subject: Re: [UMN_MAPSERVER-USERS] Geocoding > Hello All > > Will geo::coder::us do geocoding on the fly. I need to generate maps on > the > fly for a school district so they can produce maps of where their students > reside in the city for their different schools. In the future they would > want to tie this to census data to do some socio-economic analyses. I have > obtained the streetlines for the county in which the school district is > located. > > Any help and comments on possible design would be very much appreciated. > I have successfully installed mapserver on a suse linux box and both the > Itasca and the Gmap demos are working flawlessly. > > Paul > > > > On Tue, 5 Apr 2005 16:05:56 -0400, Jeff Portwine > wrote: > >>The best solution I've been able to find so far is the perl library >>geo::coder::us , which you can find at CPAN (http://search.cpan.org). >> >>In order to use it, you will have to download the tiger data for the area >>you want to geocode and make a db file with the import script that comes >>with this library. >> >>-Jeff >> >>----- Original Message ----- >>From: "Mauricio Leon" >>To: >>Sent: Tuesday, April 05, 2005 3:41 PM >>Subject: [UMN_MAPSERVER-USERS] Geocoding >> >> >>>I need to implement a method for translations between a US street address >>> and a latlong coordinate (and vice versa) are there any openly available >>> tools/technologies for this purpose? >>> >>> Thanks >>> >>> Mauricio >>> > From hetzerrr at GMAIL.COM Wed Apr 6 08:46:54 2005 From: hetzerrr at GMAIL.COM (John Novak) Date: Wed, 6 Apr 2005 08:46:54 -0700 Subject: Mapserver 4.4.1 /POSTGIS 0.8/PostgreSQL 7.4.3 query performance puzzler Message-ID: All, A trace from PostgreSQL shows the following SQL block executing at the server: begin; DECLARE mycursor CURSOR FOR SELECT asbinary(force_collection(force_2d(mapdata2.the_geom)),'NDR'),OID::text from (select mc.the_geom, mc.oid as oid from products_components as pc, mapdata as mc where pc.products_id > 0 and pc.roll = mc.roll and pc.frame = mc.frame) as mapdata2 WHERE mapcat2.the_geom && setSRID('BOX3D(-84.6 35.4625,-69.6 46.7125)'::BOX3D, 4326 ); ; FETCH ALL in mycursor; commit Nothing special here, except that this form requires 55000msec (!) to return results to the client. I have seen similar behavior on an earlier Mapserver release. Running just the SELECT asbinary ? in PgAdmin III shows a 516ms response including data transfer, so something related to the FETCH ALL is causing the problem. I suspect I have the server badly tuned as most parameters are still at installation default values. Running the entire block replicates the very sad behavior. Any enlightenment is greatly appreciated. John Novak Novacell Technologies From hetzerrr at GMAIL.COM Wed Apr 6 08:56:30 2005 From: hetzerrr at GMAIL.COM (John Novak) Date: Wed, 6 Apr 2005 10:56:30 -0500 Subject: Mapserver 4.4.1 /POSTGIS 0.8/PostgreSQL 7.4.3 query performance puzzler Message-ID: All, A trace from PostgreSQL shows the following SQL block executing at the server: begin; DECLARE mycursor CURSOR FOR SELECT asbinary(force_collection(force_2d(mapdata2.the_geom)),'NDR'),OID::text from (select mc.the_geom, mc.oid as oid from products_components as pc, mapdata as mc where pc.products_id > 0 and pc.roll = mc.roll and pc.frame = mc.frame) as mapdata2 WHERE mapcat2.the_geom && setSRID('BOX3D(-84.6 35.4625,-69.6 46.7125)'::BOX3D, 4326 ); ; FETCH ALL in mycursor; commit Nothing special here, except that this form requires 55000msec (!) to return results to the client. I have seen similar behavior on an earlier Mapserver release. Running just the SELECT asbinary in PgAdmin III shows a 516ms response including data transfer, so something related to the FETCH ALL is causing the problem. I suspect I have the server badly tuned as most parameters are still at installation default values. Running the entire block replicates the very sad behavior. Any enlightenment is greatly appreciated. John Novak Novacell Technologies From bill at BINKO.NET Wed Apr 6 09:17:58 2005 From: bill at BINKO.NET (Bill Binko) Date: Wed, 6 Apr 2005 12:17:58 -0400 Subject: Mapserver 4.4.1 /POSTGIS 0.8/PostgreSQL 7.4.3 query performance puzzler In-Reply-To: Message-ID: On Wed, 6 Apr 2005, John Novak wrote: > > A trace from PostgreSQL shows the following SQL block executing at the server: > > begin; DECLARE mycursor CURSOR FOR SELECT > asbinary(force_collection(force_2d(mapdata2.the_geom)),'NDR'),OID::text from > (select mc.the_geom, mc.oid as oid from > products_components as pc, mapdata as mc where pc.products_id > 0 and > pc.roll = mc.roll and pc.frame = mc.frame) as mapdata2 > WHERE mapcat2.the_geom && setSRID('BOX3D(-84.6 35.4625,-69.6 > 46.7125)'::BOX3D, 4326 ); ; FETCH ALL in mycursor; commit > ... > > Running just the SELECT asbinary in PgAdmin III shows a 516ms response > including data transfer, so something related to the FETCH ALL is causing > the problem. I suspect I have the server badly tuned as most parameters are > still at installation default values. Running the entire block replicates > the very sad behavior. I am no PostGIS expert, but I had a similar problem recently. It seems that Postgresql uses different query optimization routines for the two types of queries. I solved my problem (with help from a stray comment on postGIS's site) by changing this parameter in postgresql.conf: random_page_cost = 2 (It was 4). This made it use the GIST index, where it was doing a full table scan. You can tell which one it's using by running your two queries with EXPLAIN ANALYZE before them. I would bet that one uses the index and the other doesn't. Bill From raghu at KU.EDU Wed Apr 6 09:19:15 2005 From: raghu at KU.EDU (Shantha, Raghavendra Vasanth) Date: Wed, 6 Apr 2005 11:19:15 -0500 Subject: color palette on a Arc Info Binary Grid (ADF) Message-ID: Hi, I was looking for a way to apply different color palettes (say shades of red, green etc) to a gray scale Arc Info Binary Grid (ADF) Raster file using mapserver. Any ideas as to how I can do this? Thanks, Raghu From nunoragil at GMAIL.COM Wed Apr 6 09:24:56 2005 From: nunoragil at GMAIL.COM (Nuno Gil) Date: Wed, 6 Apr 2005 17:24:56 +0100 Subject: free raster tiling tools Message-ID: Dear listers, I need to tile and resample large raster files. Instead of using arc or some proprietary software I was looking for an open source alternative. Any idea??? Regards, Nuno From kenlord at GMAIL.COM Wed Apr 6 09:23:33 2005 From: kenlord at GMAIL.COM (Ken Lord) Date: Wed, 6 Apr 2005 09:23:33 -0700 Subject: Hi In-Reply-To: <9dea3a2705040600573a23b2c8@mail.gmail.com> Message-ID: There's no place like home .. http://mapserver.gis.umn.edu/ Cheers, Ken Lord Vancouver BC On Apr 6, 2005 12:57 AM, Shailesh Chiplunkar wrote: > Hi, > I'm new to this mailing list and also to the concept of Mapserver. > It'd be great if any of u cld tell me where exactly to read form and > how to start using the mapserver too? > Thanx > > Shailesh > From fwarmerdam at GMAIL.COM Wed Apr 6 09:30:53 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Wed, 6 Apr 2005 12:30:53 -0400 Subject: free raster tiling tools In-Reply-To: Message-ID: On Apr 6, 2005 12:24 PM, Nuno Gil wrote: > Dear listers, > I need to tile and resample large raster files. Instead of using arc > or some proprietary software I was looking for an open source > alternative. Nuno, I believe there is a utility for splitting big files into tiles using GDAL floating around somewhere, but I didn't write it and don't really know much about it. However, it isn't too hard to write a script to call gdalwarp or gdal_translate to split a big file into tiles, while potentially resampling and/or reprojecting. http://www.gdal.org/ Check the gdalwarp and gdal_translate utliity pages. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From fsimon at UNIVALI.BR Wed Apr 6 09:39:23 2005 From: fsimon at UNIVALI.BR (Fernando Simon) Date: Wed, 6 Apr 2005 13:39:23 -0300 Subject: Mapserver 4.4.1 /POSTGIS 0.8/PostgreSQL 7.4.3 query performance puzzler In-Reply-To: Message-ID: Hi all, I saw this problem in client test, but was a problem with data definition. I don`t know if is your case but I believe that this hints can help you. Here the client defined this data query: "the_geom from (SELECT regiao.the_geom AS the_geom, fundo.no_programa AS no_programa, fundo.nu_ano AS ano, fundo.vl_pago AS vl_pago FROM regiao inner join fundo on regiao.co_ibge = fundo.co_ibge and no_programa = 'PAB FIXO' and fundo.nu_ano = 2004 and regiao.co_ibge <= 150000 and regiao.co_ibge >= 140000) as pab_fixo using unique regiao.oid using srid=4291" But this query needed 55s to finish, and when I used the psql to run the asbinary query the results appear in 3s. The problem was with the UNIQUE parameter. The right data definition was: the_geom from (SELECT regiao.the_geom AS the_geom, regiao.oid as oid, fundo.no_programa AS no_programa, fundo.nu_ano AS ano, fundo.vl_pago AS vl_pago FROM regiao inner join fundo on regiao.co_ibge = fundo.co_ibge and no_programa = 'PAB FIXO' and fundo.nu_ano = 2004 and regiao.co_ibge <= 150000 and regiao.co_ibge >=140000) as pab_fixo using unique oid using srid=4291. And now the results appear in 5s. Thanks for all. ------------------------------------------------------------------------ Fernando Simon Mapserver and Oracle Spatial developer G10 - Laboratorio de Computacao Aplicada - Brazil http://g10.cttmar.univali.br - UNIVALI/CTTMAR ------------------------------------------------------------------------ Citando Bill Binko : > On Wed, 6 Apr 2005, John Novak wrote: > > > > A trace from PostgreSQL shows the following SQL block executing > at the server: > > > > begin; DECLARE mycursor CURSOR FOR SELECT > > > asbinary(force_collection(force_2d(mapdata2.the_geom)),'NDR'),OID::text > from > > (select mc.the_geom, mc.oid as oid from > > products_components as pc, mapdata as mc where pc.products_id > 0 > and > > pc.roll = mc.roll and pc.frame = mc.frame) as mapdata2 > > WHERE mapcat2.the_geom && setSRID('BOX3D(-84.6 35.4625,-69.6 > > 46.7125)'::BOX3D, 4326 ); ; FETCH ALL in mycursor; commit > > > ... > > > > Running just the SELECT asbinary in PgAdmin III shows a 516ms > response > > including data transfer, so something related to the FETCH ALL is > causing > > the problem. I suspect I have the server badly tuned as most > parameters are > > still at installation default values. Running the entire block > replicates > > the very sad behavior. > > I am no PostGIS expert, but I had a similar problem recently. It > seems > that Postgresql uses different query optimization routines for the > two > types of queries. I solved my problem (with help from a stray > comment on > postGIS's site) by changing this parameter in postgresql.conf: > > random_page_cost = 2 > (It was 4). > > This made it use the GIST index, where it was doing a full table > scan. > > You can tell which one it's using by running your two queries with > EXPLAIN > ANALYZE before them. I would bet that one uses the index and the > other > doesn't. > > Bill > ------------------------------------------------- Univali - Webmail - http://webmail.univali.br From mtperry78 at SBCGLOBAL.NET Wed Apr 6 10:03:01 2005 From: mtperry78 at SBCGLOBAL.NET (Matthew Perry) Date: Wed, 6 Apr 2005 10:03:01 -0700 Subject: color palette on a Arc Info Binary Grid (ADF) In-Reply-To: 6667 Message-ID: Raghu, I've classified ArcInfo GRIDs using CLASS expressions based on the pixel value. Here's a mapfile sample: LAYER NAME "wildlife_habitat" STATUS OFF TYPE RASTER # Folder containing the hdr.adf DATA "kb_veg_grid/kbshr_v10a/" CLASSITEM "[pixel]" CLASS NAME "Mixed Conifer" EXPRESSION ([pixel] < 48 OR [pixel] == 159) COLOR 0 123 27 END CLASS NAME "Conifer/Hardwood" EXPRESSION ([pixel] >= 48 AND [pixel] < 81) COLOR 78 221 0 END .... .... END Hope this helps. I did this manually which was time-consuming given that I had 35+ classes. There *might* be a way to convert your color table (.clr) to classes or have gdal use the .clr directly.... but I will defer to the rest of the list on that one. Good luck, Matt Perry Humboldt State University --- "Shantha, Raghavendra Vasanth" wrote: > Hi, > > I was looking for a way to apply different color > palettes (say shades of > red, green etc) to a gray scale Arc Info Binary Grid > (ADF) Raster file > using mapserver. > > Any ideas as to how I can do this? > > > Thanks, > Raghu > From assefa at DMSOLUTIONS.CA Wed Apr 6 10:02:59 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Wed, 6 Apr 2005 13:02:59 -0400 Subject: Unexpected WFS GetFeature results In-Reply-To: <2576812186CDD411BF1500508B6DCE950972F8C7@ecnwri1.ontario.int.ec.gc.ca> Message-ID: Tom, I did make some changes recently to the way filters were handled for postgis layers (Bug http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1292). It's probably related to thoses changes. Is it easy for you to test it against 4.4.x releases ? If you can test and It works I will start looking into the code to see what the problem is. Later, Kralidis,Tom [Burlington] wrote: > Hi, > > (MapServer CVS, FC2, latest stable supporting libs). > > I have a WFS instance running against a PostGIS table, and when I invoke > a Filter'd GetFeature operation (bbox AND a nested OR), I expect one > result to be returned (only one record in the DB satisfies this > request). > > I've attached a sample HTML form page to correctly invoke the request. > > However, I receive all records back in the DB. > > Any idea what's going on here? FYI, here's my DATA string in the LAYER > object: > > DATA "the_geom from (select service_endpoints.organization as > organization,service_endpoints.endpoint_getresource as > endpoint_getresource,service_endpoints.service_type as > service_type,service_endpoints.service_version as > service_version,service_resources.the_geom as > the_geom,service_resources.resource_id as > resource_id,service_resources.service_id as > service_id,service_resources.name as name,service_resources.title as > title,service_resources.abstract as abstract,service_resources.keywords > as keywords,service_resources.dataurl as > dataurl,service_resources.metadataurl as > metadataurl,service_resources.legendurl as > legendurl,service_resources.scale_min as > scale_min,service_resources.scale_max > as scale_max,service_resources.srs as srs,service_endpoints.format_list > as format_list,service_resources.style_list as > style_list,service_resources.time_extent as > time_extent,service_resources.queryable as queryable from > service_resources inner join service_endpoints on > service_endpoints.service_id = service_resources.service_id) as t using > unique resource_id" > > Thanks > > ..Tom > > > ------------------------------------------------------------------------ > > > > > > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From Tom.Kralidis at EC.GC.CA Wed Apr 6 10:09:13 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Wed, 6 Apr 2005 13:09:13 -0400 Subject: Unexpected WFS GetFeature results Message-ID: Assefa, I tested this scenario with CVS 20050328 (the day before you committed to mapogcfilter.c and mapogcfilter.h), and everything works fine. So the problem is somewhere in those changes. Here's the actual OGC filter: NAME -141.84,21.599999999999994 -56.16,74.16 title benthic abstract benthic keywords benthic ..Tom > -----Original Message----- > From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of > Yewondwossen Assefa > Sent: Wednesday, 06 April, 2005 13:03 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS GetFeature results > > > Tom, > > I did make some changes recently to the way filters were > handled for postgis layers (Bug > http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1292). > > It's probably related to thoses changes. Is it easy for you > to test it against 4.4.x releases ? If you can test and It > works I will start looking into the code to see what the problem is. > > Later, > > > Kralidis,Tom [Burlington] wrote: > > Hi, > > > > (MapServer CVS, FC2, latest stable supporting libs). > > > > I have a WFS instance running against a PostGIS table, and when I > > invoke a Filter'd GetFeature operation (bbox AND a nested OR), I > > expect one result to be returned (only one record in the DB > satisfies > > this request). > > > > I've attached a sample HTML form page to correctly invoke > the request. > > > > However, I receive all records back in the DB. > > > > Any idea what's going on here? FYI, here's my DATA string in the > > LAYER > > object: > > > > DATA "the_geom from (select service_endpoints.organization as > > organization,service_endpoints.endpoint_getresource as > > endpoint_getresource,service_endpoints.service_type as > > service_type,service_endpoints.service_version as > > service_version,service_resources.the_geom as > > the_geom,service_resources.resource_id as > > resource_id,service_resources.service_id as > > service_id,service_resources.name as > name,service_resources.title as > > title,service_resources.abstract as > > abstract,service_resources.keywords > > as keywords,service_resources.dataurl as > > dataurl,service_resources.metadataurl as > > metadataurl,service_resources.legendurl as > > legendurl,service_resources.scale_min as > > scale_min,service_resources.scale_max > > as scale_max,service_resources.srs as > srs,service_endpoints.format_list > > as format_list,service_resources.style_list as > > style_list,service_resources.time_extent as > > time_extent,service_resources.queryable as queryable from > > service_resources inner join service_endpoints on > > service_endpoints.service_id = > service_resources.service_id) as t using > > unique resource_id" > > > > Thanks > > > > ..Tom > > > > > > > ---------------------------------------------------------------------- > > -- > > > > > > > > > > > > > > -- > ---------------------------------------------------------------- > Assefa Yewondwossen > Software Analyst > > Email: assefa at dmsolutions.ca > http://www.dmsolutions.ca/ > > Phone: (613) 565-5056 (ext 14) > Fax: (613) 565-0925 > ---------------------------------------------------------------- > From assefa at DMSOLUTIONS.CA Wed Apr 6 10:16:28 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Wed, 6 Apr 2005 13:16:28 -0400 Subject: Unexpected WFS GetFeature results In-Reply-To: <2576812186CDD411BF1500508B6DCE9508A7DB4D@ecnwri1.ontario.int.ec.gc.ca> Message-ID: I will look today into it and provide you with the exact SQL statment created if I do not see any thing obvious. Later, Kralidis,Tom [Burlington] wrote: > Assefa, > > I tested this scenario with CVS 20050328 (the day before you committed > to mapogcfilter.c and mapogcfilter.h), and everything works fine. > > So the problem is somewhere in those changes. > > Here's the actual OGC filter: > > > > > NAME > > -141.84,21.599999999999994 -56.16,74.16 > > > > > > title > benthic > > > abstract > benthic > > > > keywords > benthic > > > > > > ..Tom > > > >>-----Original Message----- >>From: UMN MapServer Users List >>[mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of >>Yewondwossen Assefa >>Sent: Wednesday, 06 April, 2005 13:03 >>To: MAPSERVER-USERS at LISTS.UMN.EDU >>Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS GetFeature results >> >> >>Tom, >> >> I did make some changes recently to the way filters were >>handled for postgis layers (Bug >>http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1292). >> >> It's probably related to thoses changes. Is it easy for you >>to test it against 4.4.x releases ? If you can test and It >>works I will start looking into the code to see what the problem is. >> >>Later, >> >> >>Kralidis,Tom [Burlington] wrote: >> >>>Hi, >>> >>>(MapServer CVS, FC2, latest stable supporting libs). >>> >>>I have a WFS instance running against a PostGIS table, and when I >>>invoke a Filter'd GetFeature operation (bbox AND a nested OR), I >>>expect one result to be returned (only one record in the DB >> >>satisfies >> >>>this request). >>> >>>I've attached a sample HTML form page to correctly invoke >> >>the request. >> >>>However, I receive all records back in the DB. >>> >>>Any idea what's going on here? FYI, here's my DATA string in the >>>LAYER >>>object: >>> >>> DATA "the_geom from (select service_endpoints.organization as >>>organization,service_endpoints.endpoint_getresource as >>>endpoint_getresource,service_endpoints.service_type as >>>service_type,service_endpoints.service_version as >>>service_version,service_resources.the_geom as >>>the_geom,service_resources.resource_id as >>>resource_id,service_resources.service_id as >>>service_id,service_resources.name as >> >>name,service_resources.title as >> >>>title,service_resources.abstract as >>>abstract,service_resources.keywords >>>as keywords,service_resources.dataurl as >>>dataurl,service_resources.metadataurl as >>>metadataurl,service_resources.legendurl as >>>legendurl,service_resources.scale_min as >>>scale_min,service_resources.scale_max >>> as scale_max,service_resources.srs as >> >>srs,service_endpoints.format_list >> >>>as format_list,service_resources.style_list as >>>style_list,service_resources.time_extent as >>>time_extent,service_resources.queryable as queryable from >>>service_resources inner join service_endpoints on >>>service_endpoints.service_id = >> >>service_resources.service_id) as t using >> >>>unique resource_id" >>> >>>Thanks >>> >>>..Tom >>> >>> >>> >> >>---------------------------------------------------------------------- >> >>>-- >>> >>> >>> >>> >>> >>> >> >>-- >>---------------------------------------------------------------- >>Assefa Yewondwossen >>Software Analyst >> >>Email: assefa at dmsolutions.ca >>http://www.dmsolutions.ca/ >> >>Phone: (613) 565-5056 (ext 14) >>Fax: (613) 565-0925 >>---------------------------------------------------------------- >> > > > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From sknutti at SMUMN.EDU Wed Apr 6 11:01:35 2005 From: sknutti at SMUMN.EDU (Scott Knutti) Date: Wed, 6 Apr 2005 13:01:35 -0500 Subject: Zooming... Message-ID: Probably a stupid question with the answer right under my nose, but when I try to zoom in, it zooms by a factor of at least 20. The zoom out functionality works correctly and the zoom in in the reference map(using Chameleon) works correctly. Any ideas? Scott From yecarrillo at YAHOO.COM Wed Apr 6 12:24:07 2005 From: yecarrillo at YAHOO.COM (Eduin Carrillo) Date: Wed, 6 Apr 2005 14:24:07 -0500 Subject: Identify WMS Layers with ArcGIS Message-ID: I'm trying to "identify" WMS layers in ArcGIS with no resutls. Window reports "Nothing found" I'm sure my .map is fine: WEB MINSCALE 0 .. TEMPLATE "template.html" METADATA wms_extent "940000.00000000 1120000.00000000 1211820.35394300 1400000.00000000" wms_abstract "Mapa de prueba del servidor WMS" wms_encoding "ISO-8859-1" wms_opaque "1" wms_accesscontraints "none" wms_addresstype "mailing address" wms_address "Carrera 10 No. 13 - 78" wms_city "San Gil" wms_stateorprovince "Santander" wms_postcode "" wms_country "COLOMBIA" wms_contactelectronicmailaddress "yecarrillo at cas.gov.co" wms_contactfacsimiletelephone "+57+7 7238110" wms_contactperson "Eduin Yesid Carrillo Vega" wms_contactorganization "Corporaci?n Aut?noma Regional de Santander CAS" wms_contactposition "Coordinador SIG" wms_contactvoicetelephone "+57+7 7236888" wms_feature_info_mime_type "text/plain" wms_fees "none" wms_keywordlist "Prueba" wms_title "Prueba" wms_timeformat "YYYY-MM-DDTHH, YYYY-MM-DDTHH:MM, YYYY-MM-DD HH:MM:SS" wms_onlineresource "http://sig.cas.gov.co/mapas/prueba?" wms_srs "EPSG:21892" END END #WEB ... GetCapabilities: text/plain application/vnd.ogc.gml What is wrong? Thanks Eduin Yesid Carrillo Vega yecarrillo at yahoo.com COLOMBIA _________________________________________________________ Do You Yahoo!? Informaci?n de Estados Unidos y Am?rica Latina, en Yahoo! Noticias. Vis?tanos en http://noticias.espanol.yahoo.com From bartvde at XS4ALL.NL Wed Apr 6 12:23:21 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Wed, 6 Apr 2005 21:23:21 +0200 Subject: Identify WMS Layers with ArcGIS In-Reply-To: <20050406192407.77442.qmail@web31712.mail.mud.yahoo.com> Message-ID: Hi Eduin, I don't know the current status of WMS in ArcGIS. But it used to be that only ArcXML is supported for a GetFeatureInfo response (identify), but Mapserver uses a Mapserver flavour of GML 2. So those two don't match. I expect things to get better when both Mapserver and ArcGIS will implement GML 3 level 0 profile, and the WMS spec will adopt that as the "standard" for GetFeatureInfo (or at least most WMS services will support this). So probably for now you won't get this to work in the *land of interoperability*. Best regards, Bart On Wed, 6 Apr 2005 14:24:07 -0500, Eduin Carrillo wrote: > I'm trying to "identify" WMS layers in ArcGIS with no resutls. Window > reports > "Nothing found" > > I'm sure my .map is fine: > WEB > MINSCALE 0 > .. > TEMPLATE "template.html" > METADATA > wms_extent "940000.00000000 1120000.00000000 > 1211820.35394300 1400000.00000000" > wms_abstract "Mapa de prueba del servidor WMS" > wms_encoding "ISO-8859-1" > wms_opaque "1" > wms_accesscontraints "none" > wms_addresstype "mailing address" > wms_address "Carrera 10 No. 13 - 78" > wms_city "San Gil" > wms_stateorprovince "Santander" > wms_postcode "" > wms_country "COLOMBIA" > wms_contactelectronicmailaddress "yecarrillo at cas.gov.co" > wms_contactfacsimiletelephone "+57+7 7238110" > wms_contactperson "Eduin Yesid Carrillo Vega" > wms_contactorganization "Corporaci?n Aut?noma Regional de > Santander CAS" > wms_contactposition "Coordinador SIG" > wms_contactvoicetelephone "+57+7 7236888" > wms_feature_info_mime_type "text/plain" > wms_fees "none" > wms_keywordlist "Prueba" > wms_title "Prueba" > wms_timeformat "YYYY-MM-DDTHH, YYYY-MM-DDTHH:MM, > YYYY-MM-DD HH:MM:SS" > wms_onlineresource > "http://sig.cas.gov.co/mapas/prueba?" > wms_srs "EPSG:21892" > END > END #WEB > ... > > > > > GetCapabilities: > > text/plain > application/vnd.ogc.gml > > > xlink:href="http://sig.cas.gov.co/mapas/prueba?"/> > xmlns:xlink="http://www.w3.org/1999/xlink" > xlink:href="http://sig.cas.gov.co/mapas/prueba?"/> > > > > > What is wrong? > > Thanks > > Eduin Yesid Carrillo Vega > yecarrillo at yahoo.com > COLOMBIA > > _________________________________________________________ > Do You Yahoo!? > Informaci?n de Estados Unidos y Am?rica Latina, en Yahoo! Noticias. > Vis?tanos en http://noticias.espanol.yahoo.com > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From superbla3000 at GMX.NET Wed Apr 6 13:36:48 2005 From: superbla3000 at GMX.NET (joerg pfeiffer) Date: Wed, 6 Apr 2005 22:36:48 +0200 Subject: free toscana data Message-ID: hello, I am searching free toscana shape / vector files. Where should I search first? Joerg From yecarrillo at YAHOO.COM Wed Apr 6 13:55:42 2005 From: yecarrillo at YAHOO.COM (Eduin Carrillo) Date: Wed, 6 Apr 2005 15:55:42 -0500 Subject: Identify WMS Layers with ArcGIS In-Reply-To: 6667 Message-ID: Thanks for your reply. I'm trying to implement GetFeatureInfo request serving html as query output. Actually, WMS-server-howto stands "Text/html output using MapServer query templates specified in the CLASS template parameter. The MIME type returned by the Class templates defaults to text/html and can be controlled using the metadata wms_feature_info_mime_type" I was playing with WEB and LAYER(CLASS) templates, with no results. --- Bart van den Eijnden wrote: > Hi Eduin, > > I don't know the current status of WMS in ArcGIS. But it used to be that > only ArcXML is supported for a GetFeatureInfo response (identify), but > Mapserver uses a Mapserver flavour of GML 2. So those two don't match. > > I expect things to get better when both Mapserver and ArcGIS will > implement GML 3 level 0 profile, and the WMS spec will adopt that as the > "standard" for GetFeatureInfo (or at least most WMS services will support > this). > > So probably for now you won't get this to work in the *land of > interoperability*. > > Best regards, > Bart > > On Wed, 6 Apr 2005 14:24:07 -0500, Eduin Carrillo > wrote: > > > I'm trying to "identify" WMS layers in ArcGIS with no resutls. Window > > reports > > "Nothing found" > > > > I'm sure my .map is fine: > > WEB > > MINSCALE 0 > > .. > > TEMPLATE "template.html" > > METADATA > > wms_extent "940000.00000000 1120000.00000000 > > 1211820.35394300 1400000.00000000" > > wms_abstract "Mapa de prueba del servidor WMS" > > wms_encoding "ISO-8859-1" > > wms_opaque "1" > > wms_accesscontraints "none" > > wms_addresstype "mailing address" > > wms_address "Carrera 10 No. 13 - 78" > > wms_city "San Gil" > > wms_stateorprovince "Santander" > > wms_postcode "" > > wms_country "COLOMBIA" > > wms_contactelectronicmailaddress "yecarrillo at cas.gov.co" > > wms_contactfacsimiletelephone "+57+7 7238110" > > wms_contactperson "Eduin Yesid Carrillo Vega" > > wms_contactorganization "Corporaci?n Aut?noma Regional de > > Santander CAS" > > wms_contactposition "Coordinador SIG" > > wms_contactvoicetelephone "+57+7 7236888" > > wms_feature_info_mime_type "text/plain" > > wms_fees "none" > > wms_keywordlist "Prueba" > > wms_title "Prueba" > > wms_timeformat "YYYY-MM-DDTHH, YYYY-MM-DDTHH:MM, > > YYYY-MM-DD HH:MM:SS" > > wms_onlineresource > > "http://sig.cas.gov.co/mapas/prueba?" > > wms_srs "EPSG:21892" > > END > > END #WEB > > ... > > > > > > > > > > GetCapabilities: > > > > text/plain > > application/vnd.ogc.gml > > > > > > > xlink:href="http://sig.cas.gov.co/mapas/prueba?"/> > > > xmlns:xlink="http://www.w3.org/1999/xlink" > > xlink:href="http://sig.cas.gov.co/mapas/prueba?"/> > > > > > > > > > > What is wrong? > > > > Thanks > > > > Eduin Yesid Carrillo Vega > > yecarrillo at yahoo.com > > COLOMBIA > > Eduin Yesid Carrillo Vega yecarrillo at yahoo.com COLOMBIA _________________________________________________________ Do You Yahoo!? Informaci?n de Estados Unidos y Am?rica Latina, en Yahoo! Noticias. Vis?tanos en http://noticias.espanol.yahoo.com From jmalczyk at YAHOO.COM Wed Apr 6 14:00:08 2005 From: jmalczyk at YAHOO.COM (Jeremy Malczyk) Date: Wed, 6 Apr 2005 14:00:08 -0700 Subject: Interpolating a raster layer from a point layer... In-Reply-To: 6667 Message-ID: Is it possible for MaMapServero render a raster layer that is derived entirely from values in a vector (in this case, point) dadatasource For example, I have regularly spaced point data (a grid of sorts), and I want maMapServero color pixels based on the nearest point in that layer (instead of just displaying the point itself as a symbol). The points would be coming in via an OGOGRVRTDataSourcepulling from an ODODBConnection to an MS-SQSQLatabase). So basically I need MaMapservero query the point layer for each pixel in the raster being generated, determine the nearest point, and then classify it according to an attribute of that point. Make sense? If so, can this be done? The point data would be changing rather frequently (daily) so prprecompilinghe raster in a regular GIGISould be impractical. Jeremy __________________________________ Do you Yahoo!? Yahoo! Personals - Better first dates. More second dates. http://personals.yahoo.com From whiting at MAXNET.CO.NZ Wed Apr 6 14:07:04 2005 From: whiting at MAXNET.CO.NZ (Matthew Whiting) Date: Thu, 7 Apr 2005 09:07:04 +1200 Subject: PHP MapScript zoompoint In-Reply-To: <16264e0705040608002924fd70@mail.gmail.com> Message-ID: I don't mind them being private variables and using get/set functions. My frustration was with it not being obvious I couldn't directly assign and with it appearing to have worked when displaying contents of the point. So, I had to gradually disect a working version replacing with my code until I found the lines causing problems! Anyway, on to more exciting coding now... ;o) Cheers Matthew Camden Daily wrote: >It seems that many of the member values of mapscript objects are not >directly accessible. They are only available to be set with the set() >function. I do not know if this is a bug or a design decision, but it >would certainly be nice to make those variables all public. > >-Camden > >On Apr 6, 2005 2:01 AM, Matthew Whiting wrote: > > >> After hours working on this, I finally found the problem. >> >> Setting x and y for the PointObj like this: >> $point->x = $x; >> $point->y = $y; >> does not work. >> >> This does: >> $point->setxy($x,$y); >> >> Why is this a problem? >> >> Interestingly after setting the points explicitly (as opposed to setxy()) >>and then printing the contents, it seems the values are actually set! >> >> Matthew >> Hello all, >> >> Have been trying without success to successfully implement a zoom out >>feature in my application using the zoompoint() function and -2 as the zoom >>factor. For some reason, the image does not end up centred on the point >>clicked on but on a different spot altogether. I'm getting nowhere with >>this. I tried manually changing the extent and this works fine. Any >>suggestions? >> >> Thanks >> Matthew >> >> >> >> >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3182 bytes Desc: S/MIME Cryptographic Signature URL: From jmalczyk at YAHOO.COM Wed Apr 6 14:07:46 2005 From: jmalczyk at YAHOO.COM (Jeremy Malczyk) Date: Wed, 6 Apr 2005 14:07:46 -0700 Subject: Interpolating a raster layer from a point layer... In-Reply-To: 6667 Message-ID: Apologies, Yahoo Mail spell check somehow managed to garble my post. Again: Is it possible for MapServer to render a raster layer that is derived entirely from values in a vector (in this case, point) datasource. For example, I have regularly spaced point data (a grid of sorts), and I want MapServer to color pixels based on the nearest point in that layer (instead of just displaying the point itself as a symbol). The points would be coming in via an OGRVRTDataSource pulling from an ODBC Connection to an MS-SQL database. So basically I need Mapserver to query the point layer for each pixel in the raster being generated, determine the nearest point, and then classify it according to an attribute of that point. Make sense? If so, can this be done? The point data would be changing rather frequently (daily) so precompiling the raster in a regular GIS would be impractical. Jeremy __________________________________ Yahoo! Messenger Show us what our next emoticon should look like. Join the fun. http://www.advision.webevents.yahoo.com/emoticontest From fwarmerdam at GMAIL.COM Wed Apr 6 14:39:37 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Wed, 6 Apr 2005 17:39:37 -0400 Subject: Interpolating a raster layer from a point layer... In-Reply-To: <20050406210746.93703.qmail@web61010.mail.yahoo.com> Message-ID: On Apr 6, 2005 5:07 PM, Jeremy Malczyk wrote: > Apologies, Yahoo Mail spell check somehow managed to garble my post. > > Again: > > Is it possible for MapServer to render a raster layer that is derived entirely from values in a > vector (in this case, point) datasource. > > For example, I have regularly spaced point data (a grid of sorts), and I want MapServer to color > pixels based on the nearest point in that layer (instead of just displaying the point itself as > a symbol). The points would be coming in via an OGRVRTDataSource pulling from an ODBC Connection > to an MS-SQL database. So basically I need Mapserver to query the point layer for each pixel in > the raster being generated, determine the nearest point, and then classify it according to an > attribute of that point. > > Make sense? If so, can this be done? The point data would be changing rather frequently (daily) > so precompiling the raster in a regular GIS would be impractical. Jeremy, There is no support in MapServer (or GDAL/OGR) for on-the-fly interpolation of a grid from point data. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From morten at DOTNETGIS.NET Wed Apr 6 14:59:30 2005 From: morten at DOTNETGIS.NET (Morten Nielsen) Date: Wed, 6 Apr 2005 23:59:30 +0200 Subject: Problems w/ MapScript C# In-Reply-To: A<4250B967.3030505@analygis.com> Message-ID: >I've successfully built the C# Mapscript assembly, and have successfully >written code that generates an image file to disk. Everything seems to >work just fine until I make repeated calls to the map.draw() function. >I get the following exception after 3 or 4 calls to the private member >function drawMapImage(): >System.NullReferenceException: Object reference not set to an instance >of an object. > at mapscriptPINVOKE.mapObj_draw(IntPtr jarg1) > at mapObj.draw() > at SimpleMap.Form1.drawMapImage() I have lately experienced the same problem that Ian has. It seems that the C#/SWIG mapscript is very unstable, no matter whether it's a Windows Application or a web application. Some times it works, sometimes it don't. Sometimes it always works on one machine, but never on another. And sometimes it even crashes the IIS process. I wonder if this also occurs on the Mono-based assemblies. The C# support in SWIG is pretty new, so it could be a SWIG bug, but I wasn't ably to find any that apply in their bug-tracking. Perhaps we should better start looking at the SWIG implementation, although I really wouldn't know where to begin; especially because it's so hard to debug. Pointers to get me started on this are highly appreciated. /Morten Nielsen From dabner at OPTUSNET.COM.AU Wed Apr 6 14:54:15 2005 From: dabner at OPTUSNET.COM.AU (Nick Dabner) Date: Thu, 7 Apr 2005 07:54:15 +1000 Subject: Migrating from 3.64 -> 4.4.1 Tips? Message-ID: Hello, Have just migrated to 4.4.1 mapserver from 3.6.4, as a new mac os x binary has become available. I had a number of working .map files which seem a little problematic and in some situations are actually crashing the cgi mapserv. My .map files are all closely based on the itasca examples and still use nearly identical html and init files. Is there a few general "gotcha's" I need to be aware of? There certainly are a lot of new features, but probably also new ways to do things. Is there an itasca equivalent perhaps? regards, Nick From sgillies at FRII.COM Wed Apr 6 15:37:29 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Wed, 6 Apr 2005 16:37:29 -0600 Subject: Problems w/ MapScript C# In-Reply-To: Message-ID: On Apr 6, 2005, at 3:59 PM, Morten Nielsen wrote: >> I've successfully built the C# Mapscript assembly, and have >> successfully >> written code that generates an image file to disk. Everything seems >> to >> work just fine until I make repeated calls to the map.draw() function. >> I get the following exception after 3 or 4 calls to the private member >> function drawMapImage(): > >> System.NullReferenceException: Object reference not set to an instance >> of an object. >> at mapscriptPINVOKE.mapObj_draw(IntPtr jarg1) >> at mapObj.draw() >> at SimpleMap.Form1.drawMapImage() > > I have lately experienced the same problem that Ian has. It seems that > the > C#/SWIG mapscript is very unstable, no matter whether it's a Windows > Application or a web application. Some times it works, sometimes it > don't. > Sometimes it always works on one machine, but never on another. And > sometimes it even crashes the IIS process. I wonder if this also > occurs on > the Mono-based assemblies. > > The C# support in SWIG is pretty new, so it could be a SWIG bug, but I > wasn't ably to find any that apply in their bug-tracking. Perhaps we > should > better start looking at the SWIG implementation, although I really > wouldn't > know where to begin; especially because it's so hard to debug. > > Pointers to get me started on this are highly appreciated. > > /Morten Nielsen > My impression is that you may be getting ahead of yourselves a bit with your SimpleMap and Form classes. Let's back up a bit. Make the simplest possible mapscript application, and then run the web app under your debugger to find out what the problem actually is. If you can't debug your website, perhaps try with some sort of lightweight multithreading HTTP server. The .NET platform must have something like this. That said, now I am going to take a wild swing :) Any chance that you've overlooked building in the win32 thread support from mapthread.c? It's off by default in MapServer's windows makefile and never really mentioned in any of the win32 installation docs. Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From wannes.vandergucht at UGENT.BE Wed Apr 6 16:07:09 2005 From: wannes.vandergucht at UGENT.BE (wannes Van der Gucht) Date: Wed, 6 Apr 2005 18:07:09 -0500 Subject: PHPMapscript CGI =>trouble Message-ID: Hello, I'm new to mapserver and not familiar with terminal(and compiling). I installed PHP4 on apache2 with a package (serverlogistics) on my Mac (OSX 10.3.8). The package installs PHP as a module, so I installed a PHP executable in the cgi-bin directory and followed the instructions in MapserverWiki:PHPMapScriptCGI. Normally any script with the .phtml extension in the /htdocs/MSrecipes directory will execute as a CGI, but this doesn't work... If I browse to: http://localhost/MSrecipes/hello.phtml I only get the following error: The requested URL /cgi/php/MSrecipes/hello.phtml was not found on this server. Is something wrong with my PHP CGI or my httpd.conf file. I strictly followed the instructions. Any ideas what the problem might be? Thanks From mike.and.kerry at GMAIL.COM Wed Apr 6 17:24:52 2005 From: mike.and.kerry at GMAIL.COM (Mike Davis) Date: Wed, 6 Apr 2005 16:24:52 -0800 Subject: Google maps w/ satellite imagery In-Reply-To: Message-ID: I am curious who on the list has been using an AJAX approach to mapping with mapserver. As users of my web applications discover google maps and the speed at which it delivers imagery, I am starting to hear rumblings about the performance of our in-house applications. Tools or techniques to tile imagery and pre-cache on the client would be especially useful. -Mike On Apr 6, 2005 5:20 AM, Fawcett, David wrote: > Perhaps there is an opportunity (formal or informal) at the MUM 2005 for people to show how they have been using an AJAX-esque approach to MapServer applications. > > David Fawcett > Minnesota Office of Environmental Assistance > david.fawcett at moea.state.mn.us > 651.215.0200 > > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On > Behalf Of Pascoe,Tim [Burlington] > Sent: Wednesday, April 06, 2005 8:01 AM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery > > Take a look at: > > http://adaptivepath.com/publications/essays/archives/000385.php > > I believe this is the technology behind the Google Maps interface. > > Tim > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu] On > Behalf Of Charlton Purvis > Sent: April 6, 2005 8:18 AM > To: MAPSERVER-USERS at lists.umn.edu > Subject: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery > > For those of you who haven't seen it, you're missing out. > http://maps.google.com has satellite imagery that performs > spectacularly. > Enter an address; the satellite option is a link in the upper RH corner > of > that page. > > Even the dingbat public is tuned in to the site, > http://www.cnn.com/2005/TECH/internet/04/05/google.maps.ap/index.html. > > Charlton > From woklist at CHARTER.NET Wed Apr 6 17:29:46 2005 From: woklist at CHARTER.NET (William K) Date: Wed, 6 Apr 2005 19:29:46 -0500 Subject: PHPMapscript CGI =>trouble In-Reply-To: Message-ID: Don't know much about PHP + Apache 2 (or the Serverlogistics distributions of these), but I recall that there are issues with running MapServer in Apache 2. I think? Can someone else say? But, while their PHP and Apache 2 distributions may be fairly up-to-date, that's a very old MapServer. Do you have to use Apache 2? I just recently put together a current MapServer package for Mac OS X. MS 4.4.1, includes both CGI MapServer and PHP-MapScript (for PHP as an Apache module, which I also include). All support libraries included. All made for the stock Apache 1.3.33 that comes with Mac OS 10.3. Check out my MapServer page: . On Apr 6, 2005, at 6:07 PM, wannes Van der Gucht wrote: > Hello, > > I'm new to mapserver and not familiar with terminal(and compiling). I > installed PHP4 on apache2 with a package (serverlogistics) on my Mac > (OSX > 10.3.8). The package installs PHP as a module, so I installed a PHP > executable in the cgi-bin directory and followed the instructions in > MapserverWiki:PHPMapScriptCGI. Normally any script with the .phtml > extension > in the /htdocs/MSrecipes directory will execute as a CGI, but this > doesn't > work... > ----- William Kyngesburye http://webpages.charter.net/kyngchaos/ "Oh, look, I seem to have fallen down a deep, dark hole. Now what does that remind me of? Ah, yes - life." - Marvin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1479 bytes Desc: not available URL: From stigmata_blackangel at YAHOO.COM Wed Apr 6 18:04:03 2005 From: stigmata_blackangel at YAHOO.COM (Gregor Mosheh) Date: Wed, 6 Apr 2005 18:04:03 -0700 Subject: PHPMapscript CGI =>trouble In-Reply-To: 6667 Message-ID: Under FreeBSD, I had real problems with Apache2 and PHP/MapScript, even when PHP was used as a CGI. I definitely recommend using Apache 1. However, it sounds like Wannes has some more basic PHP trouble. Wannes, can you run any non-MapScript PHP stuff in that same directory? Or do all .phtml scripts give you that same error? You (William) mention that your distro for OSX includes PHP/MS as a Apache module. I hadn't heard that this was considered stable yet - Did I miss the great news? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From nacional at CBS.UMN.EDU Wed Apr 6 19:41:25 2005 From: nacional at CBS.UMN.EDU (Pericles S. Nacionales) Date: Wed, 6 Apr 2005 21:41:25 -0500 Subject: Migrating from 3.64 -> 4.4.1 Tips? In-Reply-To: <359924ab7edd926abd8a774fbd2363a7@optusnet.com.au> Message-ID: This is what you're looking for: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?MigrationGuide It's a guide for moving from 3.6 to 4.0 but should work with 4.4 as well. Cheers! Perry On Thu, 2005-04-07 at 07:54 +1000, Nick Dabner wrote: > Hello, > > Have just migrated to 4.4.1 mapserver from 3.6.4, as a new mac os x > binary has become available. > > I had a number of working .map files which seem a little problematic > and in some situations are actually crashing the cgi mapserv. > > My .map files are all closely based on the itasca examples and still > use nearly identical html and init files. > > Is there a few general "gotcha's" I need to be aware of? There > certainly are a lot of new features, but probably also new ways to do > things. Is there an itasca equivalent perhaps? > > regards, > > Nick From Wannes.VanderGucht at UGENT.BE Wed Apr 6 20:17:30 2005 From: Wannes.VanderGucht at UGENT.BE (Wannes Van der Gucht) Date: Thu, 7 Apr 2005 05:17:30 +0200 Subject: PHPMapscript CGI =>trouble In-Reply-To: Message-ID: At first I was running mapserver on the stock Apache 1.3.33 that comes with Mac OS 10.3., but because that was not working I installed Apache 2. The itasca demo (Mapserver 3.6.4) was working, but when I tried the MSrecipes demo from (http://www.mobilegeographics.com/mapserver/) it didn't work. (The requested URL /cgi/php/MSrecipes/hello.phtml was not found on this server) Trying to solve the problem I switched back to Apache 1.3.33 and installed the package at charter.net (after removing previous Mapserver 3.6.4). But now I get the following error when I try the demo from http://mapserver.gis.umn.edu/dload.html: The server encountered an internal error or misconfiguration and was unable to complete your request. Something wrong with the config file? I removed PHP4 and Mapserver, got a clean httpd.conf file and re-installed PHP4(entropy package) and Mapserver 4.4.1 (charter.net package). I thought that would work but I still get the same error! Am I in trouble?! Citeren William K : > Don't know much about PHP + Apache 2 (or the Serverlogistics > distributions of these), but I recall that there are issues with > running MapServer in Apache 2. I think? Can someone else say? > > But, while their PHP and Apache 2 distributions may be fairly > up-to-date, that's a very old MapServer. Do you have to use Apache 2? > I just recently put together a current MapServer package for Mac OS X. > MS 4.4.1, includes both CGI MapServer and PHP-MapScript (for PHP as an > Apache module, which I also include). All support libraries included. > All made for the stock Apache 1.3.33 that comes with Mac OS 10.3. > > Check out my MapServer page: > . > > > On Apr 6, 2005, at 6:07 PM, wannes Van der Gucht wrote: > > > Hello, > > > > I'm new to mapserver and not familiar with terminal(and compiling). I > > installed PHP4 on apache2 with a package (serverlogistics) on my Mac > > (OSX > > 10.3.8). The package installs PHP as a module, so I installed a PHP > > executable in the cgi-bin directory and followed the instructions in > > MapserverWiki:PHPMapScriptCGI. Normally any script with the .phtml > > extension > > in the /htdocs/MSrecipes directory will execute as a CGI, but this > > doesn't > > work... > > > > ----- > William Kyngesburye > http://webpages.charter.net/kyngchaos/ > > "Oh, look, I seem to have fallen down a deep, dark hole. Now what does > that remind me of? Ah, yes - life." > > - Marvin > -- From ed at TOPOZONE.COM Wed Apr 6 20:21:11 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Wed, 6 Apr 2005 23:21:11 -0400 Subject: Google maps w/ satellite imagery Message-ID: Mike - Well, TopoZone is a MapServer user who STOPPED using tiled imagery several years ago. We went the other way, from a pre-tiled proprietary map image server to using pretty plain vanilla MapServer maps. It all depends on the application. What I'll call "TerraServer-style" tiled images (since they're the first implementation I know of, in 1998) are fast, and they provide good incremental drawing feedback - you know something's happening because you see the image appear in pieces. To get that, you give up arbitrary zoom scales (they're all precomputed) and you give up the ability to center the map on any point. DHTML has fixed the latter problem at the cost of some wasted bandwidth, since you're downloading images you don't display and may never display. The precomputed tiles also create a data management problem, since you need to reprocess the imagery when you get updates, and that can be just a bit tricky. Depending on your update frequency and size, this may not be an issue. Google's approach also wastes a lot of bandwidth downloading data that's never used. I do not know if that is related to the fact that I've been getting lots of broken-link images from Google's "satellite" imagery. You also don't see any UI on Google to turn those various data layers on and off, right? Sure, that could be done the same way, but you need to balance the precomputing overhead with the degree of user control over the map rendering. If you're going to give the user many options for controlling the map display, and do that with a large geographic area, it might not be worth it. As in most things in life, there are tradeoffs. One of my favorite bits of professional advice came from a former manager of mine who observed, "All of your problems are caused by solutions." - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Mike Davis Sent: Wednesday, April 06, 2005 8:25 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery I am curious who on the list has been using an AJAX approach to mapping with mapserver. As users of my web applications discover google maps and the speed at which it delivers imagery, I am starting to hear rumblings about the performance of our in-house applications. Tools or techniques to tile imagery and pre-cache on the client would be especially useful. -Mike On Apr 6, 2005 5:20 AM, Fawcett, David wrote: > Perhaps there is an opportunity (formal or informal) at the MUM 2005 for people to show how they have been using an AJAX-esque approach to MapServer applications. > > David Fawcett > Minnesota Office of Environmental Assistance > david.fawcett at moea.state.mn.us 651.215.0200 > > > -----Original Message----- > From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On > Behalf Of Pascoe,Tim [Burlington] > Sent: Wednesday, April 06, 2005 8:01 AM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery > > Take a look at: > > http://adaptivepath.com/publications/essays/archives/000385.php > > I believe this is the technology behind the Google Maps interface. > > Tim > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu] > On Behalf Of Charlton Purvis > Sent: April 6, 2005 8:18 AM > To: MAPSERVER-USERS at lists.umn.edu > Subject: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery > > For those of you who haven't seen it, you're missing out. > http://maps.google.com has satellite imagery that performs > spectacularly. > Enter an address; the satellite option is a link in the upper RH > corner of that page. > > Even the dingbat public is tuned in to the site, > http://www.cnn.com/2005/TECH/internet/04/05/google.maps.ap/index.html. > > Charlton > From woklist at CHARTER.NET Wed Apr 6 21:08:33 2005 From: woklist at CHARTER.NET (William K) Date: Wed, 6 Apr 2005 23:08:33 -0500 Subject: PHPMapscript CGI =>trouble In-Reply-To: Message-ID: On Apr 6, 2005, at 8:04 PM, Gregor Mosheh wrote: > Under FreeBSD, I had real problems with Apache2 and > PHP/MapScript, even when PHP was used as a CGI. I > definitely recommend using Apache 1. > > However, it sounds like Wannes has some more basic PHP > trouble. Wannes, can you run any non-MapScript PHP > stuff in that same directory? Or do all .phtml scripts > give you that same error? > > You (William) mention that your distro for OSX > includes PHP/MS as a Apache module. I hadn't heard > that this was considered stable yet - Did I miss the > great news? > I guess I'm a bit of an optimist. I jumped right in when the config option was made official/working (instead of being disabled forever). And on OS X, it's a plus, since the Apple-supplied PHP is an Apache module. Tho, I go and make my own PHP anyways to add other features... So far I haven't had any troubles with PHP-MapScript for PHP as an Apache module. Now that I have this distribution, and when I get enough feedback on how it's working, I _may_ make another for PHP as CGI, tho that would mean making an extra PHP installer also. ----- William Kyngesburye Mapping Specialists Don't Panic -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1276 bytes Desc: not available URL: From dmorissette at DMSOLUTIONS.CA Wed Apr 6 21:10:27 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Thu, 7 Apr 2005 00:10:27 -0400 Subject: PHP MapScript zoompoint In-Reply-To: <16264e0705040608002924fd70@mail.gmail.com> Message-ID: Camden Daily wrote: > It seems that many of the member values of mapscript objects are not > directly accessible. They are only available to be set with the set() > function. I do not know if this is a bug or a design decision, but it > would certainly be nice to make those variables all public. > You need to use the set() methods to set any member variables in PHP MapScript objects. This is because PHP MapScript objects are just PHP wrappers on top of the MapServer C structures, and when you set the variables explicitly using $point->x=1; then the value in the PHP wrapper is set, but the value is not propagated to the lower-level object inside MapServer because there was no way in PHP 4 to trap a change to an object member variable. In PHP5 this has been fixed, it will be possible to have callbacks (internally) to catch the change to the member variables and we'll be able to get rid of the set() methods... but this has not been implemented yet for PHP MapScript. Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette at dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From richard.greenwood at GMAIL.COM Wed Apr 6 21:02:27 2005 From: richard.greenwood at GMAIL.COM (Richard Greenwood) Date: Thu, 7 Apr 2005 04:02:27 +0000 Subject: =?utf-8?b?W1VNTl9NQVBTRVJWRVItVVNFUlNd?= free raster tiling tools Message-ID: Nuno Gil GMAIL.COM> writes: > > Dear listers, > I need to tile and resample large raster files. Instead of using arc > or some proprietary software I was looking for an open source > alternative. > Any idea??? > Regards, > Nuno As Frank pointed out, GDAL offers excellent tools for tiling and resampling from the command line and via a scripting language of your choice. GRASS (with some notable help from GDAL) also provides great tools for tiling and resampling in a graphic (visual) environment, and also supports scripting. And there's OSSIM, which I have no experience with but which might be a good bettoo. Let us know what you learn. Rich From whiting at MAXNET.CO.NZ Wed Apr 6 21:25:16 2005 From: whiting at MAXNET.CO.NZ (Matthew Whiting) Date: Thu, 7 Apr 2005 16:25:16 +1200 Subject: PHP MapScript zoompoint In-Reply-To: <4254B2B3.4060506@dmsolutions.ca> Message-ID: Thanks Daniel, That explains things! Exactly the explanation my colleague suggested. Cheers Matthew Daniel Morissette wrote: > Camden Daily wrote: > >> It seems that many of the member values of mapscript objects are not >> directly accessible. They are only available to be set with the set() >> function. I do not know if this is a bug or a design decision, but it >> would certainly be nice to make those variables all public. >> > > You need to use the set() methods to set any member variables in PHP > MapScript objects. This is because PHP MapScript objects are just PHP > wrappers on top of the MapServer C structures, and when you set the > variables explicitly using $point->x=1; then the value in the PHP > wrapper is set, but the value is not propagated to the lower-level > object inside MapServer because there was no way in PHP 4 to trap a > change to an object member variable. > > In PHP5 this has been fixed, it will be possible to have callbacks > (internally) to catch the change to the member variables and we'll be > able to get rid of the set() methods... but this has not been > implemented yet for PHP MapScript. > > Daniel > -- > ------------------------------------------------------------ > Daniel Morissette dmorissette at dmsolutions.ca > DM Solutions Group http://www.dmsolutions.ca/ > ------------------------------------------------------------ > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3182 bytes Desc: S/MIME Cryptographic Signature URL: From woklist at CHARTER.NET Wed Apr 6 21:57:09 2005 From: woklist at CHARTER.NET (William K) Date: Wed, 6 Apr 2005 23:57:09 -0500 Subject: PHPMapscript CGI =>trouble In-Reply-To: Message-ID: This is the sort of feedback I need to tune my distribution. So far it's been tested on a few clean Mac OS X systems (10.3.8). A few things I can think of- - when you installed my mapserver package, you also installed my PHP, gislibs, graphicslibs and postgres? My PHP probably isn't required - mapserver doesn't link directly to PHP - but if you use an alternate PHP, it should be installed in the same default location as in the PHP source: /usr/local/php. I think entropy's PHP does, but I haven't verified that yet. And the PHP extension folder should be 'extensions/no-debug-non-zts-20020429' in there. Even if you don't use postgres, both my PHP and MapServer are linked to it, as well as GDAL. You don't need to run postgres, just install it. - check the phpinfo() listing to make sure that php and mapscript are loading. I have an example in the PHP and MapServer readmes, but here's a recap - make a file testphp.php in your home/Sites folder with: Point Safari at localhost/~[your_user_name]/phptest.php and you should see all the gorey details of PHP's configuration, and in there should be a MapScript section. - Apple's httpd.conf is set up to use .php as the file extension for PHP files, not phtml. Try changing the example files to .php. On Apr 6, 2005, at 10:17 PM, Wannes Van der Gucht wrote: > At first I was running mapserver on the stock Apache 1.3.33 that comes > with Mac > OS 10.3., but because that was not working I installed Apache 2. The > itasca demo > (Mapserver 3.6.4) was working, but when I tried the MSrecipes demo from > (http://www.mobilegeographics.com/mapserver/) it didn't work. (The > requested URL > /cgi/php/MSrecipes/hello.phtml was not found on this server) > > Trying to solve the problem I switched back to Apache 1.3.33 and > installed the > package at charter.net (after removing previous Mapserver 3.6.4). But > now I get > the following error when I try the demo from > http://mapserver.gis.umn.edu/dload.html: > > The server encountered an internal error or misconfiguration and was > unable to > complete your request. > > Something wrong with the config file? I removed PHP4 and Mapserver, > got a clean > httpd.conf file and re-installed PHP4(entropy package) and Mapserver > 4.4.1 > (charter.net package). I thought that would work but I still get the > same error! > Am I in trouble?! > > Citeren William K : > >> Don't know much about PHP + Apache 2 (or the Serverlogistics >> distributions of these), but I recall that there are issues with >> running MapServer in Apache 2. I think? Can someone else say? >> >> But, while their PHP and Apache 2 distributions may be fairly >> up-to-date, that's a very old MapServer. Do you have to use Apache 2? >> I just recently put together a current MapServer package for Mac OS X. >> MS 4.4.1, includes both CGI MapServer and PHP-MapScript (for PHP as an >> Apache module, which I also include). All support libraries included. >> All made for the stock Apache 1.3.33 that comes with Mac OS 10.3. >> >> Check out my MapServer page: >> . ----- William Kyngesburye http://webpages.charter.net/kyngchaos/ Theory of the Universe There is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarrely inexplicable. There is another theory which states that this has already happened. -Hitchhiker's Guide to the Galaxy 2nd season intro -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 3709 bytes Desc: not available URL: From woklist at CHARTER.NET Wed Apr 6 22:05:25 2005 From: woklist at CHARTER.NET (William K) Date: Thu, 7 Apr 2005 00:05:25 -0500 Subject: PHPMapscript CGI =>trouble In-Reply-To: Message-ID: Sorry, the default PHP install, that I use, is /usr/local. Entropy uses /use/local/php, to better encapsulate it. So theirs won't work, unless you can figure out where to manually install the mapscript file into their php. On Apr 6, 2005, at 11:57 PM, William K wrote: > - when you installed my mapserver package, you also installed my PHP, > gislibs, graphicslibs and postgres? My PHP probably isn't required - > mapserver doesn't link directly to PHP - but if you use an alternate > PHP, it should be installed in the same default location as in the PHP > source: /usr/local/php. I think entropy's PHP does, but I haven't > verified that yet. And the PHP extension folder should be > 'extensions/no-debug-non-zts-20020429' in there. Even if you don't use > postgres, both my PHP and MapServer are linked to it, as well as GDAL. > You don't need to run postgres, just install it. ----- William Kyngesburye http://webpages.charter.net/kyngchaos/ "I ache, therefore I am. Or in my case - I am, therefore I ache." - Marvin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1095 bytes Desc: not available URL: From whiting at MAXNET.CO.NZ Wed Apr 6 22:20:47 2005 From: whiting at MAXNET.CO.NZ (Matthew Whiting) Date: Thu, 7 Apr 2005 17:20:47 +1200 Subject: ZOOM IN Message-ID: I now successfully have my app zooming in and out. However, an issue I have still to resolve is that when one zooms in, at a certain level (not always consistent), the background becomes grayed out. Wondering if anyone else has had this sort of issue? Any suggestions. Cheers Matthew -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3182 bytes Desc: S/MIME Cryptographic Signature URL: From whiting at MAXNET.CO.NZ Wed Apr 6 22:34:26 2005 From: whiting at MAXNET.CO.NZ (Matthew Whiting) Date: Thu, 7 Apr 2005 17:34:26 +1200 Subject: unexpected exception Message-ID: I'm using the jbox applet and every now and then the browser window suddenly closes and an error file with the following contents gets dumped on the desktop. Anyone seen this before? Also, any thoughts on which is better for using with php mapscript - jbox or rosa or... ? Thanks Matthew ================================================= An unexpected exception has been detected in native code outside the VM. Unexpected Signal : unknown exception code occurred at PC=0x77E73887 Function=RaiseException+0x50 Library=C:\Windows\system32\kernel32.dll Current Java thread: at sun.plugin.javascript.ocx.JSObject.nativeInvoke(Native Method) at sun.plugin.javascript.ocx.JSObject.invoke(Unknown Source) - locked <05411948> (a sun.plugin.javascript.ocx.JSObject) at sun.plugin.javascript.ocx.JSObject.getMember(Unknown Source) at sun.plugin.javascript.ocx.JSObject.eval(Unknown Source) at evalThread.run(Unknown Source) Dynamic libraries: 0x00400000 - 0x00419000 C:\Program Files\Internet Explorer\iexplore.exe 0x77F50000 - 0x77FF7000 C:\Windows\System32\ntdll.dll 0x77E60000 - 0x77F46000 C:\Windows\system32\kernel32.dll 0x77C10000 - 0x77C63000 C:\Windows\system32\msvcrt.dll 0x77D40000 - 0x77DCC000 C:\Windows\system32\USER32.dll 0x7E090000 - 0x7E0D1000 C:\Windows\system32\GDI32.dll 0x77DD0000 - 0x77E5D000 C:\Windows\system32\ADVAPI32.dll 0x78000000 - 0x78087000 C:\Windows\system32\RPCRT4.dll 0x70A70000 - 0x70AD5000 C:\Windows\system32\SHLWAPI.dll 0x71700000 - 0x71849000 C:\Windows\System32\SHDOCVW.dll 0x71950000 - 0x71A34000 C:\Windows\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll 0x773D0000 - 0x77BC2000 C:\Windows\system32\SHELL32.dll 0x77340000 - 0x773CB000 C:\Windows\system32\comctl32.dll 0x771B0000 - 0x772D4000 C:\Windows\system32\ole32.dll 0x5AD70000 - 0x5ADA4000 C:\Windows\System32\uxtheme.dll 0x74720000 - 0x74764000 C:\Windows\System32\MSCTF.dll 0x71500000 - 0x715FD000 C:\Windows\System32\BROWSEUI.dll 0x72430000 - 0x72442000 C:\Windows\System32\browselc.dll 0x75F40000 - 0x75F5F000 C:\Windows\system32\appHelp.dll 0x7C890000 - 0x7C911000 C:\Windows\System32\CLBCATQ.DLL 0x77120000 - 0x771AB000 C:\Windows\system32\OLEAUT32.dll 0x77050000 - 0x77115000 C:\Windows\System32\COMRes.dll 0x77C00000 - 0x77C07000 C:\Windows\system32\VERSION.dll 0x63000000 - 0x63096000 C:\Windows\system32\WININET.dll 0x762C0000 - 0x76348000 C:\Windows\system32\CRYPT32.dll 0x762A0000 - 0x762B0000 C:\Windows\system32\MSASN1.dll 0x76F90000 - 0x76FA0000 C:\Windows\System32\Secur32.dll 0x76620000 - 0x7666E000 C:\Windows\System32\cscui.dll 0x76600000 - 0x7661B000 C:\Windows\System32\CSCDLL.dll 0x76670000 - 0x76757000 C:\Windows\System32\SETUPAPI.dll 0x10000000 - 0x1000C000 C:\Program Files\Adobe\Acrobat 6.0\Reader\ActiveX\AcroIEHelper.dll 0x1A400000 - 0x1A47A000 C:\Windows\system32\urlmon.dll 0x63580000 - 0x63830000 C:\Windows\System32\mshtml.dll 0x75E90000 - 0x75F37000 C:\Windows\System32\SXS.DLL 0x76170000 - 0x761F8000 C:\Windows\System32\shdoclc.dll 0x74770000 - 0x747FF000 C:\Windows\System32\MLANG.dll 0x513E0000 - 0x5140D000 C:\Program Files\Common Files\Microsoft Shared\VS7Debug\pdm.dll 0x51300000 - 0x51328000 C:\Program Files\Common Files\Microsoft Shared\VS7Debug\msdbg2.dll 0x01A00000 - 0x01C01000 C:\Windows\System32\msi.dll 0x746F0000 - 0x74716000 C:\WINDOWS\System32\msimtf.dll 0x746C0000 - 0x746E7000 C:\Windows\System32\MSLS31.DLL 0x76390000 - 0x763AC000 C:\Windows\System32\IMM32.DLL 0x32520000 - 0x32532000 C:\Program Files\Microsoft Office\Office10\msohev.dll 0x71AD0000 - 0x71AD8000 C:\Windows\System32\wsock32.dll 0x71AB0000 - 0x71AC4000 C:\Windows\System32\WS2_32.dll 0x71AA0000 - 0x71AA8000 C:\Windows\System32\WS2HELP.dll 0x71A50000 - 0x71A8B000 C:\Windows\system32\mswsock.dll 0x71A90000 - 0x71A98000 C:\Windows\System32\wshtcpip.dll 0x76EE0000 - 0x76F17000 C:\Windows\System32\RASAPI32.DLL 0x76E90000 - 0x76EA1000 C:\Windows\System32\rasman.dll 0x71C20000 - 0x71C6E000 C:\Windows\System32\NETAPI32.dll 0x76EB0000 - 0x76EDB000 C:\Windows\System32\TAPI32.dll 0x76E80000 - 0x76E8D000 C:\Windows\System32\rtutils.dll 0x76B40000 - 0x76B6C000 C:\Windows\System32\WINMM.dll 0x6BD00000 - 0x6BD0D000 C:\Windows\System32\SYNCOR11.DLL 0x722B0000 - 0x722B5000 C:\Windows\System32\sensapi.dll 0x75A70000 - 0x75B15000 C:\Windows\system32\USERENV.dll 0x0FFD0000 - 0x0FFF3000 C:\WINDOWS\System32\rsaenh.dll 0x76F20000 - 0x76F45000 C:\Windows\System32\DNSAPI.dll 0x76FB0000 - 0x76FB7000 C:\Windows\System32\winrnr.dll 0x76F60000 - 0x76F8C000 C:\Windows\system32\WLDAP32.dll 0x76FC0000 - 0x76FC5000 C:\Windows\System32\rasadhlp.dll 0x76C00000 - 0x76C2D000 C:\Windows\System32\credui.dll 0x5E0C0000 - 0x5E0CC000 C:\Windows\System32\pstorec.dll 0x76B20000 - 0x76B35000 C:\Windows\System32\ATL.DLL 0x6B700000 - 0x6B790000 C:\WINDOWS\System32\jscript.dll 0x029A0000 - 0x029B5000 C:\Program Files\Java\j2re1.4.0\bin\npjpi140.dll 0x029C0000 - 0x029DC000 C:\Program Files\Java\j2re1.4.0\bin\beans.ocx 0x029E0000 - 0x029F5000 C:\Program Files\Java\j2re1.4.0\bin\jpishare.dll 0x6D330000 - 0x6D442000 C:\PROGRA~1\Java\J2RE14~1.0\bin\client\jvm.dll 0x6D1D0000 - 0x6D1D7000 C:\PROGRA~1\Java\J2RE14~1.0\bin\hpi.dll 0x6D300000 - 0x6D30D000 C:\PROGRA~1\Java\J2RE14~1.0\bin\verify.dll 0x6D210000 - 0x6D228000 C:\PROGRA~1\Java\J2RE14~1.0\bin\java.dll 0x6D320000 - 0x6D32D000 C:\PROGRA~1\Java\J2RE14~1.0\bin\zip.dll 0x66880000 - 0x6688A000 C:\Windows\System32\imgutil.dll 0x5E310000 - 0x5E31B000 C:\Windows\System32\pngfilt.dll 0x6D000000 - 0x6D0F6000 C:\Program Files\Java\j2re1.4.0\bin\awt.dll 0x73000000 - 0x73023000 C:\Windows\System32\WINSPOOL.DRV 0x6D180000 - 0x6D1D0000 C:\Program Files\Java\j2re1.4.0\bin\fontmanager.dll 0x69000000 - 0x695EF000 C:\Windows\System32\atioglxx.dll 0x51000000 - 0x51047000 C:\Windows\System32\ddraw.dll 0x73BC0000 - 0x73BC6000 C:\Windows\System32\DCIMAN32.dll 0x6D2D0000 - 0x6D2DD000 C:\Program Files\Java\j2re1.4.0\bin\net.dll 0x0FFB0000 - 0x0FFBA000 C:\Program Files\Java\j2re1.4.0\bin\packager.dll 0x74CB0000 - 0x74D1F000 C:\WINDOWS\System32\mshtmled.dll 0x76C90000 - 0x76CB2000 C:\Windows\system32\imagehlp.dll 0x6D510000 - 0x6D58D000 C:\Windows\system32\DBGHELP.dll 0x76BF0000 - 0x76BFB000 C:\Windows\System32\PSAPI.DLL Local Time = Thu Apr 07 13:02:43 2005 Elapsed Time = 692 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.0-b92 mixed mode) # -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3182 bytes Desc: S/MIME Cryptographic Signature URL: From chatterjee_sharmistha2 at REDIFFMAIL.COM Wed Apr 6 23:24:14 2005 From: chatterjee_sharmistha2 at REDIFFMAIL.COM (Sharmistha Chatterjee) Date: Thu, 7 Apr 2005 06:24:14 -0000 Subject: query on map using php-mapscript Message-ID: Respected Sir/Madam, can someone plz send me the deatails that how can i perform a query option in map by php-mapscript like how can i show the attributes of a area selected by user its very urgent thanks and regards sharmistha ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From hetzerrr at GMAIL.COM Thu Apr 7 00:01:54 2005 From: hetzerrr at GMAIL.COM (John Novak) Date: Thu, 7 Apr 2005 00:01:54 -0700 Subject: Mapserver 4.4.1 /POSTGIS 0.8/PostgreSQL 7.4.3 query performance puzzler In-Reply-To: <1112805563.425410bb86a14@webmail.univali.br> Message-ID: Thanks for the feedback and suggestions. It is certainly true that something different is happening when using a cursor. Using pgAdmin, explain is reporting identical plans both with and without the cursor even though executions times are radically different. I managed to get response times reasonable by experimenting with several table index designs so this was certainly caused by a table scan. The unique oid clause had no measurable effect on the query time, but it's possible that the table scan time was so much larger that its effect was relatively small. On Apr 6, 2005 9:39 AM, Fernando Simon wrote: > Hi all, > I saw this problem in client test, but was a problem with data > definition. I don`t know if is your case but I believe that this > hints can help you. > Here the client defined this data query: "the_geom from (SELECT > regiao.the_geom AS the_geom, fundo.no_programa AS no_programa, > fundo.nu_ano AS ano, fundo.vl_pago AS vl_pago FROM regiao inner join > fundo on regiao.co_ibge = fundo.co_ibge and no_programa = 'PAB FIXO' > and fundo.nu_ano = 2004 and regiao.co_ibge <= 150000 and > regiao.co_ibge >= 140000) as pab_fixo using unique regiao.oid using > srid=4291" > But this query needed 55s to finish, and when I used the psql to > run the asbinary query the results appear in 3s. > The problem was with the UNIQUE parameter. The right data > definition was: the_geom from (SELECT regiao.the_geom AS the_geom, > regiao.oid as oid, fundo.no_programa AS no_programa, fundo.nu_ano AS > ano, fundo.vl_pago AS vl_pago FROM regiao inner join fundo on > regiao.co_ibge = fundo.co_ibge and no_programa = 'PAB FIXO' and > fundo.nu_ano = 2004 and regiao.co_ibge <= 150000 and regiao.co_ibge > >=140000) as pab_fixo using unique oid using srid=4291. And now the > results appear in 5s. > Thanks for all. > > ------------------------------------------------------------------------ > Fernando Simon > Mapserver and Oracle Spatial developer > G10 - Laboratorio de Computacao Aplicada - Brazil > http://g10.cttmar.univali.br - UNIVALI/CTTMAR > ------------------------------------------------------------------------ > > Citando Bill Binko : > > > On Wed, 6 Apr 2005, John Novak wrote: > > > > > > A trace from PostgreSQL shows the following SQL block executing > > at the server: > > > > > > begin; DECLARE mycursor CURSOR FOR SELECT > > > > > > asbinary(force_collection(force_2d(mapdata2.the_geom)),'NDR'),OID::text > > from > > > (select mc.the_geom, mc.oid as oid from > > > products_components as pc, mapdata as mc where pc.products_id > 0 > > and > > > pc.roll = mc.roll and pc.frame = mc.frame) as mapdata2 > > > WHERE mapcat2.the_geom && setSRID('BOX3D(-84.6 35.4625,-69.6 > > > 46.7125)'::BOX3D, 4326 ); ; FETCH ALL in mycursor; commit > > > > > ... > > > > > > Running just the SELECT asbinary ? in PgAdmin III shows a 516ms > > response > > > including data transfer, so something related to the FETCH ALL is > > causing > > > the problem. I suspect I have the server badly tuned as most > > parameters are > > > still at installation default values. Running the entire block > > replicates > > > the very sad behavior. > > > > I am no PostGIS expert, but I had a similar problem recently. It > > seems > > that Postgresql uses different query optimization routines for the > > two > > types of queries. I solved my problem (with help from a stray > > comment on > > postGIS's site) by changing this parameter in postgresql.conf: > > > > random_page_cost = 2 > > (It was 4). > > > > This made it use the GIST index, where it was doing a full table > > scan. > > > > You can tell which one it's using by running your two queries with > > EXPLAIN > > ANALYZE before them. I would bet that one uses the index and the > > other > > doesn't. > > > > Bill > > > > ------------------------------------------------- > Univali - Webmail - http://webmail.univali.br > From wouter.schaubroeck at GMAIL.COM Thu Apr 7 00:08:43 2005 From: wouter.schaubroeck at GMAIL.COM (Wouter Schaubroeck) Date: Thu, 7 Apr 2005 09:08:43 +0200 Subject: OGR - Virtual Data troubles Message-ID: Hi all, I'm using the VirtualData function (You can find it on the Mapserver Wiki pages) for a .dbf file i have to use. I've used this function for several times now, but this is the first time that it doesn't work. What am i doing wrong? I've tested my virtual.ovf file with the OGRinfo tool, and no problems were reported, i could see all of my data. Many thanks Wouter Schaubroeck This is my .ovf file: (virtual.ovf) C:/program files/apache group/apache2/htdocs/herten/GSM00837.dbf Gsm00837 wkbPoint This is my map file: MAP IMAGETYPE PNG24 EXTENT 165450 227900 166300 230060 SIZE 600 450 SHAPEPATH "Data" SYMBOLSET "symbols.sym" PROJECTION "init=epsg:4313" END LAYER NAME "Herten" TYPE POINT CONNECTIONTYPE OGR CONNECTION "virtual.ovf" DATA "GSM00837" STATUS ON LABELITEM GSM00837 PROJECTION "init=epsg:4313" END CLASS SYMBOL "cir" SIZE 6 COLOR 255 0 0 LABEL SIZE MEDIUM TYPE BITMAP COLOR 0 0 0 END END END END And this is how i call my mapserver /cgi-bin/mapserv.exe?map=C:/Program Files/Apache Group/Apache2/htdocs/herten/herten.map&mode=map -------------- next part -------------- An HTML attachment was scrubbed... URL: From nuri at NUSVIRTUAL.COM Thu Apr 7 00:02:09 2005 From: nuri at NUSVIRTUAL.COM (Nuri) Date: Thu, 7 Apr 2005 02:02:09 -0500 Subject: Complete Mapserver example Message-ID: Hi, Does anyone have a complete Mapserver example? I'm a new user of Mapserver and I found several examples, but any of them runs. Some have wrong .map files, others don't have all templates, others don't have all shape files. Where could I find a complete running example? Thanks. From floerke at DOCTRONIC.DE Thu Apr 7 01:58:21 2005 From: floerke at DOCTRONIC.DE (=?ISO-8859-1?Q?Holger_Fl=F6rke?=) Date: Thu, 7 Apr 2005 10:58:21 +0200 Subject: Problems w/ MapScript C# In-Reply-To: <37a0d8b1d199f747818e54c038bb769d@frii.com> Message-ID: What flag should add to nmake.opt to enable thread support within the win32 mapserver? I saw the compiler Flag USE_THREAD, but is it sufficient? Why is the thread-support off at default? Sean Gillies schrieb: > On Apr 6, 2005, at 3:59 PM, Morten Nielsen wrote: > >>> I've successfully built the C# Mapscript assembly, and have >>> successfully >>> written code that generates an image file to disk. Everything seems >>> to >>> work just fine until I make repeated calls to the map.draw() function. >>> I get the following exception after 3 or 4 calls to the private member >>> function drawMapImage(): >> >> >>> System.NullReferenceException: Object reference not set to an instance >>> of an object. >>> at mapscriptPINVOKE.mapObj_draw(IntPtr jarg1) >>> at mapObj.draw() >>> at SimpleMap.Form1.drawMapImage() >> >> >> I have lately experienced the same problem that Ian has. It seems that >> the >> C#/SWIG mapscript is very unstable, no matter whether it's a Windows >> Application or a web application. Some times it works, sometimes it >> don't. >> Sometimes it always works on one machine, but never on another. And >> sometimes it even crashes the IIS process. I wonder if this also >> occurs on >> the Mono-based assemblies. >> >> The C# support in SWIG is pretty new, so it could be a SWIG bug, but I >> wasn't ably to find any that apply in their bug-tracking. Perhaps we >> should >> better start looking at the SWIG implementation, although I really >> wouldn't >> know where to begin; especially because it's so hard to debug. >> >> Pointers to get me started on this are highly appreciated. >> >> /Morten Nielsen >> > > My impression is that you may be getting ahead of yourselves a bit with > your SimpleMap and Form classes. Let's back up a bit. Make the > simplest possible mapscript application, and then run the web app under > your debugger to find out what the problem actually is. If you can't > debug your website, perhaps try with some sort of lightweight > multithreading HTTP server. The .NET platform must have something like > this. > > That said, now I am going to take a wild swing :) Any chance that > you've overlooked building in the win32 thread support from > mapthread.c? It's off by default in MapServer's windows makefile and > never really mentioned in any of the win32 installation docs. > > Sean > > -- > Sean Gillies > sgillies at frii dot com > http://users.frii.com/sgillies > -- holger floerke d o c t r o n i c email floerke at doctronic.de information publishing + retrieval phone +49 228 92 682 00 http://www.doctronic.de From nbarker at RSINC.COM Thu Apr 7 02:26:13 2005 From: nbarker at RSINC.COM (Norman Barker) Date: Thu, 7 Apr 2005 10:26:13 +0100 Subject: Mapserver temporal WCS working Message-ID: Hi, I have got the temporal search with the WCS working (hacking the perl script at http://maps.dnr.state.mn.us/mapserver_demos/wcs/ thanks, Steve Lime). However I have to specify all the time instants, what I would like to do is wcs_timeposition "2001-01-01T06" wcs_timeperiod "0000-00-00T06" and for the describeCoverage to generate the time values for the whole set defined in the tile index? Also what would be the steps to add other parameters to query on (as per the WCS spec), at the moment we can query on bands (which is cool), but I would like to define a parameter called ozone (say) and query e.g http://myserver.com/?REQUEST=GetCoverage&Coverage=experiment1¶meter=ozone..... for example If I can be granted access to edit the wiki, I would like to write a more hands on guide to setting up the WCS for the faint of heart if you are interested? Many thanks, interesting times for implementations of WCSs. Norman From james at DANISAT.NET Thu Apr 7 02:15:42 2005 From: james at DANISAT.NET (James Anderson) Date: Thu, 7 Apr 2005 11:15:42 +0200 Subject: Mapserver SVG output Message-ID: Hi, I am having this problem with mapserver trying it get it to make svg output: In browser the mapfile produces: loadOutputFormat(): General error message. OUTPUTFORMAT clause references driver svg, but this driver isn't configured. How do I configure the svg driver? Can anyone please help ? Thanks, James. My Mapserver info: ./mapserv -v MapServer version 4.5 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE ---------------------------------------------------------------------------------------------------- Map File ........ IMAGETYPE svg STATUS OFF # we don't want a raster map OUTPUTFORMAT NAME svg MIMETYPE "image/svg+xml" DRIVER svg FORMATOPTION "GOSVG=TRUE" FORMATOPTION "GOSVG_ZoomInTH=20" FORMATOPTION "GOSVG_ZoomOutTH=40" FORMATOPTION "GOSVG_ScrollTH=60" END WEB IMAGEPATH "/home/httpd/html/test/temp/" IMAGEURL "/test/temp/" QUERYFORMAT 'image/svg+xml' END ...................... -------------- next part -------------- An HTML attachment was scrubbed... URL: From johannes_schulte_sudhoff at YAHOO.SE Thu Apr 7 02:30:41 2005 From: johannes_schulte_sudhoff at YAHOO.SE (=?iso-8859-1?q?Johannes=20Schulte=20S=FFfffffcdhoff?=) Date: Thu, 7 Apr 2005 11:30:41 +0200 Subject: Problems w/ MapScript C# In-Reply-To: 6667 Message-ID: --- Sean Gillies wrote: > On Apr 6, 2005, at 3:59 PM, Morten Nielsen wrote: > > >> I've successfully built the C# Mapscript > assembly, and have > >> successfully > >> written code that generates an image file to > disk. Everything seems > >> to > >> work just fine until I make repeated calls to the > map.draw() function. > >> I get the following exception after 3 or 4 calls > to the private member > >> function drawMapImage(): > > > >> System.NullReferenceException: Object reference > not set to an instance > >> of an object. > >> at mapscriptPINVOKE.mapObj_draw(IntPtr jarg1) > >> at mapObj.draw() > >> at SimpleMap.Form1.drawMapImage() > > > > I have lately experienced the same problem that > Ian has. It seems that > > the > > C#/SWIG mapscript is very unstable, no matter > whether it's a Windows > > Application or a web application. Some times it > works, sometimes it > > don't. > > Sometimes it always works on one machine, but > never on another. And > > sometimes it even crashes the IIS process. I > wonder if this also > > occurs on > > the Mono-based assemblies. > > > > The C# support in SWIG is pretty new, so it could > be a SWIG bug, but I > > wasn't ably to find any that apply in their > bug-tracking. Perhaps we > > should > > better start looking at the SWIG implementation, > although I really > > wouldn't > > know where to begin; especially because it's so > hard to debug. > > > > Pointers to get me started on this are highly > appreciated. > > > > /Morten Nielsen > > > > My impression is that you may be getting ahead of > yourselves a bit with > your SimpleMap and Form classes. Let's back up a > bit. Make the > simplest possible mapscript application, and then > run the web app under > your debugger to find out what the problem actually > is. If you can't > debug your website, perhaps try with some sort of > lightweight > multithreading HTTP server. The .NET platform must > have something like > this. > > That said, now I am going to take a wild swing :) > Any chance that > you've overlooked building in the win32 thread > support from > mapthread.c? It's off by default in MapServer's > windows makefile and > never really mentioned in any of the win32 > installation docs. Just another wild swing :-). Morten is using the windows binary of the gd library. Doing this you have to compile everything with VC6 and you have to bind the multithreaded dll crt. see the gd faq for more information /Johannes From m.marsella at ITWORKS.IT Thu Apr 7 05:41:45 2005 From: m.marsella at ITWORKS.IT (Marco Marsella) Date: Thu, 7 Apr 2005 14:41:45 +0200 Subject: Point layer without geometry Message-ID: Hi list, I have a (probably silly) request. I need to map a layer consisting of points stored in an old Oracle 8.0.4 database for which no spatial extension is available. In other words, I have latitude and longitude stored a floting point numbers, but the point is not available as a geometry in the database. Is there any way to get this layer mapped ? I do not need geometric queries as the number of points is not very high (~3,000). I cannot move the database to PostGIS or add a geometry column. Would it be possible to generate the geometries on the fly through the SQL query of the DATA element ? If yes, how ? Thank you. Marco Marsella From BEN at SYNCERA-ITSOLUTIONS.NL Thu Apr 7 05:58:04 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Thu, 7 Apr 2005 14:58:04 +0200 Subject: Point layer without geometry Message-ID: Hi Marco, you can try OGR Virtual Spatial Data, see: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?VirtualSpatialData Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Marco Marsella 04/07/05 02:41pm >>> Hi list, I have a (probably silly) request. I need to map a layer consisting of points stored in an old Oracle 8.0.4 database for which no spatial extension is available. In other words, I have latitude and longitude stored a floting point numbers, but the point is not available as a geometry in the database. Is there any way to get this layer mapped ? I do not need geometric queries as the number of points is not very high (~3,000). I cannot move the database to PostGIS or add a geometry column. Would it be possible to generate the geometries on the fly through the SQL query of the DATA element ? If yes, how ? Thank you. Marco Marsella From jmckenna at DMSOLUTIONS.CA Thu Apr 7 06:09:00 2005 From: jmckenna at DMSOLUTIONS.CA (Jeff McKenna) Date: Thu, 7 Apr 2005 09:09:00 -0400 Subject: Complete Mapserver example In-Reply-To: Message-ID: try the "Getting started with MapServer" workshop from the last mapserver meeting: http://www.omsug.ca/osgis2004/proceedings.html jeff Nuri wrote: > Hi, > > Does anyone have a complete Mapserver example? > > I'm a new user of Mapserver and I found several examples, but any of them > runs. Some have wrong .map files, others don't have all templates, others > don't have all shape files. > > Where could I find a complete running example? > > Thanks. > -- Jeff McKenna DM Solutions Group Inc. http://www.dmsolutions.ca From fwarmerdam at GMAIL.COM Thu Apr 7 06:16:16 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Thu, 7 Apr 2005 09:16:16 -0400 Subject: Problems w/ MapScript C# In-Reply-To: <4254F62D.8030000@doctronic.de> Message-ID: On Apr 7, 2005 4:58 AM, Holger Fl?rke wrote: > What flag should add to nmake.opt to enable thread support within the win32 > mapserver? I saw the compiler Flag USE_THREAD, but is it sufficient? Holger, Add -DUSE_THREAD in OPTFLAGS should do the trick to enable the thread locking stuff. > Why is the thread-support off at default? Inherent conservatism? Avoiding the extra thread locking overhead in cases where it isn't needed (it really serves no purpose in MapServer CGI). Johannes says: > Just another wild swing :-). Morten is using the > windows binary of the gd library. Doing this you have > to compile everything with VC6 and you have to bind > the multithreaded dll crt. see the gd faq for more > information This is the default way of building MapServer now (using the binary package and building against MSVCRT.DLL). But you are right that all sorts of problems will occur if you don't do something like this. I would add that in a multithreaded windows situation it is also presumably important to use a multithreaded runtime library. I think this is accomplished by using /MT instead of /MD but I am not so familiar with this and whether it might interfere with the use of MSVCRT.DLL. Ideally we either need a savvy developer on windows who really cares about this multithreaded stuff and is willing to spend time to work out issues, and get them folded back into CVS. Or we need a client who cares enough to finanicially motivate a savvy developer to do all these things. MapServer works well on windows due to the efforts of Assefa and others, but the "dark corners" that don't affect Assefa or I can easily be poorly addressed. This certainly includes multi-threading and of course SWIG bindings like the C# ones. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From sgillies at FRII.COM Thu Apr 7 06:42:43 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Thu, 7 Apr 2005 07:42:43 -0600 Subject: Problems w/ MapScript C# In-Reply-To: Message-ID: On Apr 7, 2005, at 3:30 AM, Johannes Schulte S?fffffcdhoff wrote: > --- Sean Gillies wrote: >> On Apr 6, 2005, at 3:59 PM, Morten Nielsen wrote: >> >>>> I've successfully built the C# Mapscript >> assembly, and have >>>> successfully >>>> written code that generates an image file to >> disk. Everything seems >>>> to >>>> work just fine until I make repeated calls to the >> map.draw() function. >>>> I get the following exception after 3 or 4 calls >> to the private member >>>> function drawMapImage(): >>> >>>> System.NullReferenceException: Object reference >> not set to an instance >>>> of an object. >>>> at mapscriptPINVOKE.mapObj_draw(IntPtr jarg1) >>>> at mapObj.draw() >>>> at SimpleMap.Form1.drawMapImage() >>> >>> I have lately experienced the same problem that >> Ian has. It seems that >>> the >>> C#/SWIG mapscript is very unstable, no matter >> whether it's a Windows >>> Application or a web application. Some times it >> works, sometimes it >>> don't. >>> Sometimes it always works on one machine, but >> never on another. And >>> sometimes it even crashes the IIS process. I >> wonder if this also >>> occurs on >>> the Mono-based assemblies. >>> >>> The C# support in SWIG is pretty new, so it could >> be a SWIG bug, but I >>> wasn't ably to find any that apply in their >> bug-tracking. Perhaps we >>> should >>> better start looking at the SWIG implementation, >> although I really >>> wouldn't >>> know where to begin; especially because it's so >> hard to debug. >>> >>> Pointers to get me started on this are highly >> appreciated. >>> >>> /Morten Nielsen >>> >> >> My impression is that you may be getting ahead of >> yourselves a bit with >> your SimpleMap and Form classes. Let's back up a >> bit. Make the >> simplest possible mapscript application, and then >> run the web app under >> your debugger to find out what the problem actually >> is. If you can't >> debug your website, perhaps try with some sort of >> lightweight >> multithreading HTTP server. The .NET platform must >> have something like >> this. >> >> That said, now I am going to take a wild swing :) >> Any chance that >> you've overlooked building in the win32 thread >> support from >> mapthread.c? It's off by default in MapServer's >> windows makefile and >> never really mentioned in any of the win32 >> installation docs. > > Just another wild swing :-). Morten is using the > windows binary of the gd library. Doing this you have > to compile everything with VC6 and you have to bind > the multithreaded dll crt. see the gd faq for more > information > > /Johannes > Right. Good point, Johannes. Sean From fwarmerdam at GMAIL.COM Thu Apr 7 06:57:08 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Thu, 7 Apr 2005 09:57:08 -0400 Subject: Mapserver SVG output In-Reply-To: <02b001c53b52$6e3f33c0$254726c4@beast> Message-ID: On Apr 7, 2005 5:15 AM, James Anderson wrote: > > Hi, > > I am having this problem with mapserver trying it get it to make svg output: > > In browser the mapfile produces: > loadOutputFormat(): General error message. OUTPUTFORMAT clause references > driver svg, but this driver isn't configured. > > How do I configure the svg driver? > Can anyone please help ? James, I just took a quick look at this and it seems the SVG driver isn't yet built in by default. You need to manually add -DUSE_SVG in your FLAGS macro in the Makefile. I have also committed a change in maperror.c so that OUTPUT=SVG will be reported if SVG support is configured in. Assefa ... is there a reason SVG support isn't enabled by default? Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From raghu at KU.EDU Thu Apr 7 07:02:02 2005 From: raghu at KU.EDU (Shantha, Raghavendra Vasanth) Date: Thu, 7 Apr 2005 09:02:02 -0500 Subject: color palette on a Arc Info Binary Grid (ADF) Message-ID: Thanks Matt.. This guided me in the right direction; I was able to apply a RGB color palette. Here is a mapscript version of adding palettes: # minV, maxV - min, max raster value # N - number of different color levels # lyr - layer object # clso - class object # pal - palette for i in range(0, N): clso.append(mapscript.classObj(lyr)) clsExpr = "([pixel] >= " + str(minV) clsExpr += " and [pixel] <= " + str(minV+incr) + ")" clso[i].setExpression(clsExpr) styleo = mapscript.styleObj(clso[i]) styleo.color.setRGB(p.pal[i][0], p.pal[i][1], p.pal[i][2]) minV += incr Thanks, Raghu -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Matthew Perry Sent: Wednesday, April 06, 2005 11:03 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] color palette on a Arc Info Binary Grid (ADF) Raghu, I've classified ArcInfo GRIDs using CLASS expressions based on the pixel value. Here's a mapfile sample: LAYER NAME "wildlife_habitat" STATUS OFF TYPE RASTER # Folder containing the hdr.adf DATA "kb_veg_grid/kbshr_v10a/" CLASSITEM "[pixel]" CLASS NAME "Mixed Conifer" EXPRESSION ([pixel] < 48 OR [pixel] == 159) COLOR 0 123 27 END CLASS NAME "Conifer/Hardwood" EXPRESSION ([pixel] >= 48 AND [pixel] < 81) COLOR 78 221 0 END .... .... END Hope this helps. I did this manually which was time-consuming given that I had 35+ classes. There *might* be a way to convert your color table (.clr) to classes or have gdal use the .clr directly.... but I will defer to the rest of the list on that one. Good luck, Matt Perry Humboldt State University --- "Shantha, Raghavendra Vasanth" wrote: > Hi, > > I was looking for a way to apply different color > palettes (say shades of > red, green etc) to a gray scale Arc Info Binary Grid > (ADF) Raster file > using mapserver. > > Any ideas as to how I can do this? > > > Thanks, > Raghu > From fwarmerdam at GMAIL.COM Thu Apr 7 07:09:21 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Thu, 7 Apr 2005 10:09:21 -0400 Subject: OGR - Virtual Data troubles In-Reply-To: <4254DC7B.4070406@gmail.com> Message-ID: On Apr 7, 2005 3:08 AM, Wouter Schaubroeck wrote: > Hi all, > > I'm using the VirtualData function (You can find it on the Mapserver Wiki > pages) for a .dbf file i have to use. I've used this function for several > times now, but this is the first time that it doesn't work. What am i doing > wrong? I've tested my virtual.ovf file with the OGRinfo tool, and no > problems were reported, i could see all of my data. Wouter, Your configuration looks fine. Could you be more specific about what goes wrong? Have you tried with DEBUG? Any chance that mapserver doesn't have read permissions on the dbf path? Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From dpinte at ITAE.BE Thu Apr 7 07:13:55 2005 From: dpinte at ITAE.BE (Didrik Pinte) Date: Thu, 7 Apr 2005 16:13:55 +0200 Subject: raster : bad quality in output Message-ID: Hi, I have a problem with rendering rasters... MapServer output is correct but the rendering is not good. The road names aren't readable. When I open the raster file in an image viewer the quality is better. Raster files are GeoTiff files (pack-bits compression). They are defined like this in my map file : LAYER NAME "F_50000" STATUS DEFAULT TILEINDEX "raster/50000.shp" TYPE RASTER MAXSCALE 75000 MINSCALE 35001 PROJECTION "init=epsg:27572" END END The output of Mapserver is PNG24 : OUTPUTFORMAT NAME png24 DRIVER "GD/PNG" MIMETYPE "image/png" IMAGEMODE RGBA EXTENSION "png" FORMATOPTION "INTERLACE=ON" END Has someone a great idea on how I can correct that ? I can put some online samples. Thanks Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Ceci est une partie de message num?riquement sign?e URL: From David.Fawcett at STATE.MN.US Thu Apr 7 07:19:56 2005 From: David.Fawcett at STATE.MN.US (Fawcett, David) Date: Thu, 7 Apr 2005 09:19:56 -0500 Subject: raster : bad quality in output Message-ID: Didrik, This are you explicitly setting the size of the image on your output html page? If so, does it match the size set in your Map file? David. David Fawcett Minnesota Office of Environmental Assistance david.fawcett at moea.state.mn.us 651.215.0200 -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of Didrik Pinte Sent: Thursday, April 07, 2005 9:14 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] raster : bad quality in output Hi, I have a problem with rendering rasters... MapServer output is correct but the rendering is not good. The road names aren't readable. When I open the raster file in an image viewer the quality is better. Raster files are GeoTiff files (pack-bits compression). They are defined like this in my map file : LAYER NAME "F_50000" STATUS DEFAULT TILEINDEX "raster/50000.shp" TYPE RASTER MAXSCALE 75000 MINSCALE 35001 PROJECTION "init=epsg:27572" END END The output of Mapserver is PNG24 : OUTPUTFORMAT NAME png24 DRIVER "GD/PNG" MIMETYPE "image/png" IMAGEMODE RGBA EXTENSION "png" FORMATOPTION "INTERLACE=ON" END Has someone a great idea on how I can correct that ? I can put some online samples. Thanks Didrik From cdaily at GMAIL.COM Thu Apr 7 07:28:52 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Thu, 7 Apr 2005 09:28:52 -0500 Subject: PHP MapScript zoompoint In-Reply-To: <4254B2B3.4060506@dmsolutions.ca> Message-ID: Thanks Daniel for clearing that up. I'd wondered why things were designed that way. Now I'll just have to wait for more people to move over to PHP5 I guess :> -Camden From dpinte at ITAE.BE Thu Apr 7 07:44:35 2005 From: dpinte at ITAE.BE (Didrik Pinte) Date: Thu, 7 Apr 2005 16:44:35 +0200 Subject: raster : bad quality in output In-Reply-To: Message-ID: Le jeudi 07 avril 2005 ? 09:19 -0500, Fawcett, David a ?crit : > Didrik, > > This are you explicitly setting the size of the image on your output html page? If so, does it match the size set in your Map file? > > David. > Hi David, Yes, I think so : Here is the output of my template : And the output of my map file : MAP IMAGETYPE PNG24 DEBUG ON EXTENT 347839 1.7954e+06 402109 1.83667e+06 IMAGECOLOR 255 255 255 SIZE 500 300 STATUS ON SHAPEPATH "/var/www/mapserver/maps" RESOLUTION 96 Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Ceci est une partie de message num?riquement sign?e URL: From BEN at SYNCERA-ITSOLUTIONS.NL Thu Apr 7 08:07:19 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Thu, 7 Apr 2005 17:07:19 +0200 Subject: dBox: box drag not stopping Message-ID: Hi list, I am trying to implement dBox in a website, but I am having a problem: the box won't stop dragging. Does this sound familiar to anybody? What am I doing wrong? I added the following javascript (also the necessary includes ofcourse): var main = new dBox("img"); function setbox_handler(name, minx, miny, maxx, maxy) { document.MapForm.imgbox.value = minx + " " + miny + " " + maxx + " " + maxy; document.MapForm.imgxy.value = minx + " " + miny; document.MapForm.submit(); } function seterror_handler(message) { alert(message); } function reset_handler(name, minx, miny, maxx, maxy) { } function startup() { // Step 4: Initialize the dBox object main.initialize(); } And the following inputs: I call main.boxon() and main.boxoff() at the respective map buttons. Thanks in advance. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl From lolivieri at IMTEAM.IT Thu Apr 7 08:30:08 2005 From: lolivieri at IMTEAM.IT (Leonardo Olivieri) Date: Thu, 7 Apr 2005 17:30:08 +0200 Subject: access to Mapinfo Message-ID: hi, I use PHP/mapscript. Till now I have used shapefile and I succeed in getting information on the shapes. Now I use the file Mapinfo (TAB,MAP,..) and I don't know how to find again information. Is there some example or does someone have some available code? thanks in advance LO -------------- next part -------------- An HTML attachment was scrubbed... URL: From BEN at SYNCERA-ITSOLUTIONS.NL Thu Apr 7 08:34:19 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Thu, 7 Apr 2005 17:34:19 +0200 Subject: access to Mapinfo Message-ID: Hi, you need to use OGR for that: See: http://www.maptools.org/dl/docs/mapserv/MsVectorDataGuide.pdf Just use Mapscript to set the respective properties of the LAYER object. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Leonardo Olivieri 04/07/05 05:30pm >>> hi, I use PHP/mapscript. Till now I have used shapefile and I succeed in getting information on the shapes. Now I use the file Mapinfo (TAB,MAP,..) and I don't know how to find again information. Is there some example or does someone have some available code? thanks in advance LO From ed at TOPOZONE.COM Thu Apr 7 09:00:26 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Thu, 7 Apr 2005 12:00:26 -0400 Subject: raster : bad quality in output Message-ID: Didrik - What I meant was, "are all the pixels in the relevant portion of the input image used exactly once to produce one pixel in the output image"? That is, is the output image a rectangular piece of the original input image at the same size, or is it "zoomed in" or "zoomed out"? Unfortunately, scale ratios are meaningless for digital images without also specifying the output resolution in pixels per physical unit (inch, cm, etc.). It is very likely that the scale ratios of your source images refer to a different resolution than the default 72 pixels per inch that MapServer uses. Can you find out what the intended output resolution of your rasters is? For example, if I tell you that a raster is at 1/50000 scale, I am saying that one cm on the image equals 5 km on the ground. But that obviously depends on the physical resolution at which the image is viewed - if I am viewing it at 50 pixels per cm, then 50 pixels in the image equals 5 km on the gorund. But if I'm viewing it at 100 pixels per cm, then 100 pixels in the image equals 5 km on the ground. You need to know the intended viewing resolution in order to answer this question. If the rasters are scanned images of printed maps, this value would normally be the scan resolution. - Ed P.S. I've copied this reply to the list - please always copy the whole list on discussions so we can all provide input and benefit from the answers. Thanks! Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: Didrik Pinte [mailto:dpinte at itae.be] Sent: Thursday, April 07, 2005 11:29 AM To: Ed McNierney Subject: RE: [UMN_MAPSERVER-USERS] raster : bad quality in output Le jeudi 07 avril 2005 ? 11:11 -0400, Ed McNierney a ?crit : > Didrik - > > Are you displaying the raster images at their full original resolution? > If you are not doing that, MapServer will resample the image using a > fast and simple subsampling algorithm. You'll get the image quickly > but it will be of poorer quality than most image viewers, which will > use high-quality but slower resampling (and often display 8-bit images > in 24-bit space to do that). > > If you're going to need to display these images at non-native > resolution, you should consider resampling them in advance using > high-quality resampling and then using either GDAL overviews in your > TIFF images or create a set of grouped layers with minscale/maxscale > settings to select among them. > > - Ed Hi Ed, That may be the problem. What do you mean exactly by "displaying the raster images at their full original resolution" ? --> I have received rasters for the following scale : - 1/400000 - 1/100000 - 1/50000 - 1/25000 - 1/12500 - 1/6250 - 1/3125 --> for each directory, i've made a tile index of the images and created a MapServer layer with MINSCALE and MAXSCALE choosen for optimal display (for example, the 1/50.000 layer is displayed between 1/75.000 and 1/35.000). Didrik From BEN at SYNCERA-ITSOLUTIONS.NL Thu Apr 7 09:11:37 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Thu, 7 Apr 2005 18:11:37 +0200 Subject: dBox: box drag not stopping Message-ID: Okay found it already, I was using an instead of an which is apparently required. I've got some rewriting to do of the application .... :) Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Bart van den Eijnden 04/07/05 05:07pm >>> Hi list, I am trying to implement dBox in a website, but I am having a problem: the box won't stop dragging. Does this sound familiar to anybody? What am I doing wrong? I added the following javascript (also the necessary includes ofcourse): var main = new dBox("img"); function setbox_handler(name, minx, miny, maxx, maxy) { document.MapForm.imgbox.value = minx + " " + miny + " " + maxx + " " + maxy; document.MapForm.imgxy.value = minx + " " + miny; document.MapForm.submit(); } function seterror_handler(message) { alert(message); } function reset_handler(name, minx, miny, maxx, maxy) { } function startup() { // Step 4: Initialize the dBox object main.initialize(); } And the following inputs: I call main.boxon() and main.boxoff() at the respective map buttons. Thanks in advance. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl From sknutti at SMUMN.EDU Thu Apr 7 09:28:16 2005 From: sknutti at SMUMN.EDU (Scott Knutti) Date: Thu, 7 Apr 2005 11:28:16 -0500 Subject: Customize query results... Message-ID: Has anyone been successful in customizing the results of a query using the Chameleon Query widget? Scott From Tom.Kralidis at EC.GC.CA Thu Apr 7 10:00:26 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Thu, 7 Apr 2005 13:00:26 -0400 Subject: Mapserver SVG output Message-ID: > -----Original Message----- > From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Frank Warmerdam > Sent: Thursday, 07 April, 2005 09:57 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Mapserver SVG output > > > On Apr 7, 2005 5:15 AM, James Anderson wrote: > > > > Hi, > > > > I am having this problem with mapserver trying it get it to > make svg > > output: > > > > In browser the mapfile produces: > > loadOutputFormat(): General error message. OUTPUTFORMAT clause > > references driver svg, but this driver isn't configured. > > > > How do I configure the svg driver? > > Can anyone please help ? > > James, > > I just took a quick look at this and it seems the SVG driver > isn't yet built in by default. You need to manually add > -DUSE_SVG in your FLAGS macro in the Makefile. > > I have also committed a change in maperror.c so that > OUTPUT=SVG will be reported if SVG support is configured in. > > Assefa ... is there a reason SVG support isn't enabled by default? > Perhaps a --with-svg as a configure flag? From assefa at DMSOLUTIONS.CA Thu Apr 7 10:11:02 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Thu, 7 Apr 2005 13:11:02 -0400 Subject: Mapserver SVG output In-Reply-To: <931f8ea905040706575aecb71b@mail.gmail.com> Message-ID: The SVG support should be there by defulat. The flag was added during development. I am removing it now. Will let you know when It is commited. Frank Warmerdam wrote: > On Apr 7, 2005 5:15 AM, James Anderson wrote: > >>Hi, >> >>I am having this problem with mapserver trying it get it to make svg output: >> >>In browser the mapfile produces: >>loadOutputFormat(): General error message. OUTPUTFORMAT clause references >>driver svg, but this driver isn't configured. >> >>How do I configure the svg driver? >>Can anyone please help ? > > > James, > > I just took a quick look at this and it seems the SVG driver isn't > yet built in by default. You need to manually add -DUSE_SVG in > your FLAGS macro in the Makefile. > > I have also committed a change in maperror.c so that OUTPUT=SVG > will be reported if SVG support is configured in. > > Assefa ... is there a reason SVG support isn't enabled by default? > > Best regards, > -- > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From mike.and.kerry at GMAIL.COM Thu Apr 7 10:19:39 2005 From: mike.and.kerry at GMAIL.COM (Mike Davis) Date: Thu, 7 Apr 2005 09:19:39 -0800 Subject: Google maps w/ satellite imagery In-Reply-To: <4BF377919225F449BB097CB76FFE9BC81882C1@ptolemy.topozone.com> Message-ID: Ed- Thanks for the response, I agree that the approach used by Google, TerraServer, etc... is rather limiting to those of us who really like to tinker with our on-line maps. I know I have a great time exploring Mapserver/IMS sites, checking out all the layers, and browsing around to my hearts content. That being said, I think there is definately a need to improve the user experience in web-mapping applications. Users can be notoriously unforgiving when forced to wait, with anything less than instantaneous response considered "slow". For those instances when flexibility is not the primary concern, the ability to pre-generate tiles and cache them on the client might be a good solution. Despite the limited nature of Google's mapping site, it definately raises the bar for the rest of the web mapping community. -Mike From ajacosta at ALTAMIRATECH.COM Thu Apr 7 10:25:00 2005 From: ajacosta at ALTAMIRATECH.COM (Alan Jairo Acosta) Date: Thu, 7 Apr 2005 12:25:00 -0500 Subject: Windows, MapScript compiled, -> PHP dies :( Message-ID: Hello everybody, i succesfully compile and fix a bug (in mapscript/php3/mapscript_i.c->classObj_getExpressionString that don't let me get expresion more big than 512 characters) in mapserver, i test and works, but some days ago a frind needs to add more simbols more than 64, i changed the : #define MS_MAXSYMBOLS 64 // maximum number of symbols in a symbol file to #define MS_MAXSYMBOLS 2048 // maximum number of symbols in a symbol file and rebuild the source, i overwrite the old php_mapscritp.so, i start my application and a dialog about php die appers, (In Linux, this, dosen't happen), then i test with "65" an again php dies, change again to "64" and everything goes fine. Now how can i get more error info, i suppose is a mapserver problem but i don't know how to get more info, if somebody has resolved this problem before, please tell me how, any help is apreciate. Sorry by my bad english, and thanks. -- Alan Jairo Acosta Res?ndiz MapReport:Geoweb PocketVision:Altamira Work office Number : 690 77 53 ext 12 Cell Phone : 300 612 6697 ajacosta at altamiratech.com From cdaily at GMAIL.COM Thu Apr 7 10:33:29 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Thu, 7 Apr 2005 12:33:29 -0500 Subject: Google maps w/ satellite imagery In-Reply-To: <4BF377919225F449BB097CB76FFE9BC81882C1@ptolemy.topozone.com> Message-ID: I'd be very interested in trying to reverse engineer Google's maps as well. The click-and-drag interface is so much nicer than having to wait for reloads. For all of our applications, losing arbitary zoom levels wouldn't be all that bad. In many ways, it would simplify things, as you'd only have to adjust your layers and displays for a preset number of zoom levels, without having to worry about how the maps look as they approach your various min/maxscales. For turning different map layers on and off, couldn't one just generate a different set of tiles for each layer, and create them with transparent backgrounds? I can't see why javascript couldn't overlay the different layers of tiles for a final image. That seems to be how Google is drawing their icons over the maps. Doing it that way would also allow for the toggling of layers without the need for a reload. Of course, the major hassle, as with all javascript applications, is supporting the wide variety of browsers out there. Last I checked Google maps only supported IE and Mozilla (not even Opera or Safari), though that may have changed by now. -Camden From assefa at DMSOLUTIONS.CA Thu Apr 7 10:39:39 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Thu, 7 Apr 2005 13:39:39 -0400 Subject: Mapserver SVG output In-Reply-To: <931f8ea905040706575aecb71b@mail.gmail.com> Message-ID: The USE_SVG has been removed in the latest CVS. I also added bug http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1307 to update the linux makefiles to add a USE_ZLIB flag that is necessary to be able to output compressed svg files using zlib functions. Later, Frank Warmerdam wrote: > On Apr 7, 2005 5:15 AM, James Anderson wrote: > >>Hi, >> >>I am having this problem with mapserver trying it get it to make svg output: >> >>In browser the mapfile produces: >>loadOutputFormat(): General error message. OUTPUTFORMAT clause references >>driver svg, but this driver isn't configured. >> >>How do I configure the svg driver? >>Can anyone please help ? > > > James, > > I just took a quick look at this and it seems the SVG driver isn't > yet built in by default. You need to manually add -DUSE_SVG in > your FLAGS macro in the Makefile. > > I have also committed a change in maperror.c so that OUTPUT=SVG > will be reported if SVG support is configured in. > > Assefa ... is there a reason SVG support isn't enabled by default? > > Best regards, > -- > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From cdaily at GMAIL.COM Thu Apr 7 10:48:12 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Thu, 7 Apr 2005 12:48:12 -0500 Subject: Google maps w/ satellite imagery In-Reply-To: <425570a1.10f31b8d.088c.ffffcc2bSMTPIN_ADDED@mx.gmail.com> Message-ID: Excellent. Thanks for the info Moran. Maybe if I have some free time in the next few months I may start playing around with a gmap frontend for mapserver. -Camden From kyle at PBX.ORG Thu Apr 7 10:51:13 2005 From: kyle at PBX.ORG (Kyle Cronan) Date: Thu, 7 Apr 2005 13:51:13 -0400 Subject: Google maps w/ satellite imagery In-Reply-To: <631c85c1050407101921cbdd7f@mail.gmail.com> Message-ID: My company uses mapserver to generate tiles for a web mapping application similar to Google's. We use shp2img to make the tiles and a DHTML front end pieces them together on the client side. Using 'PARTIALS FALSE' for all the labels, this generally works quite well. However, I have noticed two small problems that cause issues at the tile edges. First, 'FORCE TRUE' overrides 'PARTIALS FALSE', a fact we had to make a small patch to overcome. And second, when lines are drawn with a large symbol, the line stops drawing once the symbol center runs off the map, instead of once the symbol boundary completely leaves the map area. Oh and also there are sometimes strange vertical lines of various colors left at the tile edge. These small problems aside, kudos to the mapserver developers as we have been very happy with the results of using mapserver in this kind of environment! We now have three maps online: New York City, Washington DC and King County, WA. Here they are: http://www.propertyshark.com/maps/ http://www.propertyshark.com/maps/?map=dc http://www.propertyshark.com/maps/?map=kc Using a tiled approach certainly does limit your ability to let the user customize a map with selectable layers. But by superimposing layers of transparent image tiles, we are hoping to recreate some of this functionality. The primary difficulty will be in avoiding label collisions. Regards, Kyle Cronan On Thu, 2005-04-07 at 13:19, Mike Davis wrote: > Ed- > > Thanks for the response, I agree that the approach used by Google, > TerraServer, etc... is rather limiting to those of us who really like > to tinker with our on-line maps. I know I have a great time exploring > Mapserver/IMS sites, checking out all the layers, and browsing around > to my hearts content. > > That being said, I think there is definately a need to improve the > user experience in web-mapping applications. Users can be notoriously > unforgiving when forced to wait, with anything less than instantaneous > response considered "slow". For those instances when flexibility is > not the primary concern, the ability to pre-generate tiles and cache > them on the client might be a good solution. > > Despite the limited nature of Google's mapping site, it definately > raises the bar for the rest of the web mapping community. > > -Mike From woodbri at SWOODBRIDGE.COM Thu Apr 7 10:58:22 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Thu, 7 Apr 2005 13:58:22 -0400 Subject: Google maps w/ satellite imagery In-Reply-To: <631c85c1050407101921cbdd7f@mail.gmail.com> Message-ID: There is nothing stopping you from doing just that with mapserver. All you would have to do is write a script that has a double nested for loop to iterate over all your spatial data and define the bounding boxes for each tile, then ask mapserver to generate the tile and save it into your tree structure. Then do it again for each zoom scale you want. You can probably take the google javascript and then modify it to request tiles from your directory tree. You might want to write a very thin php script that converts tile requests in file requests, but maybe not. I would be interested in such a script if you want to develop it, in fact I might have a little time to collaborate on it. I don't thing the actual script is that hard, I'm not sure about what projection (lat-long? or otherwise) you would want/need to use so the tiles fit seamlessly together. It would also be interesting to know how much space and the number of files needed for each zoom level. -Steve W. Mike Davis wrote: > Ed- > > Thanks for the response, I agree that the approach used by Google, > TerraServer, etc... is rather limiting to those of us who really like > to tinker with our on-line maps. I know I have a great time exploring > Mapserver/IMS sites, checking out all the layers, and browsing around > to my hearts content. > > That being said, I think there is definately a need to improve the > user experience in web-mapping applications. Users can be notoriously > unforgiving when forced to wait, with anything less than instantaneous > response considered "slow". For those instances when flexibility is > not the primary concern, the ability to pre-generate tiles and cache > them on the client might be a good solution. > > Despite the limited nature of Google's mapping site, it definately > raises the bar for the rest of the web mapping community. > > -Mike > From cdaily at GMAIL.COM Thu Apr 7 11:01:54 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Thu, 7 Apr 2005 13:01:54 -0500 Subject: Google maps w/ satellite imagery In-Reply-To: <1112896273.20606.25.camel@localhost> Message-ID: Kyle, That's a nice interface you've built. I take it that you generate each seperate tile on it's own, which is what causes some issues at the tile borders? Would it be possible to instead have mapserver (or shp2img) generate the entire map all at once, and then use a seperate program to split those tiles up? The labels issue is rather interesting though. Making sure that labels from seperate layers don't overlap could be a challenge. -Camden From kristjan at TARKVARASTUUDIO.EE Thu Apr 7 11:05:03 2005 From: kristjan at TARKVARASTUUDIO.EE (Kristjan Annus) Date: Thu, 7 Apr 2005 21:05:03 +0300 Subject: Google maps w/ satellite imagery In-Reply-To: <16264e0705040710336942815c@mail.gmail.com> Message-ID: If you have large number of pre.generated zoom levels you can make your user to belive that he has the custom zoom level solution :-) You just have to choose the most compatible level after the user makes zoom-box query. There is one other interesting solution for large images ie. satellite imagery - Zoomify http://www.zoomify.com/ Click on the 'See Full srceen demo' link under the Paris satellite image. Of course this is not real GIS but it is quite interesting. Kristjan >I'd be very interested in trying to reverse engineer Google's maps as >well. The click-and-drag interface is so much nicer than having to >wait for reloads. > >For all of our applications, losing arbitary zoom levels wouldn't be >all that bad. In many ways, it would simplify things, as you'd only >have to adjust your layers and displays for a preset number of zoom >levels, without having to worry about how the maps look as they >approach your various min/maxscales. > >For turning different map layers on and off, couldn't one just >generate a different set of tiles for each layer, and create them with >transparent backgrounds? I can't see why javascript couldn't overlay >the different layers of tiles for a final image. That seems to be how >Google is drawing their icons over the maps. Doing it that way would >also allow for the toggling of layers without the need for a reload. > >Of course, the major hassle, as with all javascript applications, is >supporting the wide variety of browsers out there. Last I checked >Google maps only supported IE and Mozilla (not even Opera or Safari), >though that may have changed by now. > >-Camden > > From woodbri at SWOODBRIDGE.COM Thu Apr 7 11:09:14 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Thu, 7 Apr 2005 14:09:14 -0400 Subject: Google maps w/ satellite imagery In-Reply-To: <16264e0705040711016bd5765c@mail.gmail.com> Message-ID: It may not be practical to generate the WHOLE map image and then chop it into tiles, but you could generate a "larger" image and chop off some of the border pixels to avoid some of these problems. -Steve W Camden Daily wrote: > Kyle, > > That's a nice interface you've built. I take it that you generate > each seperate tile on it's own, which is what causes some issues at > the tile borders? Would it be possible to instead have mapserver (or > shp2img) generate the entire map all at once, and then use a seperate > program to split those tiles up? > > The labels issue is rather interesting though. Making sure that > labels from seperate layers don't overlap could be a challenge. > > -Camden > From kyle at PBX.ORG Thu Apr 7 11:17:39 2005 From: kyle at PBX.ORG (Kyle Cronan) Date: Thu, 7 Apr 2005 14:17:39 -0400 Subject: Google maps w/ satellite imagery In-Reply-To: <16264e0705040711016bd5765c@mail.gmail.com> Message-ID: On Thu, 2005-04-07 at 14:01, Camden Daily wrote: > Kyle, > > That's a nice interface you've built. I take it that you generate > each seperate tile on it's own, which is what causes some issues at > the tile borders? Would it be possible to instead have mapserver (or > shp2img) generate the entire map all at once, and then use a seperate > program to split those tiles up? Thank you, although the javascript is the work of a collegue of mine. I do the mapfiles! Yes, we simply spawn shp2img on the same mapfile (with different EXTENT) for each 300x300 tile. Generating the whole map at once would surely not be feasible--I'm currently working on a map that is, at the highest zoom level, about one quarter of a terrapixel! However, we have considered making the tiles in larger pieces and then cutting them up. Still, this doesn't eliminate the problem but does reduces it. I've also noticed mapserver segfaults when you try to go above a certain image size--it would be nice if the memory structures were dynamically allocated. But perhaps that's a topic for the dev list. Kyle > The labels issue is rather interesting though. Making sure that > labels from seperate layers don't overlap could be a challenge. > > -Camden From mdieterich at GMAIL.COM Thu Apr 7 11:34:13 2005 From: mdieterich at GMAIL.COM (Mark Dieterich) Date: Thu, 7 Apr 2005 14:34:13 -0400 Subject: Google maps w/ satellite imagery In-Reply-To: <1112897859.20607.57.camel@localhost> Message-ID: Kyle, > Yes, we simply spawn shp2img on the same mapfile (with different EXTENT) > for each 300x300 tile. Generating the whole map at once would surely > not be feasible--I'm currently working on a map that is, at the highest > zoom level, about one quarter of a terrapixel! However, we have So it sounds like you are generating all of the tiles statically and then just serving those up via javascript? Has anyone tried using mapserver to tile on the fly, i.e. use mapserver to generate image tiles at certain zoom levels based on feedback of the user searches. Then store tiles in a server cache. When users request a map, have the server check the server tile cache, before kicking off mapserver to create new tiles. While we are on the topic of mapserver, has anyone ever done work to write something like mod_mapserver for apache? It seems like the startup costs for a cgi based server are going to eat into speed over the long run. Remember, I'm still a newbie, so I could be completely off base here. Thanks! Mark From dbarron at DSWLLC.COM Thu Apr 7 11:55:58 2005 From: dbarron at DSWLLC.COM (Dan Barron) Date: Thu, 7 Apr 2005 11:55:58 -0700 Subject: Google maps w/ satellite imagery In-Reply-To: <631c85c1050407101921cbdd7f@mail.gmail.com> Message-ID: Mind if I throw out this question? With Google Maps using the Ajax concept (some info here - http://digitalsqueeze.com/drupal/node/3053) - has anyone tried/contemplated/dabbled at this approach using mapserver? Creating a map with mapserver can be fairly quick, reloading the page can take time, depending on your interface implementation - but if you only had to pass the map image back, that would be a huge step forward for the user experience. Dan At 10:19 AM 4/7/2005, Mike Davis wrote: >Ed- > >Thanks for the response, I agree that the approach used by Google, >TerraServer, etc... is rather limiting to those of us who really like >to tinker with our on-line maps. I know I have a great time exploring >Mapserver/IMS sites, checking out all the layers, and browsing around >to my hearts content. > >That being said, I think there is definately a need to improve the >user experience in web-mapping applications. Users can be notoriously >unforgiving when forced to wait, with anything less than instantaneous >response considered "slow". For those instances when flexibility is >not the primary concern, the ability to pre-generate tiles and cache >them on the client might be a good solution. > >Despite the limited nature of Google's mapping site, it definately >raises the bar for the rest of the web mapping community. > >-Mike From kgeurts at GIS.UMN.EDU Thu Apr 7 12:18:40 2005 From: kgeurts at GIS.UMN.EDU (Kari Geurts) Date: Thu, 7 Apr 2005 14:18:40 -0500 Subject: Important - OpenSource GeoSpatial '05' Conference- Early Registration Message-ID: References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------060300070002070502070105" This is a multi-part message in MIME format. --------------060300070002070502070105 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello MapServer Community, Just a friendly reminder, the early registration rate for the Open Source GeoSpatial '05' Conference being held at the University of Minnesota June 16-18 2005, ends *April 15th*. You will save $50.00 by registering before this date. Please see the conference web page for more details. http://mapserver.gis.umn.edu/mum/mtg2005.html In addition, seats for the half day workshops on June 16th are filling fast. Below are the current numbers for the workshops... *Half Day AM * PostGIS 25 of 30 seats GRASS GIS 11 of 30 seats MapServer 11 of 30 seats OpenMap 2 of 30 seats *Half Day PM* Chameleon 3 of 30 seats OSSIM 6 of 30 seats OGC Protocols 15 of 30 seats Python GIS Hacks 20 of 30 seats Take time now to visit the conference web page to learn more about the workshops and to take advantage of the easy to use on-line conference registration link. We look forward to seeing you all at the conference, Kari -- Kari A. Geurts GIS and Remote Sensing Laboratory Department of Forest Resources University of Minnesota 1530 Cleveland Ave N. St. Paul, MN. 55108 Phone: 612-624-3459 Fax: 612-625-5212 --------------060300070002070502070105 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit

Hello MapServer Community,

Just a friendly reminder, the early registration rate for the Open Source GeoSpatial '05' Conference being held at the University of Minnesota June 16-18 2005, ends April 15thYou will save $50.00 by registering before this date. Please see the conference web page for more details.

http://mapserver.gis.umn.edu/mum/mtg2005.html

In addition, seats for the half day workshops on June 16th are filling fast. Below are the current numbers for the workshops...

Half Day AM 

PostGIS                       25 of 30 seats

GRASS GIS                11 of 30 seats

MapServer                   11 of 30 seats

OpenMap                    2 of 30 seats 

Half Day PM

Chameleon                   3 of 30 seats

OSSIM                        6 of 30 seats

OGC Protocols            15 of 30 seats

Python GIS Hacks        20 of 30 seats

Take time now to visit the conference web page to learn more about the workshops and to take advantage of the easy to use on-line conference registration link.

We look forward to seeing you all at the conference,
Kari

--
Kari A. Geurts

GIS and Remote Sensing Laboratory
Department of Forest Resources
University of Minnesota
1530 Cleveland Ave N.
St. Paul, MN. 55108
Phone: 612-624-3459
Fax: 612-625-5212 
--------------060300070002070502070105-- From jmalczyk at YAHOO.COM Thu Apr 7 12:16:26 2005 From: jmalczyk at YAHOO.COM (Jeremy Malczyk) Date: Thu, 7 Apr 2005 14:16:26 -0500 Subject: Google maps w/ satellite imagery Message-ID: >So it sounds like you are generating all of the tiles statically and >then just serving those up via javascript? Has anyone tried using >mapserver to tile on the fly, i.e. use mapserver to generate image tiles >at certain zoom levels based on feedback of the user searches. Then >store tiles in a server cache. When users request a map, have the >server check the server tile cache, before kicking off mapserver to >create new tiles. That's an interesting idea. It would get around the issue of updating tiles (which, for me, is the main disadvantage of a tiled system) if you incorporate some kind of verification of mapfile updates before grabbing a cached tile. On another note, a lot of the perceived extra speed of Google's maps comes from the client side caching of tiles outside the viewable map area. If you really pan quickly, this advantage goes away, but I suspect that most users don't pan much faster then the server can refresh. With MapServer, a similar solution might be to initially load a map some size larger than the viewable area, then have your javascript only request maps for the blank spaces as the user pans around. For any given pan you'll only need, at most, two dynamically sized tiles. Since these tiles will always be equal to or smaller than the viewable area, you aren't asking any more of mapserver than you normally would be, in terms of area anyway. You would be asking for two small maps instead of one bigger one, which might actually be slower. Even if it is though, the perception by the user will be increased speed as they pan around an area, because their client will likely be using cached tiles as they pan back over areas they've already seen. The hard part of such a system would be keeping track of these dynamically sized tiles cached on the client, and getting your labels right, but it doesn't seem impossible. The label issue might be solved by pulling a seperate "normal" labels-only mapserver layer after the base map loads. That way each pan reveals more map, and the user only has to wait for mapserver to create new labels. Jeremy From jgrimes at GI.ALASKA.EDU Thu Apr 7 12:31:34 2005 From: jgrimes at GI.ALASKA.EDU (Jason Grimes) Date: Thu, 7 Apr 2005 11:31:34 -0800 Subject: Getting ESRI to talk to my WMS Message-ID: Hi, I have set up a WMS service on my local machine. We would like to give ArcGIS users access to the layers but it will not talk to the WMS service. I can get Jump to talk and of course MapServer/Chameleon also talks with the service and no problems. Is there a specific way in which you have to set up the map file? According to my research ArcGIS will not connect up to WMS servers that use any other projection except a Lat/Lon one. I re-projected some of our data using EPSG:4326 and setup a map file with only this projection and ArcGIS will still not talk. It reads the capabilities just fine, but after that it will not contact the server again. I have watched the Apache logs and I can see the capabilities request come through and then nothing. I have also tried other services like the DM Solutions demo here: http://www2.dmsolutions.ca/cgi-bin/mswms_gmap And it works fine with ArcGIS. Maybe one of the DM Solutions guys could point me in the right direction. :) Any help would be most appretiated and if there is a way of having the WMS also work with meter based projections (like Albers) at the same time would be great too. Thanks, Jason From osgis.lists at GMAIL.COM Thu Apr 7 12:46:55 2005 From: osgis.lists at GMAIL.COM (David Bitner) Date: Thu, 7 Apr 2005 14:46:55 -0500 Subject: Google maps w/ satellite imagery In-Reply-To: Message-ID: I have been succesfully using the AJAX concept with Mapserver for a couple months. The main thing that I utilize is never refreshing the whole page. I parse as much as possible using (extents, which layers are visible, etc) with Javascript and then change my map image using mapserver in cgi mode by constructing the url for the image with js. I also enable XMLHTTP requests to various other utilities such as a php geocoder that then returns information to the client that can be used to request a new image as well as display information about the found address on the client. In addition, I use PHP and Postgis with XMLHTTP requests to run my queries without the need to refresh the image. The approach that I have been using is to load all my layers as individual maps with transparent backgrounds. This is very handy since some of my layers (larger, complicated, Postgis layers) take much longer to load than other simple layers. Regardless of what layers the user has chosen to display, I preload all the maps to the client and then only display what the user has selected for display. This does two things for me. First, it gives near instantaneous interaction as the very simple layers come up right away with very little delay. Second, once all the layers have loaded, as long as you don't zoom or pan you can get instant results by turning layers on and off on the client. From agillesp at VT.EDU Thu Apr 7 12:53:22 2005 From: agillesp at VT.EDU (agillesp) Date: Thu, 7 Apr 2005 15:53:22 -0400 Subject: Google Maps, Ajax Message-ID: Sorry to not reply to the proper thread, but email is foobarred right now. Anyhow, just wanted to add some links to the mix: Here's a reverse engineering of Google Maps: http://jgwebber.blogspot.com/2005/02/mapping-google.html And here's another cool example of mapping and Ajax: http://tinyurl.com/3pvs5 -Abe From bruce_w_98 at YAHOO.COM Thu Apr 7 12:48:52 2005 From: bruce_w_98 at YAHOO.COM (Bruce Wayne) Date: Thu, 7 Apr 2005 14:48:52 -0500 Subject: Routing help!!! Message-ID: Good day. I would like to know if your software can be used to create routing directions (such as mapquest) for a specific country. My group are doing a project where we want to integrate routing, with video and voice capabilities. We have already set up the voice and video servers, but the routing system is taking longer than we have. We want to do it for a parish in Jamaica (similar to a city in the US). Can your mapserver help?? From cpurvis at ASG.SC.EDU Thu Apr 7 13:08:43 2005 From: cpurvis at ASG.SC.EDU (Charlton Purvis) Date: Thu, 7 Apr 2005 15:08:43 -0500 Subject: Google maps w/ satellite imagery Message-ID: > >So it sounds like you are generating all of the tiles statically and > >then just serving those up via javascript? Has anyone tried using > >mapserver to tile on the fly, i.e. use mapserver to generate image tiles > >at certain zoom levels based on feedback of the user searches. Then > >store tiles in a server cache. When users request a map, have the > >server check the server tile cache, before kicking off mapserver to > >create new tiles. Believe you me, I'd love to do this. But what prevents me from doing this and w/o the help of 10,000 CPUs to burn like google maps, is the fact that my underlying data changes constantly. I'm in the near real time ocean observation business, and I try to cache as much as I can. Considering that I go out around the clock fetching and aggregating ocean observations, an image that a user requests could be saved, yes, for caching purposes, but once the underlying data changes, that cached image is SOL. The caching that I do is hourly to keep the initial maps and the common extents performing somewhat snappily. But these hourly caches have to be refreshed whenever any new data comes in. While the google maps stuff is sexy, what would really blow me away would be a site that is that fast AND is also based on constantly changing underlying data. Charlton From Tim.Pascoe at EC.GC.CA Thu Apr 7 13:08:39 2005 From: Tim.Pascoe at EC.GC.CA (Pascoe,Tim [Burlington]) Date: Thu, 7 Apr 2005 16:08:39 -0400 Subject: SLD Problem with WMS Symbols Message-ID: I'm having trouble getting my symbols to show up properly on a WMS layer which is filtered using an SLD. The WMS, which is hosted locally, is a layer generated using OGR from a SQL-Server database. If I access the WMS layer using mapserver directly, the symbols are returned properly. I'm using an ESRI TT font to supply the symbol, with a definition in the fonts.txt file and the symbols.sym file. The problem is when I load the layer through my chameleon application. The SLD filters the points properly, and the symbol color is correct, but the symbol itself defaults to a filled square. Any ideas? I can post the SLD (generated on the fly using a script), and the map file if someone wants to take a look. Thanks, Timothy Pascoe Environment Canada / Environnement Canada Canada Centre for Inland Waters / Centre Canadien des Eaux Int?rieures 867 Lakeshore Road / 867, chemin Lakeshore Burlington, Ontario / Burlington (Ontario) L7R 4A6 Tel/T?l: (905) 336-6025 Fax/T?l?c: (905) 336-4699 E-mail/C. ?lec: tim.pascoe at ec.gc.ca Government of Canada/Gouvernement du Canada This e-mail represents the opinions and views solely held by its author and in no manner may be considered as representing those of his/her employer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From erv.mcnally at GMAIL.COM Thu Apr 7 13:12:47 2005 From: erv.mcnally at GMAIL.COM (Erv McNally) Date: Thu, 7 Apr 2005 15:12:47 -0500 Subject: Multiple attribute query with a regular expression. Message-ID: I currently can use PHP mapscript to query multiple attributes using queryByAttributes($qitem,$qstring,MS_MULTIPLE); $qitem='att1' $qstring=('[att1]'='test' or '[att1]' = 'test2' and '[att3]'='test3') I also can use a regular expression to query on a single attribute by setting the $qitem='att1' $qstring='/^[Tt].*/' to search for all records with att1 that starts with a T or t. The problem is that I can't seem to find any way to query on different attributes while using a regular expression as follows. $qitem='att1' $qstring=('[att1]' = '/^[Tt].*/' or '[att2]'='test2') I have not been able to make the above work by using any of the following and many other combinations. $qstring=('[att1]' = /^[Tt].*/ or '[att2]'='test2') with error msDBFGetItemIndex(): Item 'Tt' not found. $qstring=('[att1]' = '/^[Tt].*/' or '[att2]'='test2') with error msDBFGetItemIndex(): Item 'Tt' not found. $qstring=('[att1]' = '/^[Tt].*/') with error msDBFGetItemIndex(): Item 'Tt' not found. $qstring=('[name]' = /^T.*/) with error msEvalExpression: Failed to parse expression msyyparse(): syntax error. The last one seems like the expression is trying to be parsed. This wouldn't be necessary if there was a way to intersect querys or to do a sub query on results from a prior query. I know that you can add features by using querybyIndex, but that would be a union and I am interested in the intersection. Any information or insights would be greatly appreciated. From bob.basques at CI.STPAUL.MN.US Thu Apr 7 13:14:30 2005 From: bob.basques at CI.STPAUL.MN.US (Bob Basques) Date: Thu, 7 Apr 2005 15:14:30 -0500 Subject: Google maps w/ satellite imagery In-Reply-To: Message-ID: > >The hard part of such a system would be keeping track of these dynamically >sized tiles cached on the client, and getting your labels right, but it >doesn't seem impossible. The label issue might be solved by pulling a >seperate "normal" labels-only mapserver layer after the base map loads. That >way each pan reveals more map, and the user only has to wait for mapserver >to create new labels. > > Another approach to this might be in the caching of tiles on the server side dynamically, where the initial requests are generated and stored vs pre-generating everything, this has the added benefit of only building tiles that are being referenced many times vs tile that may only seldom be requested as well as only building those tiles from specific zoom levels. Related to the zooming in STEPS vs completely dynamically, you could have two modes of operation, one "SPEED" mode that would use the STEPped zooming, and a second "ACCURACY" mode for getting exactly what you want. The server could still use the same tiling system on the server, but handle the between step interpolation of the data dynamically from the tiles or even from the Data sources themselves in a typical Mapserver install. If you add in an additional step of tiling a larger image generation into smaller tiles, you would get around the label problem, this would all be serverside trickery, but it would help out with tile writing and keeping track of which tiles are how old and whether they might have label artifacts along the edges or not (the server would generate new edge tiles if the edge were crossed in subsequent requests for example). bobb > >Jeremy > > > From superbla3000 at GMX.NET Thu Apr 7 13:18:58 2005 From: superbla3000 at GMX.NET (joerg pfeiffer) Date: Thu, 7 Apr 2005 22:18:58 +0200 Subject: gazetter files Message-ID: hello, I would like to use a gazetter file of the format Zwolfling P PPL 48.6166 13.5833 .... I am completely lost, how do I use it? I only know the dbfs with extra shapefiles, this one comes alone. best regards Joerg From assefa at DMSOLUTIONS.CA Thu Apr 7 13:20:04 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Thu, 7 Apr 2005 16:20:04 -0400 Subject: SLD Problem with WMS Symbols In-Reply-To: <2576812186CDD411BF1500508B6DCE9505FAD357@ecnwri1.ontario.int.ec.gc.ca> Message-ID: Tim, Please sned me the necessary files to recreate the problem and I will give it a look. Later, Pascoe,Tim [Burlington] wrote: > > I?m having trouble getting my symbols to show up properly on a > WMS layer which is filtered using an SLD. The WMS, which is hosted > locally, is a layer generated using OGR from a SQL-Server database. If I > access the WMS layer using mapserver directly, the symbols are returned > properly. I?m using an ESRI TT font to supply the symbol, with a > definition in the fonts.txt file and the symbols.sym file. > > The problem is when I load the layer through my chameleon > application. The SLD filters the points properly, and the symbol color > is correct, but the symbol itself defaults to a filled square. Any > ideas? I can post the SLD (generated on the fly using a script), and the > map file if someone wants to take a look. > > Thanks, > > Timothy Pascoe > > > Environment Canada / Environnement Canada > Canada Centre for Inland Waters / Centre Canadien des Eaux Int?rieures > 867 Lakeshore Road / 867, chemin Lakeshore > Burlington, Ontario / Burlington (Ontario) > > L7R 4A6 > > Tel/T?l: (905) 336-6025 > Fax/T?l?c: (905) 336-4699 > E-mail/C. ?lec: ___tim.pascoe at ec.gc.ca_ > Government of Canada/Gouvernement du Canada > > /This e-mail represents the opinions and views solely held by its author > and in no manner may be considered as representing those of his/her > employer./ > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From pauljame at GMAIL.COM Thu Apr 7 13:26:05 2005 From: pauljame at GMAIL.COM (Paul james) Date: Thu, 7 Apr 2005 17:26:05 -0300 Subject: Query a point... Message-ID: Thats should be a newbie question, but I?m not doing the right thing.... I have a POINT layer, and user will select 2 points (by click or input) ... So I need to show up the LINE in map... Im using php mapscript... I think I should create another layer... Ideas? Samples? Thank you From dondrake at GMAIL.COM Thu Apr 7 13:31:13 2005 From: dondrake at GMAIL.COM (Don Drake) Date: Thu, 7 Apr 2005 15:31:13 -0500 Subject: Solaris lseek when reading shape files Message-ID: I'm using street-level data broken out by counties (tileindexed) and I'm running into some performance problems on Solaris. We have this working on Linux, similar maps take 5 seconds max and on Solaris they take 45 seconds. I've trussed the web server and found the PHP/Mapscript process doing the following: 14455: 272.2223 open("/mapdata/tiger/IL/Cook/tgr17031placecu.shp", O_RDONLY) = 8 14455: 272.2224 open("/mapdata/tiger/IL/Cook/tgr17031placecu.shx", O_RDONLY) = 9 14455: 272.2225 fstat64(8, 0xFFBF5AA8) = 0 14455: 272.2225 fstat64(8, 0xFFBF5950) = 0 14455: 272.2225 ioctl(8, TCGETA, 0xFFBF5A34) Err#25 ENOTTY 14455: 272.2226 read(8, "\0\0 '\n\0\0\0\0\0\0\0\0".., 8192) = 8192 14455: 272.2227 fstat64(9, 0xFFBF5AA8) = 0 14455: 272.2227 fstat64(9, 0xFFBF5950) = 0 14455: 272.2228 ioctl(9, TCGETA, 0xFFBF5A34) Err#25 ENOTTY 14455: 272.2228 read(9, "\0\0 '\n\0\0\0\0\0\0\0\0".., 8192) = 1180 14455: 272.2229 open("/mapdata/tiger/IL/Cook/tgr17031placecu.dbf", O_RDONLY) = 10 14455: 272.2230 fstat64(10, 0xFFBF5AB8) = 0 14455: 272.2231 fstat64(10, 0xFFBF5960) = 0 14455: 272.2231 ioctl(10, TCGETA, 0xFFBF5A44) Err#25 ENOTTY 14455: 272.2232 read(10, "03 h05\t87\0\0\0 !01 U\0".., 8192) = 8192 14455: 272.2232 lseek(10, 32, SEEK_SET) = 32 14455: 272.2233 read(10, " G I S T _ I D\0\0\012 N".., 8192) = 8192 14455: 272.2234 open("/mapdata/tiger/IL/Cook/tgr17031placecu.qix", O_RDONLY) Err#2 ENOENT 14455: 272.2235 lseek(8, 112, SEEK_SET) = 112 14455: 272.2235 read(8, "C2BD 2 oD5F1 UC0AB \A8FC".., 8192) = 8192 14455: 272.2236 lseek(8, 3256, SEEK_SET) = 3256 14455: 272.2237 read(8, "03 < iE1B201 VC089 w80 '".., 8192) = 8192 14455: 272.2237 lseek(8, 13872, SEEK_SET) = 13872 14455: 272.2238 read(8, "828E VB5A4\t VC0CAC3 BAD".., 8192) = 8192 14455: 272.2239 lseek(8, 17652, SEEK_SET) = 17652 14455: 272.2240 read(8, "CBA0DAE0 D0F VC0 { K 9 _".., 8192) = 8192 14455: 272.2240 lseek(8, 24028, SEEK_SET) = 24028 14455: 272.2241 read(8, " 317B8 Message-ID: Hello, I've not posted before but I thought you'd like to know of another satisfied mapserver user (or very many if you include our web visitors). You'll be pleased to hear I managed to get it installed and running on my Linux box with only a minimum loss of hair, with the aid of the list archives Announcing the new Megalith Map from the Megalithic Portal * The world's first interactive multi-country map of megalithic and other prehistoric sites * Covers the whole of Europe. Other areas are under construction * Over 10000 locations plotted and over 12000 photographs * Each monument listing approved by our team of editors * More than just megaliths. Also Pictish stones, Holy Wells, Ancient Crosses and other selected 'Dark Ages' sites * Around 1500 more French sites are on the way in the next few weeks * Created and supported entierely by amateur enthusiasts with no government, lottery or other external funding * Choice of frames or no-frames * Pure HTML, running on our server. No nasty plug-ins required http://www.megalithic.co.uk/mapserv Cheers, Andy -- ================================================================== The Megalithic Portal http://www.megalithic.co.uk The huge ancient site database with maps, news, community features "a wonderful guide" - the New York Times "useful, fun, and accurate" - Archaeology Magazine ================================================================== An independent web site funded totally by our Online Shop http://www.megalithic.co.uk/shop ================================================================== From woodbri at SWOODBRIDGE.COM Thu Apr 7 13:45:26 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Thu, 7 Apr 2005 16:45:26 -0400 Subject: Solaris lseek when reading shape files In-Reply-To: <6c21003b05040713315a650cd1@mail.gmail.com> Message-ID: Don, Looks like you don't have a /mapdata/tiger/IL/Cook/tgr17031placecu.qix file. I'm I read the log correctly? This could/would account for a major perfomance issue. -Steve Don Drake wrote: > I'm using street-level data broken out by counties (tileindexed) and > I'm running into some performance problems on Solaris. We have this > working on Linux, similar maps take 5 seconds max and on Solaris they > take 45 seconds. > > I've trussed the web server and found the PHP/Mapscript process doing > the following: > 14455: 272.2223 > open("/mapdata/tiger/IL/Cook/tgr17031placecu.shp", O_RDONLY) = 8 > 14455: 272.2224 > open("/mapdata/tiger/IL/Cook/tgr17031placecu.shx", O_RDONLY) = 9 > 14455: 272.2225 fstat64(8, 0xFFBF5AA8) = 0 > 14455: 272.2225 fstat64(8, 0xFFBF5950) = 0 > 14455: 272.2225 ioctl(8, TCGETA, 0xFFBF5A34) > Err#25 ENOTTY > 14455: 272.2226 read(8, "\0\0 '\n\0\0\0\0\0\0\0\0".., 8192) = 8192 > 14455: 272.2227 fstat64(9, 0xFFBF5AA8) = 0 > 14455: 272.2227 fstat64(9, 0xFFBF5950) = 0 > 14455: 272.2228 ioctl(9, TCGETA, 0xFFBF5A34) > Err#25 ENOTTY > 14455: 272.2228 read(9, "\0\0 '\n\0\0\0\0\0\0\0\0".., 8192) = 1180 > 14455: 272.2229 > open("/mapdata/tiger/IL/Cook/tgr17031placecu.dbf", O_RDONLY) = 10 > 14455: 272.2230 fstat64(10, 0xFFBF5AB8) = 0 > 14455: 272.2231 fstat64(10, 0xFFBF5960) = 0 > 14455: 272.2231 ioctl(10, TCGETA, 0xFFBF5A44) > Err#25 ENOTTY > 14455: 272.2232 read(10, "03 h05\t87\0\0\0 !01 U\0".., 8192) = 8192 > 14455: 272.2232 lseek(10, 32, SEEK_SET) = 32 > 14455: 272.2233 read(10, " G I S T _ I D\0\0\012 N".., 8192) = 8192 > 14455: 272.2234 > open("/mapdata/tiger/IL/Cook/tgr17031placecu.qix", O_RDONLY) Err#2 > ENOENT > 14455: 272.2235 lseek(8, 112, SEEK_SET) = 112 > 14455: 272.2235 read(8, "C2BD 2 oD5F1 UC0AB \A8FC".., 8192) = 8192 > 14455: 272.2236 lseek(8, 3256, SEEK_SET) = 3256 > 14455: 272.2237 read(8, "03 < iE1B201 VC089 w80 '".., 8192) = 8192 > 14455: 272.2237 lseek(8, 13872, SEEK_SET) = 13872 > 14455: 272.2238 read(8, "828E VB5A4\t VC0CAC3 BAD".., 8192) = 8192 > 14455: 272.2239 lseek(8, 17652, SEEK_SET) = 17652 > 14455: 272.2240 read(8, "CBA0DAE0 D0F VC0 { K 9 _".., 8192) = 8192 > 14455: 272.2240 lseek(8, 24028, SEEK_SET) = 24028 > 14455: 272.2241 read(8, " 317B8 14455: 272.2242 lseek(8, 28788, SEEK_SET) = 28788 > 14455: 272.2242 read(8, "BEF7 7 hAFF6 UC0 `AB048B".., 8192) = 8192 > 14455: 272.2243 lseek(8, 31872, SEEK_SET) = 31872 > 14455: 272.2244 read(8, "B8ACC2 f80F9 UC0B2D2A414".., 8192) = 8192 > 14455: 272.2244 lseek(8, 33384, SEEK_SET) = 33384 > 14455: 272.2245 read(8, " M ID6E1E8FA UC0 ` t y s".., 8192) = 8192 > 14455: 272.2245 lseek(8, 34116, SEEK_SET) = 34116 > 14455: 272.2246 read(8, " 507\bE6E8FA UC0A4 6 q r".., 8192) = 8192 > 14455: 272.2247 lseek(8, 35596, SEEK_SET) = 35596 > 14455: 272.2247 read(8, " . r O W wF3 UC0AB ]13D2".., 8192) = 8192 > > The seeks continue on for about a million more lines (seriously) and > this takes forever. > > This is a really inefficient way to scan a file, what can I do? > > I"m running Mapserver 4.2.5 on Solaris 9. > > -Don > -- > Donald Drake > President > Drake Consulting > http://www.drakeconsult.com/ > http://www.MailLaunder.com/ > http://www.mobilemeridian.com/ > 312-560-1574 > From dondrake at GMAIL.COM Thu Apr 7 13:53:13 2005 From: dondrake at GMAIL.COM (Don Drake) Date: Thu, 7 Apr 2005 15:53:13 -0500 Subject: Solaris lseek when reading shape files In-Reply-To: <42559BE6.1070003@swoodbridge.com> Message-ID: I went back and created those and it made no difference. -Don On Apr 7, 2005 3:45 PM, Stephen Woodbridge wrote: > Don, > > Looks like you don't have a /mapdata/tiger/IL/Cook/tgr17031placecu.qix > file. I'm I read the log correctly? This could/would account for a major > perfomance issue. > > -Steve > > Don Drake wrote: > > I'm using street-level data broken out by counties (tileindexed) and > > I'm running into some performance problems on Solaris. We have this > > working on Linux, similar maps take 5 seconds max and on Solaris they > > take 45 seconds. > > > > I've trussed the web server and found the PHP/Mapscript process doing > > the following: > > 14455: 272.2223 > > open("/mapdata/tiger/IL/Cook/tgr17031placecu.shp", O_RDONLY) = 8 > > 14455: 272.2224 > > open("/mapdata/tiger/IL/Cook/tgr17031placecu.shx", O_RDONLY) = 9 > > 14455: 272.2225 fstat64(8, 0xFFBF5AA8) = 0 > > 14455: 272.2225 fstat64(8, 0xFFBF5950) = 0 > > 14455: 272.2225 ioctl(8, TCGETA, 0xFFBF5A34) > > Err#25 ENOTTY > > 14455: 272.2226 read(8, "\0\0 '\n\0\0\0\0\0\0\0\0".., 8192) = 8192 > > 14455: 272.2227 fstat64(9, 0xFFBF5AA8) = 0 > > 14455: 272.2227 fstat64(9, 0xFFBF5950) = 0 > > 14455: 272.2228 ioctl(9, TCGETA, 0xFFBF5A34) > > Err#25 ENOTTY > > 14455: 272.2228 read(9, "\0\0 '\n\0\0\0\0\0\0\0\0".., 8192) = 1180 > > 14455: 272.2229 > > open("/mapdata/tiger/IL/Cook/tgr17031placecu.dbf", O_RDONLY) = 10 > > 14455: 272.2230 fstat64(10, 0xFFBF5AB8) = 0 > > 14455: 272.2231 fstat64(10, 0xFFBF5960) = 0 > > 14455: 272.2231 ioctl(10, TCGETA, 0xFFBF5A44) > > Err#25 ENOTTY > > 14455: 272.2232 read(10, "03 h05\t87\0\0\0 !01 U\0".., 8192) = 8192 > > 14455: 272.2232 lseek(10, 32, SEEK_SET) = 32 > > 14455: 272.2233 read(10, " G I S T _ I D\0\0\012 N".., 8192) = 8192 > > 14455: 272.2234 > > open("/mapdata/tiger/IL/Cook/tgr17031placecu.qix", O_RDONLY) Err#2 > > ENOENT > > 14455: 272.2235 lseek(8, 112, SEEK_SET) = 112 > > 14455: 272.2235 read(8, "C2BD 2 oD5F1 UC0AB \A8FC".., 8192) = 8192 > > 14455: 272.2236 lseek(8, 3256, SEEK_SET) = 3256 > > 14455: 272.2237 read(8, "03 < iE1B201 VC089 w80 '".., 8192) = 8192 > > 14455: 272.2237 lseek(8, 13872, SEEK_SET) = 13872 > > 14455: 272.2238 read(8, "828E VB5A4\t VC0CAC3 BAD".., 8192) = 8192 > > 14455: 272.2239 lseek(8, 17652, SEEK_SET) = 17652 > > 14455: 272.2240 read(8, "CBA0DAE0 D0F VC0 { K 9 _".., 8192) = 8192 > > 14455: 272.2240 lseek(8, 24028, SEEK_SET) = 24028 > > 14455: 272.2241 read(8, " 317B8 > 14455: 272.2242 lseek(8, 28788, SEEK_SET) = 28788 > > 14455: 272.2242 read(8, "BEF7 7 hAFF6 UC0 `AB048B".., 8192) = 8192 > > 14455: 272.2243 lseek(8, 31872, SEEK_SET) = 31872 > > 14455: 272.2244 read(8, "B8ACC2 f80F9 UC0B2D2A414".., 8192) = 8192 > > 14455: 272.2244 lseek(8, 33384, SEEK_SET) = 33384 > > 14455: 272.2245 read(8, " M ID6E1E8FA UC0 ` t y s".., 8192) = 8192 > > 14455: 272.2245 lseek(8, 34116, SEEK_SET) = 34116 > > 14455: 272.2246 read(8, " 507\bE6E8FA UC0A4 6 q r".., 8192) = 8192 > > 14455: 272.2247 lseek(8, 35596, SEEK_SET) = 35596 > > 14455: 272.2247 read(8, " . r O W wF3 UC0AB ]13D2".., 8192) = 8192 > > > > The seeks continue on for about a million more lines (seriously) and > > this takes forever. > > > > This is a really inefficient way to scan a file, what can I do? > > > > I"m running Mapserver 4.2.5 on Solaris 9. > > > > -Don > > -- > > Donald Drake > > President > > Drake Consulting > > http://www.drakeconsult.com/ > > http://www.MailLaunder.com/ > > http://www.mobilemeridian.com/ > > 312-560-1574 > > > > -- Donald Drake President Drake Consulting http://www.drakeconsult.com/ http://www.MailLaunder.com/ http://www.mobilemeridian.com/ 312-560-1574 From woodbri at SWOODBRIDGE.COM Thu Apr 7 14:03:34 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Thu, 7 Apr 2005 17:03:34 -0400 Subject: gazetter files In-Reply-To: <425595B2.5060507@gmx.net> Message-ID: joerg pfeiffer wrote: > hello, > > I would like to use a gazetter file of the format > Zwolfling P PPL 48.6166 13.5833 .... > > I am completely lost, how do I use it? > I only know the dbfs with extra shapefiles, this one comes alone. I guess my first question(s) are: What do you want to do with this file? o Display it as point names at the appropriate location? o be able to lookup the names and get their lat/long? o or something else? -Steve W. From fwarmerdam at GMAIL.COM Thu Apr 7 14:15:41 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Thu, 7 Apr 2005 17:15:41 -0400 Subject: Solaris lseek when reading shape files In-Reply-To: <6c21003b0504071353433454b5@mail.gmail.com> Message-ID: > > Don Drake wrote: > > > I'm using street-level data broken out by counties (tileindexed) and > > > I'm running into some performance problems on Solaris. We have this > > > working on Linux, similar maps take 5 seconds max and on Solaris they > > > take 45 seconds. ... > > > The seeks continue on for about a million more lines (seriously) and > > > this takes forever. > > > > > > This is a really inefficient way to scan a file, what can I do? > > > > > > I"m running Mapserver 4.2.5 on Solaris 9. Don, Looking at the pattern of seeks and reads, it would seem that stuff is getting read in 8K chunks which I would presume is being done by the C stdio library in response to lots of little reads in mapserver. Similarly it would seem that the low level seeks are being generated by the stdio library. In other words, I don't think this is under the control of MapServer. I'm not sure why things are so much slower on your Solaris box. As SteveW mentions, you didn't have the qix before but you say it didn't help. The qix should ensure that only (roughly) the right data is getting read. Are you essentially rendering everything? Have you verified that it is really the IO that is slowing you down? Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From woodbri at SWOODBRIDGE.COM Thu Apr 7 14:41:52 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Thu, 7 Apr 2005 17:41:52 -0400 Subject: Solaris lseek when reading shape files In-Reply-To: <931f8ea9050407141529e2b7b9@mail.gmail.com> Message-ID: Don, As Frank mentions, the qix file should make a difference, unless you are rendering everything in the shapefile. I'm not sure what your file structure is, but you might want to run something like: find /path/to/data -name "*.shp" -exec shptree {} \; just to make sure you have them all in place, They should not slow anything down. Also I did not catch that these are calls to open/read/lseek which are the low level system IO calls and not fopen/fread/fseek which are the calls the shapelib uses, so I would concur that this is the underlying Solaris IO system you are tracing which is outside the control of mapsever. This is not to say that this might not also be your problem, but I would investigate other mapserver config issues first. Do you have this "same" setup still on linux, can you compare the directory trees, the mapfile, are you really comparing apples to apples. Also, how large are the shapefile files that you are reading? How many entities? Are really rendering all entities in them? -Steve W. Frank Warmerdam wrote: >>>Don Drake wrote: >>> >>>>I'm using street-level data broken out by counties (tileindexed) and >>>>I'm running into some performance problems on Solaris. We have this >>>>working on Linux, similar maps take 5 seconds max and on Solaris they >>>>take 45 seconds. > > ... > >>>>The seeks continue on for about a million more lines (seriously) and >>>>this takes forever. >>>> >>>>This is a really inefficient way to scan a file, what can I do? >>>> >>>>I"m running Mapserver 4.2.5 on Solaris 9. > > > Don, > > Looking at the pattern of seeks and reads, it would seem that stuff > is getting read in 8K chunks which I would presume is being done by > the C stdio library in response to lots of little reads in mapserver. > Similarly it would seem that the low level seeks are being generated > by the stdio library. > > In other words, I don't think this is under the control of MapServer. > I'm not sure why things are so much slower on your Solaris box. > As SteveW mentions, you didn't have the qix before but you say > it didn't help. The qix should ensure that only (roughly) the right > data is getting read. Are you essentially rendering everything? > Have you verified that it is really the IO that is slowing you down? > > Best regards, > -- > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent > From assefa at DMSOLUTIONS.CA Thu Apr 7 14:55:47 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Thu, 7 Apr 2005 17:55:47 -0400 Subject: Unexpected WFS GetFeature results In-Reply-To: <2576812186CDD411BF1500508B6DCE9508A7DB4D@ecnwri1.ontario.int.ec.gc.ca> Message-ID: Tom, I have corrected the problem in the latest CVS. There is a bug attached to it (Bug 1308). Pleas let me know how it goes. Later, Kralidis,Tom [Burlington] wrote: > Assefa, > > I tested this scenario with CVS 20050328 (the day before you committed > to mapogcfilter.c and mapogcfilter.h), and everything works fine. > > So the problem is somewhere in those changes. > > Here's the actual OGC filter: > > > > > NAME > > -141.84,21.599999999999994 -56.16,74.16 > > > > > > title > benthic > > > abstract > benthic > > > > keywords > benthic > > > > > > ..Tom > > > >>-----Original Message----- >>From: UMN MapServer Users List >>[mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of >>Yewondwossen Assefa >>Sent: Wednesday, 06 April, 2005 13:03 >>To: MAPSERVER-USERS at LISTS.UMN.EDU >>Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS GetFeature results >> >> >>Tom, >> >> I did make some changes recently to the way filters were >>handled for postgis layers (Bug >>http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1292). >> >> It's probably related to thoses changes. Is it easy for you >>to test it against 4.4.x releases ? If you can test and It >>works I will start looking into the code to see what the problem is. >> >>Later, >> >> >>Kralidis,Tom [Burlington] wrote: >> >>>Hi, >>> >>>(MapServer CVS, FC2, latest stable supporting libs). >>> >>>I have a WFS instance running against a PostGIS table, and when I >>>invoke a Filter'd GetFeature operation (bbox AND a nested OR), I >>>expect one result to be returned (only one record in the DB >> >>satisfies >> >>>this request). >>> >>>I've attached a sample HTML form page to correctly invoke >> >>the request. >> >>>However, I receive all records back in the DB. >>> >>>Any idea what's going on here? FYI, here's my DATA string in the >>>LAYER >>>object: >>> >>> DATA "the_geom from (select service_endpoints.organization as >>>organization,service_endpoints.endpoint_getresource as >>>endpoint_getresource,service_endpoints.service_type as >>>service_type,service_endpoints.service_version as >>>service_version,service_resources.the_geom as >>>the_geom,service_resources.resource_id as >>>resource_id,service_resources.service_id as >>>service_id,service_resources.name as >> >>name,service_resources.title as >> >>>title,service_resources.abstract as >>>abstract,service_resources.keywords >>>as keywords,service_resources.dataurl as >>>dataurl,service_resources.metadataurl as >>>metadataurl,service_resources.legendurl as >>>legendurl,service_resources.scale_min as >>>scale_min,service_resources.scale_max >>> as scale_max,service_resources.srs as >> >>srs,service_endpoints.format_list >> >>>as format_list,service_resources.style_list as >>>style_list,service_resources.time_extent as >>>time_extent,service_resources.queryable as queryable from >>>service_resources inner join service_endpoints on >>>service_endpoints.service_id = >> >>service_resources.service_id) as t using >> >>>unique resource_id" >>> >>>Thanks >>> >>>..Tom >>> >>> >>> >> >>---------------------------------------------------------------------- >> >>>-- >>> >>> >>> >>> >>> >>> >> >>-- >>---------------------------------------------------------------- >>Assefa Yewondwossen >>Software Analyst >> >>Email: assefa at dmsolutions.ca >>http://www.dmsolutions.ca/ >> >>Phone: (613) 565-5056 (ext 14) >>Fax: (613) 565-0925 >>---------------------------------------------------------------- >> > > > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From jmckenna at DMSOLUTIONS.CA Thu Apr 7 15:09:47 2005 From: jmckenna at DMSOLUTIONS.CA (Jeff McKenna) Date: Thu, 7 Apr 2005 18:09:47 -0400 Subject: Getting ESRI to talk to my WMS In-Reply-To: <1112902294.27566.41.camel@Phobos> Message-ID: Hi Jason, I just recently had to set up some data through WMS for some remote ArcGIS users. I did not have to include any special parameters/metadata that i know of for the WMS server. I did however add optional metadata for each layer, such as "wms_srs". I used mapserv version 4.4.1. maybe i got lucky :) maybe you could include a small test wms-server mapfile (that fails in arc) for everyone on the list. jeff Jason Grimes wrote: > Hi, > > I have set up a WMS service on my local machine. We would like to give > ArcGIS users access to the layers but it will not talk to the WMS > service. I can get Jump to talk and of course MapServer/Chameleon also > talks with the service and no problems. Is there a specific way in > which you have to set up the map file? According to my research ArcGIS > will not connect up to WMS servers that use any other projection except > a Lat/Lon one. I re-projected some of our data using EPSG:4326 and setup > a map file with only this projection and ArcGIS will still not talk. It > reads the capabilities just fine, but after that it will not contact the > server again. I have watched the Apache logs and I can see the > capabilities request come through and then nothing. I have also tried > other services like the DM Solutions demo here: > > http://www2.dmsolutions.ca/cgi-bin/mswms_gmap > > And it works fine with ArcGIS. Maybe one of the DM Solutions guys could > point me in the right direction. :) Any help would be most appretiated > and if there is a way of having the WMS also work with meter based > projections (like Albers) at the same time would be great too. Thanks, > > Jason > -- Jeff McKenna DM Solutions Group Inc. http://www.dmsolutions.ca From jgrimes at GI.ALASKA.EDU Thu Apr 7 16:36:05 2005 From: jgrimes at GI.ALASKA.EDU (Jason Grimes) Date: Thu, 7 Apr 2005 15:36:05 -0800 Subject: Getting ESRI to talk to my WMS In-Reply-To: <4255AFAB.4060105@dmsolutions.ca> Message-ID: Thanks Jeff, I didn't specify the "wms_srs" for each layer, just in the map object. Maybe that is my problem, I will add it in to each layer. Here is my test map file... MAP NAME "GINA_WMS_TEST" EXTENT -120 38 -76 60 DEBUG on IMAGETYPE JPG IMAGECOLOR 255 255 255 STATUS ON SIZE 600 400 SYMBOLSET "/usr/local/apache2/htdocs/landman/chameleon/etc/symbols.sym" SHAPEPATH "/usr/local/apache2/htdocs/WMS" PROJECTION "init=epsg:4326" END WEB METADATA "wms_title" "GINA WMS Test" "wms_onlineresource" "https://phobos.gina.alaska.edu/cgi-bin/ginawms?" "wms_srs" "EPSG:4326" "wms_abstract" "GINA test WMS server" END END # # Start of layers # LAYER NAME "State_of_Alaska_LL" STATUS on DATA "alaska-latlon.shp" TYPE LINE TEMPLATE "ttt_query.html" MAXSCALE 28000000.0 MINSCALE 10.0 PROJECTION "init=epsg:4326" END METADATA "wms_title" "State_of_Alaska_LL" "wms_abstract" "Test Alaska state outline in Lat-Lon projection." END CLASS NAME "State_of_Alaska_LL" SYMBOL 0 STYLE COLOR 212 208 200 END END END END Jason On Thu, 2005-04-07 at 14:09, Jeff McKenna wrote: > Hi Jason, > > I just recently had to set up some data through WMS for some remote > ArcGIS users. I did not have to include any special parameters/metadata > that i know of for the WMS server. I did however add optional metadata > for each layer, such as "wms_srs". I used mapserv version 4.4.1. maybe > i got lucky :) > > maybe you could include a small test wms-server mapfile (that fails in > arc) for everyone on the list. > > > jeff > > > > > Jason Grimes wrote: > > Hi, > > > > I have set up a WMS service on my local machine. We would like to give > > ArcGIS users access to the layers but it will not talk to the WMS > > service. I can get Jump to talk and of course MapServer/Chameleon also > > talks with the service and no problems. Is there a specific way in > > which you have to set up the map file? According to my research ArcGIS > > will not connect up to WMS servers that use any other projection except > > a Lat/Lon one. I re-projected some of our data using EPSG:4326 and setup > > a map file with only this projection and ArcGIS will still not talk. It > > reads the capabilities just fine, but after that it will not contact the > > server again. I have watched the Apache logs and I can see the > > capabilities request come through and then nothing. I have also tried > > other services like the DM Solutions demo here: > > > > http://www2.dmsolutions.ca/cgi-bin/mswms_gmap > > > > And it works fine with ArcGIS. Maybe one of the DM Solutions guys could > > point me in the right direction. :) Any help would be most appretiated > > and if there is a way of having the WMS also work with meter based > > projections (like Albers) at the same time would be great too. Thanks, > > > > Jason > > > From Tom.Kralidis at EC.GC.CA Thu Apr 7 17:04:05 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Thu, 7 Apr 2005 20:04:05 -0400 Subject: Unexpected WFS GetFeature results Message-ID: Assefa, I retested, no luck. Now I get no results returned running the same test. ..Tom > -----Original Message----- > From: Yewondwossen Assefa [mailto:assefa at dmsolutions.ca] > Sent: Thursday, 07 April, 2005 17:56 > To: Kralidis,Tom [Burlington] > Cc: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS GetFeature results > > > Tom, > > I have corrected the problem in the latest CVS. There is a bug > attached to it (Bug 1308). Pleas let me know how it goes. > > Later, > > Kralidis,Tom [Burlington] wrote: > > Assefa, > > > > I tested this scenario with CVS 20050328 (the day before > you committed > > to mapogcfilter.c and mapogcfilter.h), and everything works fine. > > > > So the problem is somewhere in those changes. > > > > Here's the actual OGC filter: > > > > > > > > > > NAME > > > > -141.84,21.599999999999994 > -56.16,74.16 > > > > > > > > > > > > title > > benthic > > > > > > abstract > > benthic > > > > > > > > keywords > > benthic > > > > > > > > > > > > ..Tom > > > > > > > >>-----Original Message----- > >>From: UMN MapServer Users List > >>[mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of > >>Yewondwossen Assefa > >>Sent: Wednesday, 06 April, 2005 13:03 > >>To: MAPSERVER-USERS at LISTS.UMN.EDU > >>Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS GetFeature results > >> > >> > >>Tom, > >> > >> I did make some changes recently to the way filters were > >>handled for postgis layers (Bug > >>http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1292). > >> > >> It's probably related to thoses changes. Is it easy for you > >>to test it against 4.4.x releases ? If you can test and It > >>works I will start looking into the code to see what the problem is. > >> > >>Later, > >> > >> > >>Kralidis,Tom [Burlington] wrote: > >> > >>>Hi, > >>> > >>>(MapServer CVS, FC2, latest stable supporting libs). > >>> > >>>I have a WFS instance running against a PostGIS table, and when I > >>>invoke a Filter'd GetFeature operation (bbox AND a nested OR), I > >>>expect one result to be returned (only one record in the DB > >> > >>satisfies > >> > >>>this request). > >>> > >>>I've attached a sample HTML form page to correctly invoke > >> > >>the request. > >> > >>>However, I receive all records back in the DB. > >>> > >>>Any idea what's going on here? FYI, here's my DATA string in the > >>>LAYER > >>>object: > >>> > >>> DATA "the_geom from (select service_endpoints.organization as > >>>organization,service_endpoints.endpoint_getresource as > >>>endpoint_getresource,service_endpoints.service_type as > >>>service_type,service_endpoints.service_version as > >>>service_version,service_resources.the_geom as > >>>the_geom,service_resources.resource_id as > >>>resource_id,service_resources.service_id as > >>>service_id,service_resources.name as > >> > >>name,service_resources.title as > >> > >>>title,service_resources.abstract as > >>>abstract,service_resources.keywords > >>>as keywords,service_resources.dataurl as > >>>dataurl,service_resources.metadataurl as > >>>metadataurl,service_resources.legendurl as > >>>legendurl,service_resources.scale_min as > >>>scale_min,service_resources.scale_max > >>> as scale_max,service_resources.srs as > >> > >>srs,service_endpoints.format_list > >> > >>>as format_list,service_resources.style_list as > >>>style_list,service_resources.time_extent as > >>>time_extent,service_resources.queryable as queryable from > >>>service_resources inner join service_endpoints on > >>>service_endpoints.service_id = > >> > >>service_resources.service_id) as t using > >> > >>>unique resource_id" > >>> > >>>Thanks > >>> > >>>..Tom > >>> > >>> > >>> > >> > >>------------------------------------------------------------ > ---------- > >> > >>>-- > >>> > >>> > >>> > >>> > >>> > >>> > >> > >>-- > >>---------------------------------------------------------------- > >>Assefa Yewondwossen > >>Software Analyst > >> > >>Email: assefa at dmsolutions.ca > >>http://www.dmsolutions.ca/ > >> > >>Phone: (613) 565-5056 (ext 14) > >>Fax: (613) 565-0925 > >>---------------------------------------------------------------- > >> > > > > > > > > -- > ---------------------------------------------------------------- > Assefa Yewondwossen > Software Analyst > > Email: assefa at dmsolutions.ca > http://www.dmsolutions.ca/ > > Phone: (613) 565-5056 (ext 14) > Fax: (613) 565-0925 > ---------------------------------------------------------------- > > > From nhv at CAPE.COM Thu Apr 7 17:32:26 2005 From: nhv at CAPE.COM (Norman Vine) Date: Thu, 7 Apr 2005 20:32:26 -0400 Subject: Google maps w/ satellite imagery In-Reply-To: <20050407183413.GA7948@cs.brown.edu> Message-ID: Mark Dieterich writes: > > > Yes, we simply spawn shp2img on the same mapfile (with different EXTENT) > > for each 300x300 tile. Generating the whole map at once would surely > > not be feasible--I'm currently working on a map that is, at the highest > > zoom level, about one quarter of a terrapixel! However, we have > > So it sounds like you are generating all of the tiles statically and > then just serving those up via javascript? Has anyone tried using > mapserver to tile on the fly, i.e. use mapserver to generate image tiles > at certain zoom levels based on feedback of the user searches. Then > store tiles in a server cache. When users request a map, have the > server check the server tile cache, before kicking off mapserver to > create new tiles. We do almost exactly this for osgPlanet the difference being that the cache is maintained client side :-) http://www.ossim.org/tiki-view_blog.php?blogId=3 Norman From jmckenna at DMSOLUTIONS.CA Thu Apr 7 17:37:39 2005 From: jmckenna at DMSOLUTIONS.CA (Jeff McKenna) Date: Thu, 7 Apr 2005 20:37:39 -0400 Subject: Getting ESRI to talk to my WMS In-Reply-To: <1112916965.27566.56.camel@Phobos> Message-ID: i would also check your apache logs to see the full request sent by Arc. jeff Jason Grimes wrote: > Thanks Jeff, > > I didn't specify the "wms_srs" for each layer, just in the map object. > Maybe that is my problem, I will add it in to each layer. Here is my > test map file... > > MAP > NAME "GINA_WMS_TEST" > EXTENT -120 38 -76 60 > > DEBUG on > > IMAGETYPE JPG > IMAGECOLOR 255 255 255 > STATUS ON > SIZE 600 400 > SYMBOLSET > "/usr/local/apache2/htdocs/landman/chameleon/etc/symbols.sym" > > SHAPEPATH "/usr/local/apache2/htdocs/WMS" > > PROJECTION > "init=epsg:4326" > END > > WEB > METADATA > "wms_title" "GINA WMS Test" > "wms_onlineresource" > "https://phobos.gina.alaska.edu/cgi-bin/ginawms?" > "wms_srs" "EPSG:4326" > "wms_abstract" "GINA test WMS server" > END > END > > # > # Start of layers > # > > LAYER > NAME "State_of_Alaska_LL" > STATUS on > DATA "alaska-latlon.shp" > TYPE LINE > TEMPLATE "ttt_query.html" > MAXSCALE 28000000.0 > MINSCALE 10.0 > > PROJECTION > "init=epsg:4326" > END > > METADATA > "wms_title" "State_of_Alaska_LL" > "wms_abstract" "Test Alaska state outline in > Lat-Lon projection." > END > CLASS > NAME "State_of_Alaska_LL" > SYMBOL 0 > STYLE > COLOR 212 208 200 > END > END > END > END > > Jason > > On Thu, 2005-04-07 at 14:09, Jeff McKenna wrote: > >>Hi Jason, >> >>I just recently had to set up some data through WMS for some remote >>ArcGIS users. I did not have to include any special parameters/metadata >>that i know of for the WMS server. I did however add optional metadata >>for each layer, such as "wms_srs". I used mapserv version 4.4.1. maybe >>i got lucky :) >> >>maybe you could include a small test wms-server mapfile (that fails in >>arc) for everyone on the list. >> >> >>jeff >> >> >> >> >>Jason Grimes wrote: >> >>>Hi, >>> >>>I have set up a WMS service on my local machine. We would like to give >>>ArcGIS users access to the layers but it will not talk to the WMS >>>service. I can get Jump to talk and of course MapServer/Chameleon also >>>talks with the service and no problems. Is there a specific way in >>>which you have to set up the map file? According to my research ArcGIS >>>will not connect up to WMS servers that use any other projection except >>>a Lat/Lon one. I re-projected some of our data using EPSG:4326 and setup >>>a map file with only this projection and ArcGIS will still not talk. It >>>reads the capabilities just fine, but after that it will not contact the >>>server again. I have watched the Apache logs and I can see the >>>capabilities request come through and then nothing. I have also tried >>>other services like the DM Solutions demo here: >>> >>>http://www2.dmsolutions.ca/cgi-bin/mswms_gmap >>> >>>And it works fine with ArcGIS. Maybe one of the DM Solutions guys could >>>point me in the right direction. :) Any help would be most appretiated >>>and if there is a way of having the WMS also work with meter based >>>projections (like Albers) at the same time would be great too. Thanks, >>> >>>Jason >>> >> > -- Jeff McKenna DM Solutions Group Inc. http://www.dmsolutions.ca From pspencer at DMSOLUTIONS.CA Thu Apr 7 17:42:00 2005 From: pspencer at DMSOLUTIONS.CA (Paul Spencer) Date: Thu, 7 Apr 2005 20:42:00 -0400 Subject: Customize query results... In-Reply-To: <42555FA0.7000402@smumn.edu> Message-ID: Scott, please use the Chameleon users list: http://lists.maptools.org/mailman/listinfo/chameleon for Chameleon-related questions to ensure the best chance of getting your question answered :) The only way to customize the results of the query widget at this time are to follow the instructions at: http://chameleon.maptools.org/tiki/tiki-index.php?page=QueryWidgetCustomizingResults Cheers Paul Scott Knutti wrote: > Has anyone been successful in customizing the results of a query using > the Chameleon Query widget? > > Scott > From ortelius at GMAIL.COM Thu Apr 7 17:44:50 2005 From: ortelius at GMAIL.COM (Jeffrey Johnson) Date: Thu, 7 Apr 2005 17:44:50 -0700 Subject: Install/Config Problems Message-ID: Hello, I am attempting to install and configure mapserver+phpmapscript+chameleon on my debian/linux box and have run into a currently insurmountable issue. apache+php config is fine. Haven't really tested php extensively, but some simple tests work ok. I have configured Mapserver with the following command. ./configure --with-proj --with-ogr --with-gdal --with-jpeg --with-png --with-tiff --with-postgis --with-wfs --with-wcs --with-wms --with-wfsclient --with-wmsclient --with-php=/usr/src/php-4.3.10/ then ran make and copied the 'mapserv' executable into the cgi-bin directory. When attempting to access a mapfile using the cgi-script directly http://domainname.com/cgi-bin/mapserv?map=/home/www/map1.map&mode=map I am returned '500 Internal Server error'. The logfile contains 'Premature end of script headers: /usr/local/apache/cgi-bin/mapserv' If I re-run configure and remove the --with-php=/usr/src/php-4.3.10/ directive and recompile, the map displays fine. I had originally compiled PHP as a DSO, but couldnt get mapserver to work this way either, so reverted to compiling php into apache directly. Any ideas? Thanks in advance, Jeff From pspencer at DMSOLUTIONS.CA Thu Apr 7 18:49:42 2005 From: pspencer at DMSOLUTIONS.CA (Paul Spencer) Date: Thu, 7 Apr 2005 21:49:42 -0400 Subject: more on google maps Message-ID: for the geeks out there ... http://69.90.152.144/collab/GoogleMapsHacking Cheers Paul -- +-----------------------------------------------------------------+ |Paul Spencer pspencer at dmsolutions.ca | +-----------------------------------------------------------------+ |Applications & Software Development | |DM Solutions Group Inc http://www.dmsolutions.ca/| +-----------------------------------------------------------------+ From ARyan at CO.LINN.OR.US Thu Apr 7 13:27:01 2005 From: ARyan at CO.LINN.OR.US (Ryan, Adam) Date: Thu, 7 Apr 2005 13:27:01 -0700 Subject: Multiple attribute query with a regular expression. Message-ID: Erv, Are you using =~ when using regular expressions? Also, try using an uppercase OR. Adam > -----Original Message----- > From: Erv McNally [mailto:erv.mcnally at GMAIL.COM] > Sent: Thursday, April 07, 2005 1:13 PM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: [UMN_MAPSERVER-USERS] Multiple attribute query with > a regular expression. > > > I currently can use PHP mapscript to query multiple > attributes using queryByAttributes($qitem,$qstring,MS_MULTIPLE); > $qitem='att1' > $qstring=('[att1]'='test' or '[att1]' = 'test2' and '[att3]'='test3') > > I also can use a regular expression to query on a single > attribute by setting the $qitem='att1' $qstring='/^[Tt].*/' > to search for all records with att1 that starts with a T or t. > > The problem is that I can't seem to find any way to query on > different attributes while using a regular expression as > follows. $qitem='att1' $qstring=('[att1]' = '/^[Tt].*/' or > '[att2]'='test2') > > I have not been able to make the above work by using any of > the following and many other combinations. $qstring=('[att1]' > = /^[Tt].*/ or '[att2]'='test2') with error > msDBFGetItemIndex(): Item 'Tt' not found. $qstring=('[att1]' > = '/^[Tt].*/' or '[att2]'='test2') with error > msDBFGetItemIndex(): Item 'Tt' not found. $qstring=('[att1]' > = '/^[Tt].*/') with error msDBFGetItemIndex(): Item 'Tt' not > found. $qstring=('[name]' = /^T.*/) with error > msEvalExpression: Failed to parse expression > msyyparse(): syntax error. > > The last one seems like the expression is trying to be parsed. > > This wouldn't be necessary if there was a way to intersect > querys or to do a sub query on results from a prior query. I > know that you can add features by using querybyIndex, but > that would be a union and I am interested in the > intersection. Any information or insights would be greatly > appreciated. > From ARyan at CO.LINN.OR.US Wed Apr 6 17:33:24 2005 From: ARyan at CO.LINN.OR.US (Ryan, Adam) Date: Wed, 6 Apr 2005 17:33:24 -0700 Subject: Google maps w/ satellite imagery Message-ID: I've got to put my two cents of disagreement in on this one. Ask your users if they'll accept limiting their maps to a dozen pre-set scales in exchange for slightly better performance. I wouldn't. Cheers, Adam > -----Original Message----- > From: Mike Davis [mailto:mike.and.kerry at GMAIL.COM] > Sent: Wednesday, April 06, 2005 5:25 PM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery > > > I am curious who on the list has been using an AJAX approach > to mapping with mapserver. > > As users of my web applications discover google maps and the > speed at which it delivers imagery, I am starting to hear > rumblings about the performance of our in-house applications. > > Tools or techniques to tile imagery and pre-cache on the > client would be especially useful. > > -Mike > > On Apr 6, 2005 5:20 AM, Fawcett, David > wrote: > > Perhaps there is an opportunity (formal or informal) at the > MUM 2005 > > for people to show how they have been using an AJAX-esque > approach to > > MapServer applications. > > > > David Fawcett > > Minnesota Office of Environmental Assistance > > david.fawcett at moea.state.mn.us 651.215.0200 > > > > > > -----Original Message----- > > From: UMN MapServer Users List > > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On > > Behalf Of Pascoe,Tim [Burlington] > > Sent: Wednesday, April 06, 2005 8:01 AM > > To: MAPSERVER-USERS at LISTS.UMN.EDU > > Subject: Re: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery > > > > Take a look at: > > > > http://adaptivepath.com/publications/essays/archives/000385.php > > > > I believe this is the technology behind the Google Maps interface. > > > > Tim > > > > -----Original Message----- > > From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at lists.umn.edu] > > On Behalf Of Charlton Purvis > > Sent: April 6, 2005 8:18 AM > > To: MAPSERVER-USERS at lists.umn.edu > > Subject: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery > > > > For those of you who haven't seen it, you're missing out. > > http://maps.google.com has satellite imagery that performs > > spectacularly. Enter an address; the satellite option is a > link in the > > upper RH corner of > > that page. > > > > Even the dingbat public is tuned in to the site, > > > http://www.cnn.com/2005/TECH/internet/04/05/go> ogle.maps.ap/index.html. > > > > Charlton > > > From woodbri at SWOODBRIDGE.COM Thu Apr 7 19:02:22 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Thu, 7 Apr 2005 22:02:22 -0400 Subject: Install/Config Problems In-Reply-To: Message-ID: Jeffrey, In debian, and probably other systems it is possible to build a separate version of mapserver and php that are outside the standard distributions and then use then specifically in directories that are doing mapscript and all the standard php stuff runs from the other directories. Here is how I did it for using 4.0.1 # required by gd-2 sudo apt-get install libpng3 libpng3-dev sudo apt-get install libjpeg62 libjpeg62-dev # required by php4 sudo apt-get install libmysqlclient10-dev # required by owt sudo apt-get install libttf-dev libttf2 # For curl-7.11.0.tar.gz ( cd curl-7.11.0 echo '--------------------- curl-7.11.0 ------------------------' ./configure --prefix=/opt/mapserver/ make sudo make install ) sleep 5 # For freetype-2.1.5.tar.gz ( cd freetype-2.1.5 echo '-------------------- freetype-2.1.5 ----------------------' ./configure --prefix=/opt/mapserver/ make sudo make install ) sleep 5 # For gd-2.0.21.tar.gz ( cd gd-2.0.21 echo '---------------------- gd-2.0.21 --------------------------' ./configure --prefix=/opt/mapserver/ --with-freetype=/opt/mapserver/ make sudo make install ) sleep 5 # For gdal-1.1.9.tar.gz ( cd gdal-1.1.9 echo '--------------------- gdal-1.1.9 --------------------------' ./configure --prefix=/opt/mapserver/ --with-ogr --without-gif make sudo make install ) sleep 5 # For proj-4.4.7.tar.gz ( cd proj-4.4.7 echo '--------------------- proj-4.4.7 --------------------------' ./configure --prefix=/opt/mapserver/ make sudo make install ) sleep 5 # For expat-1.95.7.tar.gz ( cd expat-1.95.7 echo '-------------------- expat-1.95.7 -------------------------' ./configure --prefix=/opt/mapserver/ make sudo make install ) sleep 5 # For php-4.3.4.tar.gz ( cd mapserver-4.0.1 ./configure \ --with-httpd=/usr/sbin/apache \ --with-proj=/opt/mapserver \ --with-wmsclient \ --with-gd=/opt/mapserver \ --with-freetype=/opt/mapserver \ --with-gdal \ --with-ogr=/opt/mapserver/bin/gdal-config \ --with-php=../php-4.3.4 \ --without-tiff \ --enable-runpath \ --without-xpm \ --with-curl-config=/opt/mapserver/bin/curl-config make sudo mkdir /opt/mapserver/cgi-bin sudo cp mapserv scalebar legend /opt/mapserver/cgi-bin/ sudo cp mapscript/php3/php_mapscript.so /opt/mapserver/php4/extensions/ ) After this you need config apache with a block that uses the /opt/mapserver/cgi-bin/php version you built above for any php scripts and then keep all you php/mapscript scripts in this directory tree. Any php scripts out side the directory tree will use system version of php whatever that is. Hope this helps, -Steve W. Jeffrey Johnson wrote: > Hello, > > I am attempting to install and configure > mapserver+phpmapscript+chameleon on my debian/linux box and have run > into a currently insurmountable issue. apache+php config is fine. > Haven't really tested php extensively, but some simple tests work ok. > I have configured Mapserver with the following command. > > ./configure --with-proj --with-ogr --with-gdal --with-jpeg --with-png > --with-tiff --with-postgis --with-wfs --with-wcs --with-wms > --with-wfsclient --with-wmsclient --with-php=/usr/src/php-4.3.10/ > > then ran make and copied the 'mapserv' executable into the cgi-bin > directory. When attempting to access a mapfile using the cgi-script > directly http://domainname.com/cgi-bin/mapserv?map=/home/www/map1.map&mode=map > I am returned '500 Internal Server error'. The logfile contains > 'Premature end of script headers: /usr/local/apache/cgi-bin/mapserv' > > If I re-run configure and remove the --with-php=/usr/src/php-4.3.10/ > directive and recompile, the map displays fine. > > I had originally compiled PHP as a DSO, but couldnt get mapserver to > work this way either, so reverted to compiling php into apache > directly. > > Any ideas? > > Thanks in advance, > > Jeff > From dpinte at ITAE.BE Fri Apr 8 01:20:05 2005 From: dpinte at ITAE.BE (Didrik Pinte) Date: Fri, 8 Apr 2005 10:20:05 +0200 Subject: raster : bad quality in output In-Reply-To: <4BF377919225F449BB097CB76FFE9BC81882C8@ptolemy.topozone.com> Message-ID: Le jeudi 07 avril 2005 ? 12:00 -0400, Ed McNierney a ?crit : > Didrik - > > What I meant was, "are all the pixels in the relevant portion of the input image used exactly once to produce one pixel in the output image"? That is, is the output image a rectangular piece of the original input image at the same size, or is it "zoomed in" or "zoomed out"? > > Unfortunately, scale ratios are meaningless for digital images without also specifying the output resolution in pixels per physical unit (inch, cm, etc.). It is very likely that the scale ratios of your source images refer to a different resolution than the default 72 pixels per inch that MapServer uses. > > Can you find out what the intended output resolution of your rasters is? For example, if I tell you that a raster is at 1/50000 scale, I am saying that one cm on the image equals 5 km on the ground. But that obviously depends on the physical resolution at which the image is viewed - if I am viewing it at 50 pixels per cm, then 50 pixels in the image equals 5 km on the gorund. But if I'm viewing it at 100 pixels per cm, then 100 pixels in the image equals 5 km on the ground. You need to know the intended viewing resolution in order to answer this question. > > If the rasters are scanned images of printed maps, this value would normally be the scan resolution. > > - Ed Great, I received the information about the "intented viewing resolution". It was 32 points per cm, giving 81.28 dpi ! I've set the RESOLUTION parameter to 81.28 and it renders perfectly when using scale near the raster scale ! Thank you very much for the information (and the explanation too). Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From arnulf.christl at CCGIS.DE Fri Apr 8 01:27:51 2005 From: arnulf.christl at CCGIS.DE (Arnulf Christl) Date: Fri, 8 Apr 2005 10:27:51 +0200 Subject: Google maps w/ satellite imagery In-Reply-To: Message-ID: Charlton Purvis wrote: >>>So it sounds like you are generating all of the tiles statically and >>>then just serving those up via javascript? Has anyone tried using >>>mapserver to tile on the fly, i.e. use mapserver to generate image tiles >>>at certain zoom levels based on feedback of the user searches. Then >>>store tiles in a server cache. When users request a map, have the >>>server check the server tile cache, before kicking off mapserver to >>>create new tiles. > > > Believe you me, I'd love to do this. But what prevents me from doing this > and w/o the help of 10,000 CPUs to burn like google maps, is the fact that > my underlying data changes constantly. I'm in the near real time ocean > observation business, and I try to cache as much as I can. Considering > that I go out around the clock fetching and aggregating ocean > observations, an image that a user requests could be saved, yes, for > caching purposes, but once the underlying data changes, that cached image > is SOL. The caching that I do is hourly to keep the initial maps and the > common extents performing somewhat snappily. But these hourly caches have > to be refreshed whenever any new data comes in. > > While the google maps stuff is sexy, what would really blow me away would > be a site that is that fast AND is also based on constantly changing > underlying data. > > Charlton > grumble... but this is what MapServer gives us ervery day!? WE are not as fast because WE do not have 10,000 CPUs and level 1 fibreoptix internet nodes - thats all. Warning: PointOfView! If you think this is too off topic just tell me i'll quit it. Maybe we should also discuss this topic the other way round. Why not tell Google to rather stick to standards and let them 10,000 CPUs burn MapServer images? :-) Just because Google is a bigshot in the web does not *have to* mean that they are stupid - ahhm - wont listen to you experts. I bet that Google could operate a bunch of MapServers just as fast as those cached and tiled googlemaps we see now. And they would not be restricted to scale levels. I also repeat myself when i say that google maps only *seem* to be faster psychologically - they definitely are not faster *physically*. Performance at this stage is eaten up by opening and closing requests in the browser. Believe me, we have this problem every day when we try to loose weight with our client interfaces. The WMS images are definitely *not* the bottleneck. Googlemaps is a nice experiment but we KNOW that it is no good in the long run. Have a look at the scales and resolution satellite image they offer, this is a minuscule fraction of all satellite and ortho images available world wide - as WMS. And googlemaps will never ever be able to be integrated with any of those datasets. What a waste of energy. Hey - we are falling back into medieval raster tile viewers - i thought that we had overcome those times long ago. Somebody should really point this out to Google, else they might make a big mess of the standardized infrastructures that are slowly emerging all over the place. We should not let this happen. We have MapServer installations running with TBs of aerial photography data which never take longer than a few millisec to answer. You simply cannot make this any faster (i know, i know Frank and Steve and Daniel and Yasseffa and all you other cracks *do* get it faster every now and then...). Our private little problem rather is the client. It is getting way to heavy because people cry for all those little gadgets functions and tools. Now it has to be animated panning and we just finished animated tabs... :-) Best, Arnulf. -- -------------------------- Arnulf B. Christl -------------------------- Mapbender User Conference: http://wms1.ccgis.de/ewiki -------------------------- http://www.ccgis.org http://www.mapbender.org -------------------------- From arnulf.christl at CCGIS.DE Fri Apr 8 01:52:04 2005 From: arnulf.christl at CCGIS.DE (Arnulf Christl) Date: Fri, 8 Apr 2005 10:52:04 +0200 Subject: Google maps w/ satellite imagery In-Reply-To: <16264e0705040710336942815c@mail.gmail.com> Message-ID: Camden Daily wrote: > I'd be very interested in trying to reverse engineer Google's maps as > well. The click-and-drag interface is so much nicer than having to > wait for reloads. Consider to refrain from expecting "normal" people to act as we "GIS people" do. We have conducted on and off analysis of user interactions on heavily frequented map interfaces. Most people never pan a map anywhere when they are initially navigated to the correct section of the map they want to see. So what i think is lot more important ragarding googlemaps is the way they geocode and reverse geolocate. Imagine Google implementing a standardized WFS / gazetteer. That would be really great indeed, interoperable and everything. Google databases already contains loads of geographically relevant data and information - it has simply not been tapped yet. > For all of our applications, losing arbitary zoom levels wouldn't be > all that bad. In many ways, it would simplify things, as you'd only > have to adjust your layers and displays for a preset number of zoom > levels, without having to worry about how the maps look as they > approach your various min/maxscales. That might be true for data that does not change often. It might also be true for data that you want to see in one coordinate system only. And for data that you do not want to overlay intersect and visualize with data from another source. Think interoperable and what googlemaps has shown us up to now is not worth a penny. > For turning different map layers on and off, couldn't one just > generate a different set of tiles for each layer, and create them with > transparent backgrounds? I can't see why javascript couldn't overlay > the different layers of tiles for a final image. That seems to be how > Google is drawing their icons over the maps. Doing it that way would > also allow for the toggling of layers without the need for a reload. This is the way most dynamic OWS map clients already do it for quite some time. > Of course, the major hassle, as with all javascript applications, is > supporting the wide variety of browsers out there. Last I checked > Google maps only supported IE and Mozilla (not even Opera or Safari), > though that may have changed by now. This is a mayor problem and we should not add new problems by sticking to predefined scales and ignoring the joys of interoperability (as Chris Holmes pointed out when we were discussing Wikimaps). Best Arnulf. -- -------------------------- Arnulf B. Christl -------------------------- Mapbender User Conference: http://wms1.ccgis.de/ewiki -------------------------- http://www.ccgis.org http://www.mapbender.org -------------------------- From lolivieri at IMTEAM.IT Fri Apr 8 01:53:23 2005 From: lolivieri at IMTEAM.IT (Leonardo Olivieri) Date: Fri, 8 Apr 2005 10:53:23 +0200 Subject: mapinfo query Message-ID: hello I use mapserver PHP/mapscript to make the queries spatiali on file MAPINFO, I still use the functions query $map->queryByRect($rect); or I have to use other functions after OGR to have opened a connection? does someone have some available examples or a link ? thanks in advance LEO -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailings at ABIWOOD99.DE Fri Apr 8 04:11:30 2005 From: mailings at ABIWOOD99.DE (Christian Schroeder) Date: Fri, 8 Apr 2005 13:11:30 +0200 Subject: Install/Config Problems In-Reply-To: Message-ID: Hello Jeffrey, I don't know what the problem concerning the php-module is, but once I had a problem with the mapserv CGI-Module, too and got the error message 'Premature end of script headers'. You can try to run the mapserv CGI-Module from console to get a more detailed error message. To do so, you have to call ./mapserv QUERY_STRING=map=/home/www/map1.map&mode=map This helped me to get more informations about which module failed. Regards, Christian Jeffrey Johnson : > Hello, > > I am attempting to install and configure > mapserver+phpmapscript+chameleon on my debian/linux box and have run > into a currently insurmountable issue. apache+php config is fine. > Haven't really tested php extensively, but some simple tests work ok. > I have configured Mapserver with the following command. > > ./configure --with-proj --with-ogr --with-gdal --with-jpeg --with-png > --with-tiff --with-postgis --with-wfs --with-wcs --with-wms > --with-wfsclient --with-wmsclient --with-php=/usr/src/php-4.3.10/ > > then ran make and copied the 'mapserv' executable into the cgi-bin > directory. When attempting to access a mapfile using the cgi-script > directly > http://domainname.com/cgi-bin/mapserv?map=/home/www/map1.map&mode=map > I am returned '500 Internal Server error'. The logfile contains > 'Premature end of script headers: /usr/local/apache/cgi-bin/mapserv' > > If I re-run configure and remove the --with-php=/usr/src/php-4.3.10/ > directive and recompile, the map displays fine. > > I had originally compiled PHP as a DSO, but couldnt get mapserver to > work this way either, so reverted to compiling php into apache > directly. > > Any ideas? > > Thanks in advance, > > Jeff > From superbla3000 at GMX.NET Fri Apr 8 04:56:41 2005 From: superbla3000 at GMX.NET (joerg pfeiffer) Date: Fri, 8 Apr 2005 13:56:41 +0200 Subject: gazetter files In-Reply-To: <4255A026.1090200@swoodbridge.com> Message-ID: Stephen Woodbridge schrieb: > joerg pfeiffer wrote: > >> hello, >> >> I would like to use a gazetter file of the format >> Zwolfling P PPL 48.6166 13.5833 .... >> >> I am completely lost, how do I use it? >> I only know the dbfs with extra shapefiles, this one comes alone. > > > I guess my first question(s) are: > What do you want to do with this file? > o Display it as point names at the appropriate location? > o be able to lookup the names and get their lat/long? > o or something else? > > -Steve W. > > I d like to display them as points with labels on my map. I found out, that I have to create a shapefile. I would like to do this with mapscript, but cant't find a good example at the moment... any help welcome :-) Joerg From superbla3000 at GMX.NET Fri Apr 8 05:03:30 2005 From: superbla3000 at GMX.NET (joerg pfeiffer) Date: Fri, 8 Apr 2005 14:03:30 +0200 Subject: gdal with mrSid compile howto Message-ID: hello, I think now is the moment, I have to compile gdal with mrSid support and then mapserver on top. Is there a good howto? Joerg From ed at TOPOZONE.COM Fri Apr 8 05:11:56 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Fri, 8 Apr 2005 08:11:56 -0400 Subject: raster : bad quality in output Message-ID: Didrik - Thanks! Congratulations on getting the RESOLUTION calculation right on the first try. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Didrik Pinte Sent: Friday, April 08, 2005 4:20 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] raster : bad quality in output Le jeudi 07 avril 2005 ? 12:00 -0400, Ed McNierney a ?crit : > Didrik - > > What I meant was, "are all the pixels in the relevant portion of the input image used exactly once to produce one pixel in the output image"? That is, is the output image a rectangular piece of the original input image at the same size, or is it "zoomed in" or "zoomed out"? > > Unfortunately, scale ratios are meaningless for digital images without also specifying the output resolution in pixels per physical unit (inch, cm, etc.). It is very likely that the scale ratios of your source images refer to a different resolution than the default 72 pixels per inch that MapServer uses. > > Can you find out what the intended output resolution of your rasters is? For example, if I tell you that a raster is at 1/50000 scale, I am saying that one cm on the image equals 5 km on the ground. But that obviously depends on the physical resolution at which the image is viewed - if I am viewing it at 50 pixels per cm, then 50 pixels in the image equals 5 km on the gorund. But if I'm viewing it at 100 pixels per cm, then 100 pixels in the image equals 5 km on the ground. You need to know the intended viewing resolution in order to answer this question. > > If the rasters are scanned images of printed maps, this value would normally be the scan resolution. > > - Ed Great, I received the information about the "intented viewing resolution". It was 32 points per cm, giving 81.28 dpi ! I've set the RESOLUTION parameter to 81.28 and it renders perfectly when using scale near the raster scale ! Thank you very much for the information (and the explanation too). Didrik From ed at TOPOZONE.COM Fri Apr 8 05:14:53 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Fri, 8 Apr 2005 08:14:53 -0400 Subject: Google maps w/ satellite imagery Message-ID: Adam - While I might agree with your conclusion, "slightly" better is probably not the case. Prebuilt images can be quite a bit faster and can also be of better quality, since any resampling can be done slowly and well. In the first release of TopoZone, the "map server" that delivered the pre-built tiles was six lines of code! - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Ryan, Adam Sent: Wednesday, April 06, 2005 8:33 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery I've got to put my two cents of disagreement in on this one. Ask your users if they'll accept limiting their maps to a dozen pre-set scales in exchange for slightly better performance. I wouldn't. Cheers, Adam > -----Original Message----- > From: Mike Davis [mailto:mike.and.kerry at GMAIL.COM] > Sent: Wednesday, April 06, 2005 5:25 PM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery > > > I am curious who on the list has been using an AJAX approach to > mapping with mapserver. > > As users of my web applications discover google maps and the speed at > which it delivers imagery, I am starting to hear rumblings about the > performance of our in-house applications. > > Tools or techniques to tile imagery and pre-cache on the client would > be especially useful. > > -Mike > > On Apr 6, 2005 5:20 AM, Fawcett, David > wrote: > > Perhaps there is an opportunity (formal or informal) at the > MUM 2005 > > for people to show how they have been using an AJAX-esque > approach to > > MapServer applications. > > > > David Fawcett > > Minnesota Office of Environmental Assistance > > david.fawcett at moea.state.mn.us 651.215.0200 > > > > > > -----Original Message----- > > From: UMN MapServer Users List > > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On > > Behalf Of Pascoe,Tim [Burlington] > > Sent: Wednesday, April 06, 2005 8:01 AM > > To: MAPSERVER-USERS at LISTS.UMN.EDU > > Subject: Re: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery > > > > Take a look at: > > > > http://adaptivepath.com/publications/essays/archives/000385.php > > > > I believe this is the technology behind the Google Maps interface. > > > > Tim > > > > -----Original Message----- > > From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at lists.umn.edu] > > On Behalf Of Charlton Purvis > > Sent: April 6, 2005 8:18 AM > > To: MAPSERVER-USERS at lists.umn.edu > > Subject: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery > > > > For those of you who haven't seen it, you're missing out. > > http://maps.google.com has satellite imagery that performs > > spectacularly. Enter an address; the satellite option is a > link in the > > upper RH corner of > > that page. > > > > Even the dingbat public is tuned in to the site, > > > http://www.cnn.com/2005/TECH/internet/04/05/go> ogle.maps.ap/index.html. > > > > Charlton > > > From ferencik.ioan at PERSONAL.RO Fri Apr 8 05:19:36 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Fri, 8 Apr 2005 15:19:36 +0300 Subject: simple question Message-ID: i am new to phpmapscript can somone tell me how to change scalebar's color from PhpMapscript? it is something like.. $map->scalebar->set(color, ?): i don't understand how to specify the color object thanks _____________________________________________ Castiga peste 1000 de premii cu Wella Design! http://wella.boom.ro From erv.mcnally at GMAIL.COM Fri Apr 8 05:22:30 2005 From: erv.mcnally at GMAIL.COM (Erv McNally) Date: Fri, 8 Apr 2005 07:22:30 -0500 Subject: Multiple attribute query with a regular expression. Message-ID: Thank you, Ryan, I was not using =~. The pattern binding operator. Everything works great now. Thanks again, Erv > > Erv, > > Are you using =~ when using regular expressions? Also, try using an > uppercase OR. > > Adam > > > > -----Original Message----- > > From: Erv McNally [mailto:erv.mcnally at GMAIL.COM] > > Sent: Thursday, April 07, 2005 1:13 PM > > To: MAPSERVER-USERS at LISTS.UMN.EDU > > Subject: [UMN_MAPSERVER-USERS] Multiple attribute query with > > a regular expression. > > > > > > I currently can use PHP mapscript to query multiple > > attributes using queryByAttributes($qitem,$qstring,MS_MULTIPLE); > > $qitem='att1' > > $qstring=('[att1]'='test' or '[att1]' = 'test2' and '[att3]'='test3') > > > > I also can use a regular expression to query on a single > > attribute by setting the $qitem='att1' $qstring='/^[Tt].*/' > > to search for all records with att1 that starts with a T or t. > > > > The problem is that I can't seem to find any way to query on > > different attributes while using a regular expression as > > follows. $qitem='att1' $qstring=('[att1]' = '/^[Tt].*/' or > > '[att2]'='test2') > > > > I have not been able to make the above work by using any of > > the following and many other combinations. $qstring=('[att1]' > > = /^[Tt].*/ or '[att2]'='test2') with error > > msDBFGetItemIndex(): Item 'Tt' not found. $qstring=('[att1]' > > = '/^[Tt].*/' or '[att2]'='test2') with error > > msDBFGetItemIndex(): Item 'Tt' not found. $qstring=('[att1]' > > = '/^[Tt].*/') with error msDBFGetItemIndex(): Item 'Tt' not > > found. $qstring=('[name]' = /^T.*/) with error > > msEvalExpression: Failed to parse expression > > msyyparse(): syntax error. > > > > The last one seems like the expression is trying to be parsed. > > > > This wouldn't be necessary if there was a way to intersect > > querys or to do a sub query on results from a prior query. I > > know that you can add features by using querybyIndex, but > > that would be a union and I am interested in the > > intersection. Any information or insights would be greatly > > appreciated. > > > From pspencer at DMSOLUTIONS.CA Fri Apr 8 05:40:23 2005 From: pspencer at DMSOLUTIONS.CA (Paul Spencer) Date: Fri, 8 Apr 2005 08:40:23 -0400 Subject: simple question In-Reply-To: <200504081219.j38CJag17995@zerg.astral.ro> Message-ID: $map->scalebar->color->setRGB( 255, 255, 255 ); Ferencik Ioan wrote: > i am new to phpmapscript > can somone tell me how to change scalebar's color from PhpMapscript? > > it is something like.. > $map->scalebar->set(color, ?): > i don't understand how to specify the color object > thanks > > _____________________________________________ > Castiga peste 1000 de premii cu Wella Design! > http://wella.boom.ro > -- +-----------------------------------------------------------------+ |Paul Spencer pspencer at dmsolutions.ca | +-----------------------------------------------------------------+ |Applications & Software Development | |DM Solutions Group Inc http://www.dmsolutions.ca/| +-----------------------------------------------------------------+ From nuri at NUSVIRTUAL.COM Fri Apr 8 05:46:23 2005 From: nuri at NUSVIRTUAL.COM (Nuri) Date: Fri, 8 Apr 2005 07:46:23 -0500 Subject: Complete Mapserver example Message-ID: Hi, I'm trying to run Mapserver for first time. Someone told me to installed MS4W in my computer to understand who Mapserver runs before execute it with IIS. Apache runs perfectly, but can't find any complete example of mapserver to install to my computer. Does someone knows if there are any complete working example? Some of them haven't got shapes, others haven't got templates, others codes that doesn't run in windows,... I thank for your help. From mholger at OPTERA.NET Fri Apr 8 06:02:47 2005 From: mholger at OPTERA.NET (Matthew Holger) Date: Fri, 8 Apr 2005 08:02:47 -0500 Subject: Solaris lseek when reading shape files In-Reply-To: <931f8ea9050407141529e2b7b9@mail.gmail.com> Message-ID: On Thu, Apr 07, 2005 at 05:15:41PM -0400, Frank Warmerdam wrote: > Don, > > Looking at the pattern of seeks and reads, it would seem that stuff > is getting read in 8K chunks which I would presume is being done by > the C stdio library in response to lots of little reads in mapserver. > Similarly it would seem that the low level seeks are being generated > by the stdio library. It's worse than that. Solaris, by default, uses an 8k-inode. Linux used to use 1k or 2k inodes in e2fs, but I think they went to 32k inodes as of late (been a long, long time). This would easily account for the increased read-time under Linux. trussing (and subsequently dtracing) mapserver on my own Solaris box shows the exact same behavior, which is something I'd been meaning to track down for awhile now, but just hadn't had the impoetus to do until now. :) The read/seek limit is going to be a factor of the disk block size in this case, so the solution here is to crank up your inode size. The downside to using a larger inode size is that smaller files may end up taking up MORE disk space, but not necessarily (this really becomes a discussion of Unix file storage techniques, which is beyond the scope of me, or this list, I'm afraid :) Cheers! -Matt. -- _ Matthew Holger (mholger at optera.net) || ASCII ribbon campaign ( ) Unix Systems Administrator || against HTML Email X http://www.Optera.NET/ :: m:651.271.3248 || http://arc.pasp.de/ / \ From pscott at UWC.AC.ZA Fri Apr 8 07:49:56 2005 From: pscott at UWC.AC.ZA (Paul Scott) Date: Fri, 8 Apr 2005 15:49:56 +0100 Subject: make error Message-ID: Hey list, I am trying to compile Mapserver-4.4.1 on RH9 with configure options of: /configure --without-tiff --without-eppl --with-threads --with-geos --with-proj --with-gdal=/usr/local/bin/gdal-config --with-ogr --with-php=/home/paul/mapserver/php-4.3.11 --with-gd=/usr/local --with-freetype=/usr/bin --without-pdf --with-ming --with-wmsclient --with-wfs --with-wfsclient --with-postgis=/usr/local/pgsql/bin/pg_config but it fails with: gcc -c -O2 -fPIC -Wall -DIGNORE_MISSING_DATA -DNEED_STRLCAT -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_WMS_SVR -DUSE_WMS_LYR -DUSE_WFS_SVR -DUSE_WFS_LYR -DUSE_MING_FLASH -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DUSE_OGR -DUSE_GDAL -DUSE_GEOS -DUSE_ICONV -DUSE_POSTGIS -DUSE_THREAD -I/usr/local/include -I/usr/local/include -I/usr/local/pgsql/include -I/usr/local/include -I maptemplate.c -o maptemplate.o gcc: no input files make: *** [maptemplate.o] Error 1 I have tried running ldconfig (in case it was missing a lib), but nothing seems to help. Do I need to export some flag? Any ideas? Any help would be greatly appreciated. --Paul From BEN at SYNCERA-ITSOLUTIONS.NL Fri Apr 8 06:50:30 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Fri, 8 Apr 2005 15:50:30 +0200 Subject: zoomout ESRI-style (with a box), Mapserver CGI Message-ID: Hi list, I wanted to use DBox to create a zoomout ESRI-style (zoomout with a box, the smaller the box, the bigger the zoom out) for Mapserver, but apparently this does not seem to be implemented, i.e. what I am looking for is using imgbox in combination with the zoomdir parameter. Should I file an enhancement bug, or is there a hidden feature somewhere? I tested mode=browse&zoomdir=-1&imgbox=100,100,200,200 but it just zooms in to the box, so zoomdir does not seem to be taken into account. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl From fwarmerdam at GMAIL.COM Fri Apr 8 07:12:57 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri, 8 Apr 2005 10:12:57 -0400 Subject: make error In-Reply-To: <1112971796.6523.45.camel@localhost> Message-ID: On Apr 8, 2005 10:49 AM, Paul Scott wrote: > -DUSE_THREAD -I/usr/local/include -I/usr/local/include > -I/usr/local/pgsql/include -I/usr/local/include -I maptemplate.c -o > maptemplate.o > gcc: no input files > make: *** [maptemplate.o] Error 1 Paul, In the above build line you can see "-I maptemplate.c". What is happening is that for some reason a "bare" -I was put into your Makefile by configure, and this is "eating" the maptemplate.c - treating it as an include directory name. You need to edit your Makefile by hand, and search for this bare -I and remove it. In fact, once you see what variable it is in, you may be able to figure out what went wrong in the configure. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From ortelius at GMAIL.COM Fri Apr 8 07:14:37 2005 From: ortelius at GMAIL.COM (Jeffrey Johnson) Date: Fri, 8 Apr 2005 07:14:37 -0700 Subject: Install/Config Problems In-Reply-To: <1112958690.425666e2b203e@zitmail.uni-paderborn.de> Message-ID: Only a generic segmentation fault is returned. Perhaps I could go back to using PHP as a DSO. Is there some documentation online about how to get mapscript configured when PHP is configured this way. I have found some discussion of this on the list archives, but nothing that really seemed to help. Thanks, Jeff On Apr 8, 2005 4:11 AM, Christian Schroeder wrote: > Hello Jeffrey, > > I don't know what the problem concerning the php-module is, but once I had a > problem with the mapserv CGI-Module, too and got the error message 'Premature > end of script headers'. > > You can try to run the mapserv CGI-Module from console to get a more detailed > error message. > To do so, you have to call > > ./mapserv QUERY_STRING=map=/home/www/map1.map&mode=map > > This helped me to get more informations about which module failed. > > Regards, > Christian > > Jeffrey Johnson : > > > Hello, > > > > I am attempting to install and configure > > mapserver+phpmapscript+chameleon on my debian/linux box and have run > > into a currently insurmountable issue. apache+php config is fine. > > Haven't really tested php extensively, but some simple tests work ok. > > I have configured Mapserver with the following command. > > > > ./configure --with-proj --with-ogr --with-gdal --with-jpeg --with-png > > --with-tiff --with-postgis --with-wfs --with-wcs --with-wms > > --with-wfsclient --with-wmsclient --with-php=/usr/src/php-4.3.10/ > > > > then ran make and copied the 'mapserv' executable into the cgi-bin > > directory. When attempting to access a mapfile using the cgi-script > > directly > > http://domainname.com/cgi-bin/mapserv?map=/home/www/map1.map&mode=map > > I am returned '500 Internal Server error'. The logfile contains > > 'Premature end of script headers: /usr/local/apache/cgi-bin/mapserv' > > > > If I re-run configure and remove the --with-php=/usr/src/php-4.3.10/ > > directive and recompile, the map displays fine. > > > > I had originally compiled PHP as a DSO, but couldnt get mapserver to > > work this way either, so reverted to compiling php into apache > > directly. > > > > Any ideas? > > > > Thanks in advance, > > > > Jeff > > > From dpinte at ITAE.BE Fri Apr 8 06:52:55 2005 From: dpinte at ITAE.BE (Didrik Pinte) Date: Fri, 8 Apr 2005 15:52:55 +0200 Subject: coordinate conversion problem Message-ID: Hi, I'm using a lot of rasters and one shape file in Esri NTF_France_Lambert_II coordinates I've translated NTF_France_Lambert_II in epsg:27572 I will have a layer of GPS points in latlong coordinates. To simulate this, I took a shapefile in Esri NTF_France_Lambert_II coordinates and convert it using ArcGIS to GCS_WGS_84. I've translated GCS_WGS_84 to epsg:4326 When I look at the map, my latlong points are nearly 400 km on the left of the original points ... How can I solve the problem ? Did I choosed a bad epsg reference ? Thank you in advance for your help Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From sweykam at TELELINE.ES Fri Apr 8 08:05:40 2005 From: sweykam at TELELINE.ES (Stefanie Weykam) Date: Fri, 8 Apr 2005 17:05:40 +0200 Subject: wms_group parameter Message-ID: Hi list, I finally managed to set up a map file suitable for both, wms and wfs GetCapability response. I upgraded to version 4.4 and replaced all wms_ and wfs_ parameters with ows_. Now I have some trouble with the layer groups and group titles and most of my layers are assigned to a group (such as 'reference layer' or 'satellite imagery'). Apparently, wfs doesn't read group titles, and simply ignores these parameters, so no problem here. To the contrary, wms did search for group titles before and still does, but something must have changed. According to the HOW TO document, you can now specifiy wms_group_title and wms_group_abstract (in the web object?) and wms_layer_group in the layer object - all is optional. It also says that all group names should be preceded by a forward slash, and the group name should not be used at the same time. Actually, I would like to preserve the group parameter, since I am grouping the layers according to this name... Whatever I do, the wms GetCapability request always returns layer name and group name of the same layer as if they were two different layer objects! This results in error since there are parameters 'missing'. Thanks, Stefanie From ariel at FORWARDBUSINESS.COM.AR Fri Apr 8 08:04:03 2005 From: ariel at FORWARDBUSINESS.COM.AR (Ariel Dario) Date: Fri, 8 Apr 2005 10:04:03 -0500 Subject: contains() function Message-ID: Hello All I'm new in this. I need to know if a piont is into a shape, I'm trying to use shapeobj:contains() but it allways rturns me MS_FALSE. This is de code I made: $polyz = ms_newShapeObj(MS_SHAPE_POLYGON); $lineaz = ms_newLineObj(); $pz = ms_newPointObj(); $layerz = $map->getLayerByName("Zonas"); $layerz->set('status', MS_ON); $lineaz->addXY(0,0); $lineaz->addXY(0,-10); $lineaz->addXY(-10,-10); $lineaz->addXY(-10,0); $lineaz->addXY(0,0); $polyz->add($lineaz); $pz->setXY(-1,-1); $polyz->draw($map, $layerz, $image, 0, "Zona"); if ($polyz->contains($pz)!=MS_TRUE){ $outzona=1; echo $outzona ; } Please if someone can help me I'll appreciate it. Thanks!! From BEN at SYNCERA-ITSOLUTIONS.NL Fri Apr 8 08:13:07 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Fri, 8 Apr 2005 17:13:07 +0200 Subject: wms_group parameter Message-ID: Hi Stefanie, AFAIK there are 2 options: 1) just specify GROUP (and wms_group_title in your METADATA). This will provide a 1 level deep layer nesting, e.g.: mygroup title of mygroup mylayer title of mylayer These groups can also be requested, ie they have a name. 2) if you need deeper nesting (more than 1 level deep), you can use wms_layer_group instead of GROUP "wms_layer_group" "/Hydrography of the Netherlands/Rivers" This will create: Hydrography of the Netherlands Rivers mylayer title of mylayer These groups cannot be requested, ie they only have a title and are merely intended for applying a nesting/structure to your data, eg when a WMS service is added in a treeview. See also: http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=776 Hope this helps. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Stefanie Weykam 04/08/05 05:05pm >>> Hi list, I finally managed to set up a map file suitable for both, wms and wfs GetCapability response. I upgraded to version 4.4 and replaced all wms_ and wfs_ parameters with ows_. Now I have some trouble with the layer groups and group titles and most of my layers are assigned to a group (such as 'reference layer' or 'satellite imagery'). Apparently, wfs doesn't read group titles, and simply ignores these parameters, so no problem here. To the contrary, wms did search for group titles before and still does, but something must have changed. According to the HOW TO document, you can now specifiy wms_group_title and wms_group_abstract (in the web object?) and wms_layer_group in the layer object - all is optional. It also says that all group names should be preceded by a forward slash, and the group name should not be used at the same time. Actually, I would like to preserve the group parameter, since I am grouping the layers according to this name... Whatever I do, the wms GetCapability request always returns layer name and group name of the same layer as if they were two different layer objects! This results in error since there are parameters 'missing'. Thanks, Stefanie From bt at CCGIS.DE Fri Apr 8 08:56:00 2005 From: bt at CCGIS.DE (Benjamin Thelen) Date: Fri, 8 Apr 2005 17:56:00 +0200 Subject: gdal with mrSid compile howto In-Reply-To: <42567312.1040508@gmx.net> Message-ID: joerg pfeiffer wrote: > hello, > > I think now is the moment, I have to compile gdal with mrSid support and > then mapserver on top. > > Is there a good howto? > > Joerg > Use the latest gdal 1.2.6 or at least 1.2.5. Compile gdal with "./configure --with-mrsid=/path/to/mrsid/sdk". MapServer requires --with-gdal --with-ogr. But I would do that in any case, anyway. That's all. Ben From nacional at CBS.UMN.EDU Fri Apr 8 09:08:17 2005 From: nacional at CBS.UMN.EDU (Pericles S. Nacionales) Date: Fri, 8 Apr 2005 11:08:17 -0500 Subject: Complete Mapserver example In-Reply-To: Message-ID: Nuri, You can download the MapServer demo app at http://maps.dnr.state.mn.us/mapserver_demos/workshop.zip and get that working. Also, go to http://mapserver.gis.umn.edu/doc.html and read through the resources available there. Good luck! -Perry On Friday 08 April 2005 07:46 am, Nuri wrote: > Hi, > > I'm trying to run Mapserver for first time. > > Someone told me to installed MS4W in my computer to understand who > Mapserver runs before execute it with IIS. > > Apache runs perfectly, but can't find any complete example of mapserver to > install to my computer. > > Does someone knows if there are any complete working example? > > Some of them haven't got shapes, others haven't got templates, others > codes that doesn't run in windows,... From mike.and.kerry at GMAIL.COM Fri Apr 8 12:16:33 2005 From: mike.and.kerry at GMAIL.COM (Mike Davis) Date: Fri, 8 Apr 2005 11:16:33 -0800 Subject: Google maps w/ satellite imagery In-Reply-To: <42564634.2020005@ccgis.de> Message-ID: > That might be true for data that does not change often. It might also be > true for data that you want to see in one coordinate system only. And > for data that you do not want to overlay intersect and visualize with > data from another source. Think interoperable and what googlemaps has > shown us up to now is not worth a penny. I am all for interoperability and all, but I argue that the vast majority of GIS types looking to implement a Mapserver/IMS site are not interested in mapping the world or integrating a bunch of disparate data sources. They are GIS managers and technicians at the Municipal and Territorial (State, Province, whatever) level interested in providing their constituents access to public information. Providing these potential customers/developers with the ability to automatically generate tiled maps that can be served quickly is definitely a worthwhile effort. Getting someone hooked on Mapserver and Open Source solutions by giving them what they want/need is a good thing. Once people see the great things possible with standards like WFS and the creative juices start flowing, maybe a few of them will make the leap to a more dynamic mapserver interface... But you've got to get them in the door first. From steve at WORMLEY.COM Fri Apr 8 12:54:53 2005 From: steve at WORMLEY.COM (Steve Wormley) Date: Fri, 8 Apr 2005 15:54:53 -0400 Subject: Basemaps, North America and Western Europe Message-ID: This isn't really a mapserver question, however I'm hoping someone has done this before so we don't spend the next 2 months looking for solutions. My company is working on a mapserver based application to display data from agents in the field(GPS located) on a map, this works fine with mapserver. Management wants street level maps displayed for all locations where we could possibly have agents. Right now our testing is in the US, so I just grabbed the Tiger data for a quick overview. Our initial pilot will include Western Europe(UK and France mainly) as well as the US. So I'm trying to find a good source of data for these regions that interoperates well with mapserver(shapefiles) or allows us to query them using WMS. Management likes Mapquest, however all of their stuff appears to be oriented towards proprietary APIs which would require significant time to implement. I know that this type of data will not be inexpensive but Navteq was a bit over what we wanted to pay. Thanks for any insight, -Steve Wormley From yecarrillo at YAHOO.COM Fri Apr 8 13:25:15 2005 From: yecarrillo at YAHOO.COM (Eduin Carrillo) Date: Fri, 8 Apr 2005 15:25:15 -0500 Subject: Identify WMS Layers with ArcGIS In-Reply-To: 6667 Message-ID: Looking with HttpLook, problem seems to be caused by ArcGIS. WMS compliant servers requieres the "LAYERS" parameter in the request. However, ArcGIS just includes "QUERY_LAYERS", something like: http://www.example.com/cgi-bin/mapserv?VERSION=1.1.1&REQUEST=GetFeatureInfo&SRS=EPSG:21892&BBOX=869977.952111551,1027721.7482033,1369773.31499998,1393306.32833008&WIDTH=715&HEIGHT=523&QUERY_LAYERS=municipio&STYLES=&EXCEPTIONS=application/vnd.ogc.se_xml&&INFO_FORMAT=text/html&FEATURE_COUNT=50&X=381&Y=289 HTTP/1.1 Adding manually "LAYERS" parameter to this request, causes mpaserver return a valid html response. Somebody knows the state of ArcGIS as a compliant WMS server? Eduin Yesid Carrillo Vega yecarrillo at yahoo.com COLOMBIA _________________________________________________________ Do You Yahoo!? Informaci?n de Estados Unidos y Am?rica Latina, en Yahoo! Noticias. Vis?tanos en http://noticias.espanol.yahoo.com From superbla3000 at GMX.NET Fri Apr 8 13:32:23 2005 From: superbla3000 at GMX.NET (joerg pfeiffer) Date: Fri, 8 Apr 2005 22:32:23 +0200 Subject: gdal with mrSid compile howto In-Reply-To: <4256A990.9010006@ccgis.de> Message-ID: hello, unfortunately I can't find the mrSid sdk for (suse) Linux. Does somebody have a link? Joerg Benjamin Thelen schrieb: > > > joerg pfeiffer wrote: > >> hello, >> >> I think now is the moment, I have to compile gdal with mrSid support and >> then mapserver on top. >> >> Is there a good howto? >> >> Joerg >> > > Use the latest gdal 1.2.6 or at least 1.2.5. Compile gdal with > "./configure --with-mrsid=/path/to/mrsid/sdk". > > MapServer requires --with-gdal --with-ogr. But I would do that in any > case, anyway. > > That's all. > > Ben > > From fwarmerdam at GMAIL.COM Fri Apr 8 13:38:11 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri, 8 Apr 2005 16:38:11 -0400 Subject: gdal with mrSid compile howto In-Reply-To: <4256EA57.4030005@gmx.net> Message-ID: On Apr 8, 2005 4:32 PM, joerg pfeiffer wrote: > hello, > > unfortunately I can't find the mrSid sdk for (suse) Linux. > Does somebody have a link? Joerg, You need to get it from the Lizardtech web site. I think you want the developer portion ot the site. Register at: http://developer.lizardtech.com/Authenticate.asp? There will be click though licenses you will need to agree to. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From BEN at SYNCERA-ITSOLUTIONS.NL Fri Apr 8 14:16:35 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Fri, 8 Apr 2005 23:16:35 +0200 Subject: Identify WMS Layers with ArcGIS Message-ID: Hi Eduin, the known issues with ArcGIS as a WMS client are reported here: http://support.esri.com/index.cfm?fa=knowledgebase.techArticles.articleShow&d=27825 I don't see your bug in the list, so I would suggest you use the ESRI forum or ESRI support to report this issue. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Eduin Carrillo 04/08/05 22:27 PM >>> Looking with HttpLook, problem seems to be caused by ArcGIS. WMS compliant servers requieres the "LAYERS" parameter in the request. However, ArcGIS just includes "QUERY_LAYERS", something like: http://www.example.com/cgi-bin/mapserv?VERSION=1.1.1&REQUEST=GetFeatureInfo&SRS=EPSG:21892&BBOX=869977.952111551,1027721.7482033,1369773.31499998,1393306.32833008&WIDTH=715&HEIGHT=523&QUERY_LAYERS=municipio&STYLES=&EXCEPTIONS=application/vnd.ogc.se_xml&&INFO_FORMAT=text/html&FEATURE_COUNT=50&X=381&Y=289 HTTP/1.1 Adding manually "LAYERS" parameter to this request, causes mpaserver return a valid html response. Somebody knows the state of ArcGIS as a compliant WMS server? Eduin Yesid Carrillo Vega yecarrillo at yahoo.com COLOMBIA _________________________________________________________ Do You Yahoo!? Informaci?n de Estados Unidos y Am?rica Latina, en Yahoo! Noticias. Vis?tanos en http://noticias.espanol.yahoo.com From kallwn at ICIRCUS.NET Fri Apr 8 21:01:00 2005 From: kallwn at ICIRCUS.NET (kallwn) Date: Fri, 8 Apr 2005 21:01:00 -0700 Subject: mapserver, jbox and php (but not mapscript) Message-ID: I have a series of maps that uses a template that I made using jbox displaying assigned territories. These work just the way that I expected and wanted. So when I was asked to add a layer that shows routes based upon the name of sales people I thought no problem. I have the the name in a MySQL table and the routes as points in another table so I thought all I would have to do would be to add a little PHP code. Make a list box that is populated from the table in the database. Well it works when I display just the template, however when I try to to display a map the list box is not populated from the database. In fact it does not even seem like the PHP code is connecting to the database at all. After about a week of trouble shooting I eliminated all parts of the template as being the culprit. The only thing left that I can think of is that somehow that by calling the mapserver cgi it is causing the PHP code not to connect to the database and populate the list box. I know the jbox template works with a map and the list box works in the template but when I try to get all 3 to work together the list box fails. Has anyone come across anything like this before or have any suggestions? Oh yes, I'm not using any php/mapscript just straight php. From elshayal at SMARTWEBONLINE.COM Sat Apr 9 04:21:08 2005 From: elshayal at SMARTWEBONLINE.COM (Mohamed Elshayal) Date: Sat, 9 Apr 2005 13:21:08 +0200 Subject: First Egyptian GIS Software Trial version will be released within 2 weeks Message-ID: Dear Sir, Mapserver was the first GIS software, which I have studied in my life. I have built a new small system, Kindly please visit Elshayal Smart Web On Line Software http://www.smartwebonline.com Thank you in advance Mohamed Elshayal -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.greenwood at GMAIL.COM Sat Apr 9 06:20:37 2005 From: richard.greenwood at GMAIL.COM (Richard Greenwood) Date: Sat, 9 Apr 2005 13:20:37 +0000 Subject: =?utf-8?b?W1VNTl9NQVBTRVJWRVItVVNFUlNd?= mapserver, jbox and php (but not mapscript) Message-ID: kallwn ICIRCUS.NET> writes: > The only thing left that I can think > of is that somehow that by calling the mapserver cgi it is causing the > PHP code not to connect to the database and populate the list box. I The mapserver CGI can not call or run PHP on that page. When you make a request to a web server it passes a request for dynamic content on to the appropriate application, mapserver CGI OR PHP (or ASP, or Python, or whatever). That application does its thing and passes a page back to the web server, which in turn passes the page back to you. But mapserver can not call the PHP process, or any other process on the server. Point is, only one server side process can be called per page. (jBox is a client side process). If you can convert your MySQL data into a shape file that would probably be easiset. Mapserver has some support for connecting to MySQL, but I have not experience with it (search the list archives). Or you could convert your app to Mapscript. HTH Rich From fwarmerdam at GMAIL.COM Sat Apr 9 08:09:28 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Sat, 9 Apr 2005 11:09:28 -0400 Subject: coordinate conversion problem In-Reply-To: <1112968375.9282.53.camel@geru-itea> Message-ID: On Apr 8, 2005 9:52 AM, Didrik Pinte wrote: > Hi, > > I'm using a lot of rasters and one shape file in Esri > NTF_France_Lambert_II coordinates > > I've translated NTF_France_Lambert_II in epsg:27572 > > I will have a layer of GPS points in latlong coordinates. To simulate > this, I took a shapefile in Esri NTF_France_Lambert_II coordinates and > convert it using ArcGIS to GCS_WGS_84. > > I've translated GCS_WGS_84 to epsg:4326 > > When I look at the map, my latlong points are nearly 400 km on the left > of the original points ... > > How can I solve the problem ? Did I choosed a bad epsg reference ? > > Thank you in advance for your help Didrik, There are problems with the translations in PROJ.4 for coordinate systems with alternate prime meridians, and coordinate systems based on gradians. One related bug is: http://bugzilla.remotesensing.org/show_bug.cgi?id=811 I think there are others in the PROJ.4 bugzilla more specific to your problem. The gist of it is, you will need to correct the definition manually in your PROJ.4 "epsg" file. This is in /usr/local/share/proj/epsg on unix/linux. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From dpinte at ITAE.BE Sat Apr 9 08:23:29 2005 From: dpinte at ITAE.BE (Didrik Pinte) Date: Sat, 9 Apr 2005 17:23:29 +0200 Subject: coordinate conversion problem In-Reply-To: <931f8ea9050409080942efb880@mail.gmail.com> Message-ID: Le samedi 09 avril 2005 ? 11:09 -0400, Frank Warmerdam a ?crit : > > Didrik, > > There are problems with the translations in PROJ.4 for coordinate systems > with alternate prime meridians, and coordinate systems based on gradians. > One related bug is: > > http://bugzilla.remotesensing.org/show_bug.cgi?id=811 > > I think there are others in the PROJ.4 bugzilla more specific to your problem. > The gist of it is, you will need to correct the definition manually in your > PROJ.4 "epsg" file. This is in /usr/local/share/proj/epsg on unix/linux. > > Best regards, Thank you very much for the information. That is very annoying ... I need to make that work for monday. Some stress for the week-end. Is there a good way of doing this by hand ? Just by "try and error" overlaying the two layers ? Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From fwarmerdam at GMAIL.COM Sat Apr 9 09:37:29 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Sat, 9 Apr 2005 12:37:29 -0400 Subject: coordinate conversion problem In-Reply-To: <1113060209.11175.3.camel@geru-itea> Message-ID: On Apr 9, 2005 11:23 AM, Didrik Pinte wrote: > Thank you very much for the information. That is very annoying ... I > need to make that work for monday. Some stress for the week-end. > > Is there a good way of doing this by hand ? Just by "try and error" > overlaying the two layers ? Didnik, I would suggest: o review bug reports, and discussion of this topic (search for NTF would likely be helpful) on the PROJ.4, gdal-dev, mapserver and perhaps postgis mailing lists. o The problem is likely just the +lon_0 setting which likely needs to be adjusted +- the longitude between greenwich and paris. This is 2d20'14.025" You may email me directly and I will try to be helpful if you can't figure it out yourself or from available sources. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From i_kadek_j at YAHOO.COM Sat Apr 9 09:45:56 2005 From: i_kadek_j at YAHOO.COM (kadek janoarsedi) Date: Sat, 9 Apr 2005 09:45:56 -0700 Subject: MapSurfer interface Message-ID: to All mapserver mailing list member i'm developed a GIS using mapsurfer interface but i don't know how to join it with JBox/Dbox or what so ever.. i want to make a measure distance function.. if u could help me ..please tell.. or just give me the link regard __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From gmanepal at GMAIL.COM Sat Apr 9 15:21:35 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Sat, 9 Apr 2005 18:21:35 -0400 Subject: Install/Config Problems In-Reply-To: Message-ID: Hello Jeff, I am facing with the same problem now. I installed mapserver on one machine and it worked fine. Currently, I am trying to install on Fedora Core 3, with php-4.3.11. I built it as a DSO similar to the working model. I also tried debugging using gdb, but it looks it has fallen into infinite loop. I am unable to comprehend the reason for this segmentation fault. Although, from my earlier working model, it is only evident that I should try my earlier combinations. If you get the break through, let the list know about it. I will do the same as well. Good Luck, Giridhar Manepalli On Apr 8, 2005 10:14 AM, Jeffrey Johnson wrote: > Only a generic segmentation fault is returned. Perhaps I could go back > to using PHP as a DSO. Is there some documentation online about how to > get mapscript configured when PHP is configured this way. I have found > some discussion of this on the list archives, but nothing that really > seemed to help. > > Thanks, > > Jeff > > On Apr 8, 2005 4:11 AM, Christian Schroeder wrote: > > Hello Jeffrey, > > > > I don't know what the problem concerning the php-module is, but once I had a > > problem with the mapserv CGI-Module, too and got the error message 'Premature > > end of script headers'. > > > > You can try to run the mapserv CGI-Module from console to get a more detailed > > error message. > > To do so, you have to call > > > > ./mapserv QUERY_STRING=map=/home/www/map1.map&mode=map > > > > This helped me to get more informations about which module failed. > > > > Regards, > > Christian > > > > Jeffrey Johnson : > > > > > Hello, > > > > > > I am attempting to install and configure > > > mapserver+phpmapscript+chameleon on my debian/linux box and have run > > > into a currently insurmountable issue. apache+php config is fine. > > > Haven't really tested php extensively, but some simple tests work ok. > > > I have configured Mapserver with the following command. > > > > > > ./configure --with-proj --with-ogr --with-gdal --with-jpeg --with-png > > > --with-tiff --with-postgis --with-wfs --with-wcs --with-wms > > > --with-wfsclient --with-wmsclient --with-php=/usr/src/php-4.3.10/ > > > > > > then ran make and copied the 'mapserv' executable into the cgi-bin > > > directory. When attempting to access a mapfile using the cgi-script > > > directly > > > http://domainname.com/cgi-bin/mapserv?map=/home/www/map1.map&mode=map > > > I am returned '500 Internal Server error'. The logfile contains > > > 'Premature end of script headers: /usr/local/apache/cgi-bin/mapserv' > > > > > > If I re-run configure and remove the --with-php=/usr/src/php-4.3.10/ > > > directive and recompile, the map displays fine. > > > > > > I had originally compiled PHP as a DSO, but couldnt get mapserver to > > > work this way either, so reverted to compiling php into apache > > > directly. > > > > > > Any ideas? > > > > > > Thanks in advance, > > > > > > Jeff > > > > > > From woklist at CHARTER.NET Sat Apr 9 18:12:58 2005 From: woklist at CHARTER.NET (William K) Date: Sat, 9 Apr 2005 20:12:58 -0500 Subject: Mac OS X binaries updated Message-ID: Mac OS X MapServer binary update: I've ironed out a few kinks in the installers and requirements. There are a few updates to dependencies. The downloads are on their own page now. For MapServer itself, I forgot the utilities in the initial release. In addition, I have simple drag-n-drop GUIs for shptree, sortshp and tile4ms. ----- William Kyngesburye http://webpages.charter.net/kyngchaos/ [Trillian] What are you supposed to do WITH a maniacally depressed robot? [Marvin] You think you have problems? What are you supposed to do if you ARE a maniacally depressed robot? No, don't try and answer, I'm 50,000 times more intelligent than you and even I don't know the answer... - HitchHiker's Guide to the Galaxy -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 841 bytes Desc: not available URL: From morten at UNTAMO.NET Sat Apr 9 18:21:29 2005 From: morten at UNTAMO.NET (Morten Hulden) Date: Sun, 10 Apr 2005 03:21:29 +0200 Subject: Install/Config Problems In-Reply-To: <6d675eda050409152127eeeb3@mail.gmail.com> Message-ID: Giridhar Manepalli wrote: > Currently, I am trying to install on Fedora Core 3, with php-4.3.11. > I built it as a DSO similar to the working model. If you get mapscript 4.4.1 to work on plain Fedora Core 3 I am interested to know how you get around the fact that FC3 comes with a PHP that has a bundled GD version where function names have a php_ prefix that mapscript will not recognize. Even if compile succeeds after some tricks, dl() segfaults because of undefined symbols. Recompiling PHP to use external GD seemed to be the only option last I tried, but that was a while ago... rgds From gmanepal at GMAIL.COM Sat Apr 9 23:42:48 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Sun, 10 Apr 2005 02:42:48 -0400 Subject: Install/Config Problems In-Reply-To: <42587F99.9080402@untamo.net> Message-ID: Hello All, I was successful in installing Mapserver with php mapscript on Fedora Core 2. Php version 4.3.10 If anyone need any help regarding this configuration, I can help. I guess, there is something with Fedora Core 3 that developers of Mapserver need to look at! Regards, On Apr 9, 2005 9:21 PM, Morten Hulden wrote: > Giridhar Manepalli wrote: > > Currently, I am trying to install on Fedora Core 3, with php-4.3.11. > I built it as a DSO similar to the working model. > > If you get mapscript 4.4.1 to work on plain Fedora Core 3 I am > interested to know how you get around the fact that FC3 comes with a PHP > that has a bundled GD version where function names have a php_ prefix > that mapscript will not recognize. > > Even if compile succeeds after some tricks, dl() segfaults because of > undefined symbols. > > Recompiling PHP to use external GD seemed to be the only option last I > tried, but that was a while ago... > > rgds > From msestudiente at YAHOO.COM Sun Apr 10 08:57:57 2005 From: msestudiente at YAHOO.COM (alex zendel) Date: Sun, 10 Apr 2005 08:57:57 -0700 Subject: New to MapServer, project planning advice sought Message-ID: Hello all, I'm a GIS professional whose experience, until now, has been mostly limited to ESRI, Windows, VB, ArcIMS, and ArcObjects. But I'm looking forward to make the transition to open-source solutions and internet programming. So when the American Whitewater Affiliation (AW) (www.americanwhitewater.org) asked me to provide some volunteer help with their 'River Explorer' (http://207.246.70.46/demo/) MapServer app, I gladly accepted. I have some other projects to wrap up before I can focus most of my attention on this project, so I have some time to do some brainstorming and planning I'm hoping that you can help here. I have dabbled with MapServer via MapTools.org's suite of tools (Thanks DMSolutions!). We're eventually going to want to customize the interface to, for example, search/display river stretches by difficulty (class II to class V), what's currently running (live stream flow data is already being stored in AW's database), zipcode, etc. So what programming language do you recommend to interface with MapScript? I'm leaning towards PHP so we can ultimately keep the application platform independent. Plus, AW already uses php in the non-GIS part of their website. If php is the way to go, what IDE/editors do you recommend? I'l also need to get myself up to speed on php in general. Any good php books that you recommend? Once available, I plan on purchasing the 'MapServer' Book (http://www.amazon.com/exec/obidos/ASIN/1590594908/qid=1113146902/sr=2-1/ref=pd_bbs_b_2_1/103-9643286-3305410). The description says that this book will include demo applications. What language does the book use in these demos? php? Using USGS WMS layers. We hope to include several WMS layer in our app so we don't have to acquire/maintain/serve big datasets such as local level roads, streams, hillshade, etc. How feasible is doing so? What type of performance can be expected? Thanks for all of your input Alex --------------------------------- Do you Yahoo!? Yahoo! Small Business - Try our new resources site! -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartvde at XS4ALL.NL Sun Apr 10 09:14:37 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Sun, 10 Apr 2005 18:14:37 +0200 Subject: New to MapServer, project planning advice sought In-Reply-To: <20050410155757.52292.qmail@web61310.mail.yahoo.com> Message-ID: Hi Alex, I think PHP/Mapscript is quite widely used, so there will be active support for it. Since the rest of the application is already using PHP, it seems like the way to go for your application. I have used the Zend IDE for PHP, but end up usually working in a text editor. I can recommend the PHP Cookbook by O'Reilly. I had not seen that Mapserver book yet, it is to be published in June 2005 I see. There is also gonna be an O'Reilly book on Mapserver and Open Source GIS in general, written by Tyler Mitchell, which will include Mapscript examples in Python, Perl, PHP and Java. An excellent resource for PHP/Mapscript will be downloading Chameleon from DM Solutions, you can download that from maptools.org. Will provide you with lots and lots of PHP/Mapscript examples in their code. WMS performs okay, especially if most of your data is coming from the same service. If you are gonna combine several services, except a noticeable drop in performance, but it is still doable for sure. Hope this helps. Best regards, Bart On Sun, 10 Apr 2005 08:57:57 -0700, alex zendel wrote: > Hello all, > > I'm a GIS professional whose experience, until now, has been mostly > limited to ESRI, Windows, VB, ArcIMS, and ArcObjects. But I'm looking > forward to make the transition to open-source solutions and internet > programming. So when the American Whitewater Affiliation (AW) > (www.americanwhitewater.org) asked me to provide some volunteer help > with their 'River Explorer' (http://207.246.70.46/demo/) MapServer app, > I gladly accepted. > > I have some other projects to wrap up before I can focus most of my > attention on this project, so I have some time to do some brainstorming > and planning I'm hoping that you can help here. I have dabbled with > MapServer via MapTools.org's suite of tools (Thanks DMSolutions!). > We're eventually going to want to customize the interface to, for > example, search/display river stretches by difficulty (class II to class > V), what's currently running (live stream flow data is already being > stored in AW's database), zipcode, etc. So what programming language do > you recommend to interface with MapScript? I'm leaning towards PHP so > we can ultimately keep the application platform independent. Plus, AW > already uses php in the non-GIS part of their website. > > If php is the way to go, what IDE/editors do you recommend? I'l also > need to get myself up to speed on php in general. Any good php books > that you recommend? > > Once available, I plan on purchasing the 'MapServer' Book > (http://www.amazon.com/exec/obidos/ASIN/1590594908/qid=1113146902/sr=2-1/ref=pd_bbs_b_2_1/103-9643286-3305410). > The description says that this book will include demo applications. > What language does the book use in these demos? php? > > Using USGS WMS layers. We hope to include several WMS layer in our app > so we don't have to acquire/maintain/serve big datasets such as local > level roads, streams, hillshade, etc. How feasible is doing so? What > type of performance can be expected? > > Thanks for all of your input > > Alex > > > --------------------------------- > Do you Yahoo!? > Yahoo! Small Business - Try our new resources site! -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From jcradock at ME3.COM Sun Apr 10 09:23:48 2005 From: jcradock at ME3.COM (James Cradock) Date: Sun, 10 Apr 2005 12:23:48 -0400 Subject: New to MapServer, project planning advice sought In-Reply-To: <20050410155757.52292.qmail@web61310.mail.yahoo.com> Message-ID: On Apr 10, 2005, at 11:57 AM, alex zendel wrote: > If php is the way to go, what IDE/editors do you recommend?? I'l also > need to get myself up to speed on php in general.? Any good php books > that you recommend? PHP is indeed a good platform-independent choice. You probably want Dreamweaver. The editor in MX 2004 is much improved over previous versions. If you're comfortable and more productive with a programmer's editor (I'm on Mac OS X and code in BBEdit), then you can split the drag-and-drop editing and the text editing between Dreamweaver and your preferred editor. Setting your external editor is a Preference in Dreamweaver. Documentation: The online help docs at http://www.php.net is excellent, and http://pear.php.net/manual/ is good too. ----- James Cradock, jcradock at me3.com From bill at BINKO.NET Sun Apr 10 10:44:54 2005 From: bill at BINKO.NET (Bill Binko) Date: Sun, 10 Apr 2005 13:44:54 -0400 Subject: =?utf-8?b?W1VNTl9NQVBTRVJWRVItVVNFUlNd?= mapserver, jbox and php (but not mapscript) In-Reply-To: Message-ID: On Sat, 9 Apr 2005, Richard Greenwood wrote: > kallwn ICIRCUS.NET> writes: > > > The only thing left that I can think > > of is that somehow that by calling the mapserver cgi it is causing the > > PHP code not to connect to the database and populate the list box. I > > The mapserver CGI can not call or run PHP on that page. When you make a request > to a web server it passes a request for dynamic content on to the appropriate > application, mapserver CGI OR PHP (or ASP, or Python, or whatever). That > application does its thing and passes a page back to the web server, which in > turn passes the page back to you. But mapserver can not call the PHP process, or > any other process on the server. Point is, only one server side process can be > called per page. (jBox is a client side process). This is true...technically, if you're using Apache, you can get things daisy-chain, but it's not worth the effort. > If you can convert your MySQL data into a shape file that would probably be > easiset. Mapserver has some support for connecting to MySQL, but I have not > experience with it (search the list archives). Or you could convert your app to > Mapscript. Another easy solution is to simply "double-pump" the request. That is, your template file does nothing but set some variables and do a refresh to your PHP page. I have used that well. Lets say you need to send an ID (parcel ID n my case) to a dynamic PHP script. You setup something like 'parcel_id' to be the variable you want and just write a template that does the refresh:

If you are not automatically redirected, you can access Your Information by clicking on this link.

That way, you can do all your logic in PHP (in the myPhpScript.php page). Of course, if you're sending lots of information, that URL= parameter can get pretty ugly. You also want to make sure you have the "0; " before the url since that the silly format. The 0 says how long to wait. I also always include the link in the BODY section so that people who diable meta-refreshes have a way to get at your information. Hope this helps. Bill From alba75 at YAHOO.COM Sun Apr 10 11:12:58 2005 From: alba75 at YAHOO.COM (Dott. Stefano Albanese) Date: Sun, 10 Apr 2005 11:12:58 -0700 Subject: How to show query result in a popup window with a predefinited size Message-ID: Please can anyone help me in solving that problem? Usually query results are opened in a different web page on the basis of the query template. Now i'd like to open that query template in a popup window. I tryed some solutions i found on the forum pages but i wasn't able to get a result. Can u help me? Thanx Dott. Geol. Stefano Albanese Via S. Giacomo 6 83022 Baiano (AV) Italia Tel.: +390818243143 +393471982279 --------------------------------- Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chloejackson at TOTALISE.CO.UK Sun Apr 10 13:19:27 2005 From: chloejackson at TOTALISE.CO.UK (CJ) Date: Sun, 10 Apr 2005 15:19:27 -0500 Subject: I can't see my maps Message-ID: Can anyone help me? I have Apache, PHP, MySQL setup on my local server and have been trying to add in MapServer. I have installed and configured all the elements and have been working with the Itasca demo workshop. So far I can get the webpage working but there is no map in the map frame. The map is there and the Index.html points to its directory, so why can't it find the map? I'd appreciate any help with this. I'm a total newbie to MapServer, etc. From whiting at MAXNET.CO.NZ Sun Apr 10 14:44:51 2005 From: whiting at MAXNET.CO.NZ (Matthew Whiting) Date: Mon, 11 Apr 2005 09:44:51 +1200 Subject: zooooooom Message-ID: No thoughts on the below? Didn't get any response so just thought I'd have another attempt. Cheers, M. ====================================== I now successfully have my app zooming in and out. However, an issue I have still to resolve is that when one zooms in, at a certain level (not always consistent), the background becomes grayed out. Wondering if anyone else has had this sort of issue? Any suggestions. Cheers Matthew -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3182 bytes Desc: S/MIME Cryptographic Signature URL: From morten at UNTAMO.NET Sun Apr 10 17:05:44 2005 From: morten at UNTAMO.NET (Morten Hulden) Date: Mon, 11 Apr 2005 02:05:44 +0200 Subject: Install/Config Problems In-Reply-To: <6d675eda05040923421e5ba549@mail.gmail.com> Message-ID: Giridhar Manepalli wrote: > I was successful in installing Mapserver with php mapscript on Fedora Core 2. > Php version 4.3.10 > > If anyone need any help regarding this configuration, I can help. I > guess, there is something with Fedora Core 3 that developers of > Mapserver need to look at! I do not see this a FC3 specific problem, I think it happens whenever PHP is compiled with the bundled GD library. The php_ prefix to GD function names was introduced to the bundled GD package in PHP last summer in order to prevent name space conflicts with other apache modules that use GD, such as perl. Now if PHP uses the bundled GD, mapserver 4.4.1 will still compile if I point to external GD libs, but compilation of PHP_mapscript will fail. On the other hand, if I try to trick mapscript to compile against PHP's bundled GD then I get segfault at mapscript dl-time. Could something similar to --with-php-regex-dir in mapserver configure scripts solve this? Of course recompiling PHP with external GD is an option, but then I am out out sync with FC3 update packages, which means increased maintenance burden. > On Apr 9, 2005 9:21 PM, Morten Hulden wrote: > >>Giridhar Manepalli wrote: >> >>>Currently, I am trying to install on Fedora Core 3, with php-4.3.11. > I built it as a DSO similar to the working model. >> >>If you get mapscript 4.4.1 to work on plain Fedora Core 3 I am >>interested to know how you get around the fact that FC3 comes with a PHP >>that has a bundled GD version where function names have a php_ prefix >>that mapscript will not recognize. >> >>Even if compile succeeds after some tricks, dl() segfaults because of >>undefined symbols. >> >>Recompiling PHP to use external GD seemed to be the only option last I >>tried, but that was a while ago... >> >>rgds >> From woodbri at SWOODBRIDGE.COM Sun Apr 10 19:20:38 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Sun, 10 Apr 2005 22:20:38 -0400 Subject: zooooooom In-Reply-To: <42599E53.90406@maxnet.co.nz> Message-ID: Matthew, This might be your problem http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=306 Read the bug, it gives work a rounds. -Steve W. Matthew Whiting wrote: > No thoughts on the below? > Didn't get any response so just thought I'd have another attempt. > Cheers, M. > > ====================================== > I now successfully have my app zooming in and out. > > However, an issue I have still to resolve is that when one zooms in, at > a certain level (not always consistent), the background becomes grayed out. > > Wondering if anyone else has had this sort of issue? Any suggestions. > > Cheers > Matthew From gmanepal at GMAIL.COM Sun Apr 10 22:08:31 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Mon, 11 Apr 2005 01:08:31 -0400 Subject: Install/Config Problems In-Reply-To: <4259BF58.9050401@untamo.net> Message-ID: Hello, Just to keep this thread resourceful for later: I compiled php without GD. I also used the regex from php sources. Debugging that only helped me learn that, it went onto some infinite loop, I specifically did not observe any library miss-calls! Regards, Giridhar On Apr 10, 2005 8:05 PM, Morten Hulden wrote: > Giridhar Manepalli wrote: > > > I was successful in installing Mapserver with php mapscript on Fedora Core 2. > > Php version 4.3.10 > > > > If anyone need any help regarding this configuration, I can help. I > > guess, there is something with Fedora Core 3 that developers of > > Mapserver need to look at! > > I do not see this a FC3 specific problem, I think it happens whenever > PHP is compiled with the bundled GD library. The php_ prefix to GD > function names was introduced to the bundled GD package in PHP last > summer in order to prevent name space conflicts with other apache > modules that use GD, such as perl. > > Now if PHP uses the bundled GD, mapserver 4.4.1 will still compile if I > point to external GD libs, but compilation of PHP_mapscript will fail. > On the other hand, if I try to trick mapscript to compile against PHP's > bundled GD then I get segfault at mapscript dl-time. > > Could something similar to --with-php-regex-dir in mapserver configure > scripts solve this? > > Of course recompiling PHP with external GD is an option, but then I am > out out sync with FC3 update packages, which means increased maintenance > burden. > > > > On Apr 9, 2005 9:21 PM, Morten Hulden wrote: > > > >>Giridhar Manepalli wrote: > >> > >>>Currently, I am trying to install on Fedora Core 3, with php-4.3.11. > I built it as a DSO similar to the working model. > >> > >>If you get mapscript 4.4.1 to work on plain Fedora Core 3 I am > >>interested to know how you get around the fact that FC3 comes with a PHP > >>that has a bundled GD version where function names have a php_ prefix > >>that mapscript will not recognize. > >> > >>Even if compile succeeds after some tricks, dl() segfaults because of > >>undefined symbols. > >> > >>Recompiling PHP to use external GD seemed to be the only option last I > >>tried, but that was a while ago... > >> > >>rgds > >> > From ferencik.ioan at PERSONAL.RO Sun Apr 10 22:51:18 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Mon, 11 Apr 2005 08:51:18 +0300 Subject: I can't see my maps Message-ID: Maybe you have same problem like I had ..You did not configured correctly the IMAGEPATH and IMAGEURL propertirs of the WEB object. If you see a blank square instead the map you expected check those properties.... > Can anyone help me? I have Apache, PHP, MySQL setup on my local server and > have been trying to add in MapServer. I have installed and configured all > the elements and have been working with the Itasca demo workshop. > > So far I can get the webpage working but there is no map in the map frame. > The map is there and the Index.html points to its directory, so why can't it > find the map? > > I'd appreciate any help with this. I'm a total newbie to MapServer, etc. > _____________________________________________ Castiga peste 1000 de premii cu Wella Design! http://wella.boom.ro From stephane.riff at CERENE.FR Sun Apr 10 23:52:08 2005 From: stephane.riff at CERENE.FR (=?ISO-8859-15?Q?St=E9phane_RIFF?=) Date: Mon, 11 Apr 2005 08:52:08 +0200 Subject: coordinate conversion problem In-Reply-To: <1113060209.11175.3.camel@geru-itea> Message-ID: I had the same problem. here is what i did : 1. I edit /usr/local/share/proj/esri file and remove the +pm=paris 2. Edit the srid=27582 record in spatial_ref_sys table and replace the projText with the definition in /usr/local/share/proj/esri file The projection definition : +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.33722917 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356514.999904194 +towgs84=-168,-60,320,0,0,0,0 +units=m +no_defs Set this proj def in both postgis and proj.4 and it should works Hope this helps Didrik Pinte wrote: >Le samedi 09 avril 2005 ? 11:09 -0400, Frank Warmerdam a ?crit : > > >>Didrik, >> >>There are problems with the translations in PROJ.4 for coordinate systems >>with alternate prime meridians, and coordinate systems based on gradians. >>One related bug is: >> >> http://bugzilla.remotesensing.org/show_bug.cgi?id=811 >> >>I think there are others in the PROJ.4 bugzilla more specific to your problem. >>The gist of it is, you will need to correct the definition manually in your >>PROJ.4 "epsg" file. This is in /usr/local/share/proj/epsg on unix/linux. >> >>Best regards, >> >> > >Thank you very much for the information. That is very annoying ... I >need to make that work for monday. Some stress for the week-end. > >Is there a good way of doing this by hand ? Just by "try and error" >overlaying the two layers ? > >Didrik > > From calde at GMX.NET Mon Apr 11 01:33:28 2005 From: calde at GMX.NET (Daniel Caldeweyher) Date: Mon, 11 Apr 2005 03:33:28 -0500 Subject: Threadsafety/Exceptions for Java Mapscript? Message-ID: Hi everyone, first of all I would like to thank all the developers for this great piece of software. I am working on a GIS project for my University using JavaMascript on Tomcat 5.5.7. My supervisor would to like to go online with my solution in a month or two for public testing. In the beginning 'public' means open to all University members, other Stakeholders and for presentations. However in the (near) future it is very likely that my project will be made available to the general public, initially targetted at South East- Queensland only, but the whole of the state and an Australian-wide installation are likely to follow. That is why I gave scalablity and maintainability a high priority and chose Java Servlet/JSP/struts as the development basis. When I started Umberto Nicoletti's website indicated that "A patch that enables exceptions in mapscript, so that mapscript errors don't crash your JVM (and Tomcat) anymore." will come soon. Well its two-three months later now and I was wondering when it will be released? It is very important to me as I would not be very happy if i had to port my entire site to php or python. Thank you very much, Daniel From unicoletti at PROMETEO.IT Mon Apr 11 02:49:54 2005 From: unicoletti at PROMETEO.IT (Umberto Nicoletti) Date: Mon, 11 Apr 2005 11:49:54 +0200 Subject: Threadsafety/Exceptions for Java Mapscript? In-Reply-To: Message-ID: On Mon, 2005-04-11 at 03:33 -0500, Daniel Caldeweyher wrote: > Hi everyone, > > first of all I would like to thank all the developers for this great piece > of software. > > I am working on a GIS project for my University using JavaMascript on > Tomcat 5.5.7. My supervisor would to like to go online with my solution in > a month or two for public testing. In the beginning 'public' means open to > all University members, other Stakeholders and for presentations. However > in the (near) future it is very likely that my project will be made > available to the general public, initially targetted at South East- > Queensland only, but the whole of the state and an Australian-wide > installation are likely to follow. That is why I gave scalablity and > maintainability a high priority and chose Java Servlet/JSP/struts as the > development basis. > > When I started Umberto Nicoletti's website indicated that "A patch that > enables exceptions in mapscript, so that mapscript errors don't crash your > JVM (and Tomcat) anymore." will come soon. Well its two-three months later > now and I was wondering when it will be released? It is very important to > me as I would not be very happy if i had to port my entire site to php or > python. > The patch is in mainstream mapserver, I'll update my web site asap. There has been some discussion on thread safety lately so make sure you check out the archives: search the subject for 'Java MapScript issues Servlet'. You could find this link interesting (or search bugzilla for threads): http://mapserver.gis.umn.edu/bugs/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=product&type0-0-0=substring&value0-0-0=thread&field0-0-1=component&type0-0-1=substring&value0-0-1=thread&field0-0-2=short_desc&type0-0-2=substring&value0-0-2=thread&field0-0-3=status_whiteboard&type0-0-3=substring&value0-0-3=thread Regards, Umberto > Thank you very much, > > Daniel -- Umberto Nicoletti | We are Pentium of Borg. +390415701366 unicoletti at prometeo.it | Division is futile. Prometeo S.R.L. The Software Experience | You will be approximated. From wannes.vandergucht at UGENT.BE Mon Apr 11 03:01:05 2005 From: wannes.vandergucht at UGENT.BE (wannes Van der Gucht) Date: Mon, 11 Apr 2005 05:01:05 -0500 Subject: I can't see my maps Message-ID: you'll have to make sure that the WWW has read and write permissions for the directory where the map is located. If you open the page index.html in your brower, look at the sourcecode and check if the src for IMG is correct. From David.Fawcett at STATE.MN.US Mon Apr 11 06:15:06 2005 From: David.Fawcett at STATE.MN.US (Fawcett, David) Date: Mon, 11 Apr 2005 08:15:06 -0500 Subject: Complete Mapserver example Message-ID: Nuri, There is a simple, complete, demo at http://cvs.gis.umn.edu/dist/itasca3.5.tar.gz This was built for version 3.5, but should still work. You can also download a more complex demo at http://maps.dnr.state.mn.us/mapserver_demos/workshop.zip David. David Fawcett Minnesota Office of Environmental Assistance david.fawcett at moea.state.mn.us 651.215.0200 -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of Nuri Sent: Friday, April 08, 2005 7:46 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] Complete Mapserver example Hi, I'm trying to run Mapserver for first time. Someone told me to installed MS4W in my computer to understand who Mapserver runs before execute it with IIS. Apache runs perfectly, but can't find any complete example of mapserver to install to my computer. Does someone knows if there are any complete working example? Some of them haven't got shapes, others haven't got templates, others codes that doesn't run in windows,... I thank for your help. From dmorissette at DMSOLUTIONS.CA Mon Apr 11 07:35:22 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Mon, 11 Apr 2005 10:35:22 -0400 Subject: Google maps w/ satellite imagery In-Reply-To: <42564087.2040907@ccgis.de> Message-ID: Arnulf Christl wrote: > > Googlemaps is a nice experiment but we KNOW that it is no good in the > long run. Have a look at the scales and resolution satellite image they > offer, this is a minuscule fraction of all satellite and ortho images > available world wide - as WMS. And googlemaps will never ever be able to > be integrated with any of those datasets. What a waste of energy. > I disagree. WMS services all over the internet and interoperability are nice for some types of applications, but when all you need is to plot the location of your house or business on a map, then what Google offers is *exactly* what you need, no more, no less. > Hey - we are falling back into medieval raster tile viewers - i thought > that we had overcome those times long ago. Somebody should really point > this out to Google, else they might make a big mess of the standardized > infrastructures that are slowly emerging all over the place. We should > not let this happen. > For very high traffic sites serving millions of maps per day and where there is no need for being able to add/remove layers dynamically, then I think that using tiles or caching pre-generated maps is a great way to optimize your use of resources. It's not because the idea is old that it was not good, serving tiles or pregenerated map images will always be faster than generating the maps on the fly from vector data. My 0.02$ Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette at dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From dldeskins at GMAIL.COM Mon Apr 11 08:09:33 2005 From: dldeskins at GMAIL.COM (Don Deskins) Date: Mon, 11 Apr 2005 10:09:33 -0500 Subject: shp2tile question Message-ID: hello, another newbie question. My project has large shp files (2 are greater than 1 gig). My obvious solution to the speed problem was to tile the shp files. After (finally) getting shp2tile compiled, I tried several different option combinations and got what were to me unexpected results. What I expected was some kind of world file for each tile and then use shptree to index the files. What I got of course was a series of shp files. My questions are as follows: 1. How do I figure out how many rows and colums to use in the shp2tile program? The shp file contains approx 54000 shapes. 2. If i use the quadtree option, how do I know what value to use? 3. Is there a way to create an index on the shp files that are produced with the shp2tile program, so that I do not have to create a layer for each shp file? 4. What else am I missing? Thanks, Don From gireddy at GMAIL.COM Mon Apr 11 08:41:38 2005 From: gireddy at GMAIL.COM (Shashi Gireddy) Date: Mon, 11 Apr 2005 10:41:38 -0500 Subject: I can't see my maps In-Reply-To: Message-ID: if your are working on windows, may be the image path is not accessible due to security reasons, go to that directory properties and select security and set appropriate settings(I had IIS, this may not be the reason, just give a try). check if the image is created by going to the image folder (delete all images once) and rerun the program and the check if the image is generated. for me when I used dynamic postgis (i.e generating the map from php code) a blank map was generated (I am trying for a month,I still didn't get the sol for t his). On Apr 10, 2005 3:19 PM, CJ wrote: > Can anyone help me? I have Apache, PHP, MySQL setup on my local server and > have been trying to add in MapServer. I have installed and configured all > the elements and have been working with the Itasca demo workshop. > > So far I can get the webpage working but there is no map in the map frame. > The map is there and the Index.html points to its directory, so why can't it > find the map? > > I'd appreciate any help with this. I'm a total newbie to MapServer, etc. > -- Shashi Kiran Reddy. Gireddy, Graduate Assistant, CBER, University of Alabama. http://www.cs.ua.edu/shashi Home: 205-752-5137 Cell: 205-657-1438 From bluetuna_goes_skying at YAHOO.CO.UK Mon Apr 11 08:46:06 2005 From: bluetuna_goes_skying at YAHOO.CO.UK (=?iso-8859-1?q?jo=FFffffffffffe3o=20Antunes?=) Date: Mon, 11 Apr 2005 16:46:06 +0100 Subject: configure: error: Could not find gd.h or libgd.a/libgd.so Message-ID: Dear all, I get this error trying to compile mapserver for LINUX: ... configure: checking for GD 2.0.12 or higher... checking for gdImageSetAntiAliased in -lgd... no configure: checking whether GD needs libiconv... checking for gdImageSetAntiAliased in -lgd... no configure: error: Could not find gd.h or libgd.a/libgd.so in /usr/lib/libgd.so. Make sure GD 2.0.12 or higher is compiled before calling configure. You may also get this error if you didn't specify the appropriate location for one of GD's dependencies (freetype, libpng, libjpeg or libiconv). Browsing the internet I noticed I am not the only one, but the fact is I could not find an answer.. I have already checked that the libreries required actually exist. Taking their paths in consideration, I used the option: --with-gd=/usr/include/gd.h No success, though.. could someone please give me a hand on this? Thanks in advance Joao Antunes Send instant messages to your online friends http://uk.messenger.yahoo.com From fwarmerdam at GMAIL.COM Mon Apr 11 08:56:08 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Mon, 11 Apr 2005 11:56:08 -0400 Subject: configure: error: Could not find gd.h or libgd.a/libgd.so In-Reply-To: <20050411154606.32805.qmail@web25701.mail.ukl.yahoo.com> Message-ID: On Apr 11, 2005 11:46 AM, jo?ffffffffffe3o Antunes wrote: > Dear all, > > I get this error trying to compile mapserver for > LINUX: > > ... > configure: checking for GD 2.0.12 or higher... > checking for gdImageSetAntiAliased in -lgd... no > configure: checking whether GD needs libiconv... > checking for gdImageSetAntiAliased in -lgd... no > configure: error: Could not find gd.h or > libgd.a/libgd.so in /usr/lib/libgd.so. Make sure GD > 2.0.12 or higher is compiled before calling configure. > You may also get this error if you didn't specify the > appropriate location for one of GD's dependencies > (freetype, libpng, libjpeg or libiconv). > > Browsing the internet I noticed I am not the only one, > but the fact is I could not find an answer.. > > I have already checked that the libreries required > actually exist. Taking their paths in consideration, I > used the option: > > --with-gd=/usr/include/gd.h > > No success, though.. > > could someone please give me a hand on this? Joao, As the configure message suggests, I believe you need to download a recent version of gd, build and install it, and the configure with something like "--with-gd=/usr/local". Source for a recent GD can be downloaded from: http://www.boutell.com/gd/http/gd-2.0.33.tar.gz Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From cdaily at GMAIL.COM Mon Apr 11 08:58:11 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Mon, 11 Apr 2005 10:58:11 -0500 Subject: configure: error: Could not find gd.h or libgd.a/libgd.so In-Reply-To: <20050411154606.32805.qmail@web25701.mail.ukl.yahoo.com> Message-ID: Try adding '--with-gd=/usr' to the configure for mapserver. Battled this same problems last week. If you're doing php mapscript, do the same thing in the configure for php, so that both programs are using the same version of gd (otherwise php will default to it's own bundled gd). -Camden From sgillies at FRII.COM Mon Apr 11 09:01:38 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Mon, 11 Apr 2005 10:01:38 -0600 Subject: Threadsafety/Exceptions for Java Mapscript? In-Reply-To: Message-ID: On Apr 11, 2005, at 3:49 AM, Umberto Nicoletti wrote: > On Mon, 2005-04-11 at 03:33 -0500, Daniel Caldeweyher wrote: >> Hi everyone, >> >> first of all I would like to thank all the developers for this great >> piece >> of software. >> >> I am working on a GIS project for my University using JavaMascript on >> Tomcat 5.5.7. My supervisor would to like to go online with my >> solution in >> a month or two for public testing. In the beginning 'public' means >> open to >> all University members, other Stakeholders and for presentations. >> However >> in the (near) future it is very likely that my project will be made >> available to the general public, initially targetted at South East- >> Queensland only, but the whole of the state and an Australian-wide >> installation are likely to follow. That is why I gave scalablity and >> maintainability a high priority and chose Java Servlet/JSP/struts as >> the >> development basis. >> >> When I started Umberto Nicoletti's website indicated that "A patch >> that >> enables exceptions in mapscript, so that mapscript errors don't crash >> your >> JVM (and Tomcat) anymore." will come soon. Well its two-three months >> later >> now and I was wondering when it will be released? It is very >> important to >> me as I would not be very happy if i had to port my entire site to >> php or >> python. >> > > The patch is in mainstream mapserver, I'll update my web site asap. > There has been some discussion on thread safety lately so make sure you > check out the archives: search the subject for 'Java MapScript issues > Servlet'. > > You could find this link interesting (or search bugzilla for threads) > > http://mapserver.gis.umn.edu/bugs/buglist.cgi? > bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=RE > OPENED&field0-0-0=product&type0-0-0=substring&value0-0 > -0=thread&field0-0-1=component&type0-0-1=substring&value0-0 > -1=thread&field0-0-2=short_desc&type0-0-2=substring&value0-0 > -2=thread&field0-0-3=status_whiteboard&type0-0-3=substring&value0-0 > -3=thread > > Regards, > Umberto > Daniel, Umberto, I just committed a change to CVS related to bug 1203 http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1203 I'd appreciate it very much if you would read the discussion there, and if possible, update your CVS mapserver and help me test. cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From arnulf.christl at CCGIS.DE Mon Apr 11 09:09:53 2005 From: arnulf.christl at CCGIS.DE (Arnulf Christl) Date: Mon, 11 Apr 2005 18:09:53 +0200 Subject: Google maps w/ satellite imagery In-Reply-To: <425A8B2A.5080406@dmsolutions.ca> Message-ID: Daniel Morissette wrote: > Arnulf Christl wrote: > >> >> Googlemaps is a nice experiment but we KNOW that it is no good in the >> long run. Have a look at the scales and resolution satellite image they >> offer, this is a minuscule fraction of all satellite and ortho images >> available world wide - as WMS. And googlemaps will never ever be able to >> be integrated with any of those datasets. What a waste of energy. >> > > I disagree. WMS services all over the internet and interoperability are > nice for some types of applications, but when all you need is to plot > the location of your house or business on a map, then what Google offers > is *exactly* what you need, no more, no less. > > >> Hey - we are falling back into medieval raster tile viewers - i thought >> that we had overcome those times long ago. Somebody should really point >> this out to Google, else they might make a big mess of the standardized >> infrastructures that are slowly emerging all over the place. We should >> not let this happen. >> > > For very high traffic sites serving millions of maps per day and where > there is no need for being able to add/remove layers dynamically, then I > think that using tiles or caching pre-generated maps is a great way to > optimize your use of resources. It's not because the idea is old that it > was not good, serving tiles or pregenerated map images will always be > faster than generating the maps on the fly from vector data. > > My 0.02$ > > Daniel Hi, yes, this makes a lot of sense and i agree with you. I felt like having to blurt out my ideas because of two issues: 1. we (that is the several hundred people on this and many more lists) are experts for geodata software, both implementing and using it. We are not any less serious thinkers and the summed budget of the Open Source community should also not be underestimated. Its all bits and pieces but its lots of bits an pieces. Find out how many developers are behind google maps? That would really be interesting, i bet its less peopel than those furthering MapServer, GeoServer, PROJ4, GDAL, OGR, deegree, GEOS and all those other goodies we use every day without much thinking. So my message should have been: We do not have to hide ourselves behind "...well funded companies employing serious brain power." Maybe i should just stop preaching and thats it. :-) 2. We had a hard time trying to get people to stick to standards and i'd hate to see a reverssl of that process - although i strongly believe that this will not happen any more. Both points stated i fully agree that: We should definitely not ignore significant developments by large, well funded companies employing serious brain power. :-) Serving several million maps a day will be faster using predefined tiles. Conceded. Those maps have to be put together with some piece of software all the same. Why not get the Google map developers to join Open Source GIS dev instead of having them reinvent the wheel in a way we cant use. Google already has opened itself a little to the OS community (maybe because they are not that large at all). If those maps are created without following any open standards but some Google standards and become an integral part of our geo websphere then we will not get rid of them any more. Sorry, i wanted to stop preaching... Best, Arnulf. -- -------------------------- Arnulf B. Christl -------------------------- Mapbender User Conference: http://wms1.ccgis.de/ewiki -------------------------- http://www.ccgis.org http://www.mapbender.org -------------------------- From Tom.Kralidis at EC.GC.CA Mon Apr 11 09:20:59 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Mon, 11 Apr 2005 12:20:59 -0400 Subject: Google maps w/ satellite imagery Message-ID: > -----Original Message----- > From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Arnulf Christl > Sent: Monday, 11 April, 2005 12:10 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Google maps w/ satellite imagery > > > Daniel Morissette wrote: > > Arnulf Christl wrote: > > > >> > >> Googlemaps is a nice experiment but we KNOW that it is no > good in the > >> long run. Have a look at the scales and resolution satellite image > >> they offer, this is a minuscule fraction of all satellite > and ortho > >> images available world wide - as WMS. And googlemaps will > never ever > >> be able to be integrated with any of those datasets. What > a waste of > >> energy. > >> > > > > I disagree. WMS services all over the internet and interoperability > > are nice for some types of applications, but when all you > need is to > > plot the location of your house or business on a map, then > what Google > > offers is *exactly* what you need, no more, no less. > > > > > >> Hey - we are falling back into medieval raster tile viewers - i > >> thought that we had overcome those times long ago. Somebody should > >> really point this out to Google, else they might make a > big mess of > >> the standardized infrastructures that are slowly emerging all over > >> the place. We should not let this happen. > >> > > > > For very high traffic sites serving millions of maps per > day and where > > there is no need for being able to add/remove layers > dynamically, then > > I think that using tiles or caching pre-generated maps is a > great way > > to optimize your use of resources. It's not because the idea is old > > that it was not good, serving tiles or pregenerated map images will > > always be faster than generating the maps on the fly from > vector data. > > > > My 0.02$ > > > > Daniel > > Hi, > yes, this makes a lot of sense and i agree with you. I felt > like having to blurt out my ideas because of two issues: > > 1. we (that is the several hundred people on this and many > more lists) are experts for geodata software, both > implementing and using it. We are not any less serious > thinkers and the summed budget of the Open Source community > should also not be underestimated. Its all bits and pieces > but its lots of bits an pieces. Find out how many developers > are behind google maps? That would really be interesting, i > bet its less peopel than those furthering MapServer, > GeoServer, PROJ4, GDAL, OGR, deegree, GEOS and all those > other goodies we use every day without much thinking. > > So my message should have been: We do not have to hide > ourselves behind "...well funded companies employing serious > brain power." Maybe i should just stop preaching and thats it. > :-) > > 2. We had a hard time trying to get people to stick to > standards and i'd hate to see a reverssl of that process - > although i strongly believe that this will not happen any more. > There's certainly much more awareness and adoption given the Internet and past lessons learned. We are getting there!! But still, maps.google.com is all the rage. Since it's release, I would estimate 5 emails a week related to maps.google.com. It's easy. People can use it (for the most part). The point (to steal a quote from JF) is that we have done a fantastic job at pulling things apart; now if we can just do just as good a job at pulling things together. Like Google has, but using interoperability. > Both points stated i fully agree that: > > We should definitely not ignore significant developments by > large, well funded companies employing serious brain power. > :-) > > Serving several million maps a day will be faster using > predefined tiles. Conceded. Those maps have to be put > together with some piece of software all the same. Why not > get the Google map developers to join Open Source GIS dev > instead of having them reinvent the wheel in a way we cant > use. Google already has opened itself a little to the OS > community (maybe because they are not that large at all). > Agreed. In their map API, you'll see that they accept an XML document (i.e.: http://maps.google.com/?loc=http://rockburger.com/geocoder/points.xml) or a lat/long point. This could certainly have been (or be): http://maps.google.com/?feature=http://host/myplace.gml&style=http://hos t/bluedot.sld& > If those maps are created without following any open > standards but some Google standards and become an integral > part of our geo websphere then we will not get rid of them any more. > Sounds like a trip to Silicon Valley is in order by some higher level inteoperability folks. ..Tom ========================= Tom Kralidis Senior Systems Scientist Environment Canada Tel: +01-905-336-4409 http://www.ec.gc.ca/ > Sorry, i wanted to stop preaching... > > Best, Arnulf. > > -- > -------------------------- > Arnulf B. Christl > -------------------------- > Mapbender User Conference: > http://wms1.ccgis.de/ewiki > -------------------------- > http://www.ccgis.org > http://www.mapbender.org > -------------------------- > From woodbri at SWOODBRIDGE.COM Mon Apr 11 10:01:26 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Mon, 11 Apr 2005 13:01:26 -0400 Subject: shp2tile question In-Reply-To: Message-ID: Don Deskins wrote: > hello, another newbie question. > > My project has large shp files (2 are greater than 1 gig). My obvious > solution to the speed problem was to tile the shp files. > > After (finally) getting shp2tile compiled, I tried several different option > combinations and got what were to me unexpected results. What I expected > was some kind of world file for each tile and then use shptree to index the > files. What I got of course was a series of shp files. If you just want to index your shapefile then use shptree shapefile.shp > My questions are as follows: > > 1. How do I figure out how many rows and colums to use in the shp2tile > program? The shp file contains approx 54000 shapes. There is no magic number. If you data is spread evenly over the area then you can expect row*col tile or about 54000/(row*col) in each tile. You might have to try some different sizes to get something you are happy with. > 2. If i use the quadtree option, how do I know what value to use? Pick the number so that is is as large as possible and that you are displaying most of the records for each map draw. That way you open the least number of files and you use most all of the objects in each file you open. Sorry, no magic number. > 3. Is there a way to create an index on the shp files that are produced > with the shp2tile program, so that I do not have to create a layer for each > shp file? After you run shp2tile also run: find /path/to/files -name "*.shp" -exec shptree {} \; find /path/to/files -name "*.shp" > tileindex.in tile2ms tileindex.in tileindex shptree tileindex and now you can reference you files in a single layer using: TILEINDEX "tileindex" -Steve > 4. What else am I missing? > > Thanks, > > Don > From bluetuna_goes_skying at YAHOO.CO.UK Mon Apr 11 10:05:43 2005 From: bluetuna_goes_skying at YAHOO.CO.UK (=?iso-8859-1?q?jo=FFffffffffffe3o=20Antunes?=) Date: Mon, 11 Apr 2005 18:05:43 +0100 Subject: configure: error: Could not find gd.h or libgd.a/libgd.so In-Reply-To: 6667 Message-ID: Thanks a lot! It works now! Joao Antunes --- Frank Warmerdam wrote: > On Apr 11, 2005 11:46 AM, jo?ffffffffffe3o Antunes > wrote: > > Dear all, > > > > I get this error trying to compile mapserver for > > LINUX: > > > > ... > > configure: checking for GD 2.0.12 or higher... > > checking for gdImageSetAntiAliased in -lgd... no > > configure: checking whether GD needs libiconv... > > checking for gdImageSetAntiAliased in -lgd... no > > configure: error: Could not find gd.h or > > libgd.a/libgd.so in /usr/lib/libgd.so. Make sure > GD > > 2.0.12 or higher is compiled before calling > configure. > > You may also get this error if you didn't specify > the > > appropriate location for one of GD's dependencies > > (freetype, libpng, libjpeg or libiconv). > > > > Browsing the internet I noticed I am not the only > one, > > but the fact is I could not find an answer.. > > > > I have already checked that the libreries required > > actually exist. Taking their paths in > consideration, I > > used the option: > > > > --with-gd=/usr/include/gd.h > > > > No success, though.. > > > > could someone please give me a hand on this? > > Joao, > > As the configure message suggests, I believe you > need to download > a recent version of gd, build and install it, and > the configure with > something like "--with-gd=/usr/local". > > Source for a recent GD can be downloaded from: > http://www.boutell.com/gd/http/gd-2.0.33.tar.gz > > Best regards, > -- > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank > Warmerdam, warmerdam at pobox.com > light and sound - activate the windows | > http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial > Programmer for Rent > Send instant messages to your online friends http://uk.messenger.yahoo.com From ortelius at GMAIL.COM Mon Apr 11 10:36:47 2005 From: ortelius at GMAIL.COM (Jeffrey Johnson) Date: Mon, 11 Apr 2005 10:36:47 -0700 Subject: Install/Config Problems In-Reply-To: Message-ID: I ended up getting everything to work correctly by compiling PHP as an Apache DSO using this configure syntax. (Also had to move the various GD pieces into a single directory) ./configure --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs --with-pgsql --enable-dbase --with-freetype=/usr/local/include/freetype2/ --with-jpeg=/usr/lib/ --with-gd=/usr/src/gd On Apr 10, 2005 10:08 PM, Giridhar Manepalli wrote: > Hello, > Just to keep this thread resourceful for later: > I compiled php without GD. I also used the regex from php sources. > Debugging that only helped me learn that, it went onto some infinite > loop, I specifically did not observe any library miss-calls! > > Regards, > Giridhar > > On Apr 10, 2005 8:05 PM, Morten Hulden wrote: > > Giridhar Manepalli wrote: > > > > > I was successful in installing Mapserver with php mapscript on Fedora Core 2. > > > Php version 4.3.10 > > > > > > If anyone need any help regarding this configuration, I can help. I > > > guess, there is something with Fedora Core 3 that developers of > > > Mapserver need to look at! > > > > I do not see this a FC3 specific problem, I think it happens whenever > > PHP is compiled with the bundled GD library. The php_ prefix to GD > > function names was introduced to the bundled GD package in PHP last > > summer in order to prevent name space conflicts with other apache > > modules that use GD, such as perl. > > > > Now if PHP uses the bundled GD, mapserver 4.4.1 will still compile if I > > point to external GD libs, but compilation of PHP_mapscript will fail. > > On the other hand, if I try to trick mapscript to compile against PHP's > > bundled GD then I get segfault at mapscript dl-time. > > > > Could something similar to --with-php-regex-dir in mapserver configure > > scripts solve this? > > > > Of course recompiling PHP with external GD is an option, but then I am > > out out sync with FC3 update packages, which means increased maintenance > > burden. > > > > > > > On Apr 9, 2005 9:21 PM, Morten Hulden wrote: > > > > > >>Giridhar Manepalli wrote: > > >> > > >>>Currently, I am trying to install on Fedora Core 3, with php-4.3.11. > I built it as a DSO similar to the working model. > > >> > > >>If you get mapscript 4.4.1 to work on plain Fedora Core 3 I am > > >>interested to know how you get around the fact that FC3 comes with a PHP > > >>that has a bundled GD version where function names have a php_ prefix > > >>that mapscript will not recognize. > > >> > > >>Even if compile succeeds after some tricks, dl() segfaults because of > > >>undefined symbols. > > >> > > >>Recompiling PHP to use external GD seemed to be the only option last I > > >>tried, but that was a while ago... > > >> > > >>rgds > > >> > > > From dmorissette at DMSOLUTIONS.CA Mon Apr 11 11:12:13 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Mon, 11 Apr 2005 14:12:13 -0400 Subject: Google maps w/ satellite imagery In-Reply-To: <425AA151.2030309@ccgis.de> Message-ID: Arnulf Christl wrote: > > Serving several million maps a day will be faster using predefined > tiles. Conceded. Those maps have to be put together with some piece of > software all the same. Why not get the Google map developers to join > Open Source GIS dev instead of having them reinvent the wheel in a way > we cant use. Google already has opened itself a little to the OS > community (maybe because they are not that large at all). > > If those maps are created without following any open standards but some > Google standards and become an integral part of our geo websphere then > we will not get rid of them any more. > okay, I think I see where you're coming from now. It's probably true that Google could have made a huge difference if they had put their efforts in open source / open standards instead of taking the approach they've taken. Maybe you should be preaching to them. ;) Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette at dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From schiplunkar at GMAIL.COM Mon Apr 11 11:14:20 2005 From: schiplunkar at GMAIL.COM (Shailesh Chiplunkar) Date: Mon, 11 Apr 2005 23:44:20 +0530 Subject: Hi Message-ID: Hi, I've downloaded the Mapserver version 4.4.1 from the site.......just wanted to know wat to do next!!! Actually I am clueless as to what I'm supposed to do next!!! Please help me out! Shailesh From James.Shanton2 at NSCORP.COM Mon Apr 11 11:48:50 2005 From: James.Shanton2 at NSCORP.COM (Shanton, James A) Date: Mon, 11 Apr 2005 14:48:50 -0400 Subject: maps.google.com - Speed Message-ID: Is there anyway to speed this system up like maps.google.com ? I'm having speed issues displaying my database layers. Thanks! Jim -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jeffrey Johnson Sent: Friday, April 08, 2005 10:15 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Install/Config Problems Only a generic segmentation fault is returned. Perhaps I could go back to using PHP as a DSO. Is there some documentation online about how to get mapscript configured when PHP is configured this way. I have found some discussion of this on the list archives, but nothing that really seemed to help. Thanks, Jeff On Apr 8, 2005 4:11 AM, Christian Schroeder wrote: > Hello Jeffrey, > > I don't know what the problem concerning the php-module is, but once I had a > problem with the mapserv CGI-Module, too and got the error message 'Premature > end of script headers'. > > You can try to run the mapserv CGI-Module from console to get a more detailed > error message. > To do so, you have to call > > ./mapserv QUERY_STRING=map=/home/www/map1.map&mode=map > > This helped me to get more informations about which module failed. > > Regards, > Christian > > Jeffrey Johnson : > > > Hello, > > > > I am attempting to install and configure > > mapserver+phpmapscript+chameleon on my debian/linux box and have run > > into a currently insurmountable issue. apache+php config is fine. > > Haven't really tested php extensively, but some simple tests work ok. > > I have configured Mapserver with the following command. > > > > ./configure --with-proj --with-ogr --with-gdal --with-jpeg --with-png > > --with-tiff --with-postgis --with-wfs --with-wcs --with-wms > > --with-wfsclient --with-wmsclient --with-php=/usr/src/php-4.3.10/ > > > > then ran make and copied the 'mapserv' executable into the cgi-bin > > directory. When attempting to access a mapfile using the cgi-script > > directly > > http://domainname.com/cgi-bin/mapserv?map=/home/www/map1.map&mode=map > > I am returned '500 Internal Server error'. The logfile contains > > 'Premature end of script headers: /usr/local/apache/cgi-bin/mapserv' > > > > If I re-run configure and remove the --with-php=/usr/src/php-4.3.10/ > > directive and recompile, the map displays fine. > > > > I had originally compiled PHP as a DSO, but couldnt get mapserver to > > work this way either, so reverted to compiling php into apache > > directly. > > > > Any ideas? > > > > Thanks in advance, > > > > Jeff > > > From dldeskins at GMAIL.COM Mon Apr 11 11:54:06 2005 From: dldeskins at GMAIL.COM (Don Deskins) Date: Mon, 11 Apr 2005 14:54:06 -0400 Subject: shp2tile question In-Reply-To: <425AAD66.6020502@swoodbridge.com> Message-ID: Stephen, Thank you for your reply. what is the tile2ms command in your answer? I do not find it on google or this list Thanks again. On Apr 11, 2005 1:01 PM, Stephen Woodbridge wrote: > Don Deskins wrote: > > hello, another newbie question. > > > > My project has large shp files (2 are greater than 1 gig). My obvious > > solution to the speed problem was to tile the shp files. > > > > After (finally) getting shp2tile compiled, I tried several different option > > combinations and got what were to me unexpected results. What I expected > > was some kind of world file for each tile and then use shptree to index the > > files. What I got of course was a series of shp files. > > If you just want to index your shapefile then use shptree shapefile.shp > > > My questions are as follows: > > > > 1. How do I figure out how many rows and colums to use in the shp2tile > > program? The shp file contains approx 54000 shapes. > > There is no magic number. If you data is spread evenly over the area > then you can expect row*col tile or about 54000/(row*col) in each tile. > You might have to try some different sizes to get something you are > happy with. > > > 2. If i use the quadtree option, how do I know what value to use? > > Pick the number so that is is as large as possible and that you are > displaying most of the records for each map draw. That way you open the > least number of files and you use most all of the objects in each file > you open. Sorry, no magic number. > > > 3. Is there a way to create an index on the shp files that are produced > > with the shp2tile program, so that I do not have to create a layer for each > > shp file? > > After you run shp2tile also run: > > find /path/to/files -name "*.shp" -exec shptree {} \; > find /path/to/files -name "*.shp" > tileindex.in > tile2ms tileindex.in tileindex > shptree tileindex > > and now you can reference you files in a single layer using: > TILEINDEX "tileindex" > > -Steve > > > 4. What else am I missing? > > > > Thanks, > > > > Don > > > > -- Don Deskins From gmanepal at GMAIL.COM Mon Apr 11 11:57:32 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Mon, 11 Apr 2005 14:57:32 -0400 Subject: maps.google.com - speed Message-ID: Hello James, Start a new thread when it is different topic. Re: Speeding up, you have to be more specific than what you have specified. Regards, Giridhar >> Shanton, James A to MAPSERVER->>USERS >>Is there anyway to speed this system up like maps.google.com ? I'm having >>speed issues displaying my database layers. >>Thanks! >>Jim From bartvde at XS4ALL.NL Mon Apr 11 11:58:58 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Mon, 11 Apr 2005 20:58:58 +0200 Subject: shp2tile question In-Reply-To: <484a8ade05041111547c358fab@mail.gmail.com> Message-ID: Hi, It is tile4ms, not tile2ms, probably a typo by Steve. It is a Mapserver utility to make a tileindex. Alternatively, you can also use ogrtindex for vector layers and gdaltindex for raster layers. Best regards, Bart On Mon, 11 Apr 2005 14:54:06 -0400, Don Deskins wrote: > Stephen, > > Thank you for your reply. > > what is the tile2ms command in your answer? I do not find it on > google or this list > > Thanks again. > > On Apr 11, 2005 1:01 PM, Stephen Woodbridge > wrote: >> Don Deskins wrote: >> > hello, another newbie question. >> > >> > My project has large shp files (2 are greater than 1 gig). My obvious >> > solution to the speed problem was to tile the shp files. >> > >> > After (finally) getting shp2tile compiled, I tried several different >> option >> > combinations and got what were to me unexpected results. What I >> expected >> > was some kind of world file for each tile and then use shptree to >> index the >> > files. What I got of course was a series of shp files. >> >> If you just want to index your shapefile then use shptree shapefile.shp >> >> > My questions are as follows: >> > >> > 1. How do I figure out how many rows and colums to use in the >> shp2tile >> > program? The shp file contains approx 54000 shapes. >> >> There is no magic number. If you data is spread evenly over the area >> then you can expect row*col tile or about 54000/(row*col) in each tile. >> You might have to try some different sizes to get something you are >> happy with. >> >> > 2. If i use the quadtree option, how do I know what value to use? >> >> Pick the number so that is is as large as possible and that you are >> displaying most of the records for each map draw. That way you open the >> least number of files and you use most all of the objects in each file >> you open. Sorry, no magic number. >> >> > 3. Is there a way to create an index on the shp files that are >> produced >> > with the shp2tile program, so that I do not have to create a layer >> for each >> > shp file? >> >> After you run shp2tile also run: >> >> find /path/to/files -name "*.shp" -exec shptree {} \; >> find /path/to/files -name "*.shp" > tileindex.in >> tile2ms tileindex.in tileindex >> shptree tileindex >> >> and now you can reference you files in a single layer using: >> TILEINDEX "tileindex" >> >> -Steve >> >> > 4. What else am I missing? >> > >> > Thanks, >> > >> > Don >> > >> >> > > > -- > Don Deskins > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From temiz at DEPREM.GOV.TR Mon Apr 11 12:10:15 2005 From: temiz at DEPREM.GOV.TR (orkun) Date: Mon, 11 Apr 2005 22:10:15 +0300 Subject: problem with gd Message-ID: hello I encounter a continuous problem coming from gd. What's its function ? if I omit it, what cannot mapserver do ? or during compilation I receive this message: `mapsymbol.c:269: error: structure has no member named `gd_free'` regards Ahmet Temiz ______________________________________ XamimeLT - installed on mailserver for domain @deprem.gov.tr Queries to: postmaster at deprem.gov.tr ______________________________________ The views and opinions expressed in this e-mail message are the sender's own and do not necessarily represent the views and the opinions of Earthquake Research Dept. of General Directorate of Disaster Affairs. Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup, yasal olarak T.C. B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma Dairesi'ni baglayici nitelikte degildir. From cdaily at GMAIL.COM Mon Apr 11 12:15:15 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Mon, 11 Apr 2005 14:15:15 -0500 Subject: problem with gd In-Reply-To: <1113246615.24583.6.camel@landslide.deprem.gov.tr> Message-ID: GD is a graphics library. I'm fairly certain that mapserver uses it to actually draw the maps, so it's pretty important. Did you install gd as a package or from source? If as a package, did you install gd-devel as well? If you give some details for your setup as well as the ./configure command you're using on mapserver, we might be able to help a bit. -Camden Daily From bartvde at XS4ALL.NL Mon Apr 11 12:10:11 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Mon, 11 Apr 2005 21:10:11 +0200 Subject: problem with gd In-Reply-To: <1113246615.24583.6.camel@landslide.deprem.gov.tr> Message-ID: GD is the graphical library used by Mapserver to output images, without it you cannot do much. Best regards, Bart On Mon, 11 Apr 2005 22:10:15 +0300, orkun wrote: > hello > I encounter a continuous problem coming from gd. > What's its function ? > if I omit it, what cannot mapserver do ? > > or > > during compilation I receive this message: > `mapsymbol.c:269: error: structure has no member named `gd_free'` > > regards > > Ahmet Temiz > > > > > ______________________________________ > XamimeLT - installed on mailserver for domain @deprem.gov.tr > Queries to: postmaster at deprem.gov.tr > ______________________________________ > The views and opinions expressed in this e-mail message are the sender's > own > and do not necessarily represent the views and the opinions of > Earthquake Research Dept. > of General Directorate of Disaster Affairs. > > Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup, yasal > olarak T.C. > B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma Dairesi'ni baglayici > nitelikte degildir. > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From woodbri at SWOODBRIDGE.COM Mon Apr 11 12:21:05 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Mon, 11 Apr 2005 15:21:05 -0400 Subject: shp2tile question In-Reply-To: <484a8ade05041111547c358fab@mail.gmail.com> Message-ID: Don Deskins wrote: > Stephen, > > Thank you for your reply. > > what is the tile2ms command in your answer? I do not find it on > google or this list Sorry, a typo, should be tile4ms > Thanks again. > > On Apr 11, 2005 1:01 PM, Stephen Woodbridge wrote: > >>Don Deskins wrote: >> >>>hello, another newbie question. >>> >>>My project has large shp files (2 are greater than 1 gig). My obvious >>>solution to the speed problem was to tile the shp files. >>> >>>After (finally) getting shp2tile compiled, I tried several different option >>>combinations and got what were to me unexpected results. What I expected >>>was some kind of world file for each tile and then use shptree to index the >>>files. What I got of course was a series of shp files. >> >>If you just want to index your shapefile then use shptree shapefile.shp >> >> >>>My questions are as follows: >>> >>>1. How do I figure out how many rows and colums to use in the shp2tile >>>program? The shp file contains approx 54000 shapes. >> >>There is no magic number. If you data is spread evenly over the area >>then you can expect row*col tile or about 54000/(row*col) in each tile. >>You might have to try some different sizes to get something you are >>happy with. >> >> >>>2. If i use the quadtree option, how do I know what value to use? >> >>Pick the number so that is is as large as possible and that you are >>displaying most of the records for each map draw. That way you open the >>least number of files and you use most all of the objects in each file >>you open. Sorry, no magic number. >> >> >>>3. Is there a way to create an index on the shp files that are produced >>>with the shp2tile program, so that I do not have to create a layer for each >>>shp file? >> >>After you run shp2tile also run: >> >>find /path/to/files -name "*.shp" -exec shptree {} \; >>find /path/to/files -name "*.shp" > tileindex.in >>tile2ms tileindex.in tileindex >>shptree tileindex >> >>and now you can reference you files in a single layer using: >>TILEINDEX "tileindex" >> >>-Steve >> >> >>>4. What else am I missing? >>> >>>Thanks, >>> >>>Don >>> >> >> > > From woklist at CHARTER.NET Mon Apr 11 12:24:37 2005 From: woklist at CHARTER.NET (William K) Date: Mon, 11 Apr 2005 14:24:37 -0500 Subject: Mac OS X binaries - fixed bad link Message-ID: Oops, I forgot to update the link for one of the support packages, Graphics Libs. You'd end up downloading the old original package, which doesn't have expat, and PHP wouldn't work. sorry for the inconvenience ----- William Kyngesburye http://webpages.charter.net/kyngchaos/ "Time is an illusion - lunchtime doubly so." - Ford Prefect -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 389 bytes Desc: not available URL: From dldeskins at GMAIL.COM Mon Apr 11 12:24:45 2005 From: dldeskins at GMAIL.COM (Don Deskins) Date: Mon, 11 Apr 2005 15:24:45 -0400 Subject: shp2tile question In-Reply-To: Message-ID: Bart (and Steve), Thanks. I have my files created and tried to reference this index in my map file: #################################### # parcels LAYER NAME 'tileindex' TYPE TILEINDEX DATA '/path/to/tileindex' MAXSCALE 40000 END LAYER NAME 'SCAP_Cert2004_ParcelsUTM16M' STATUS ON TYPE POLYGON TILEINDEX '/path/to/tileindex' #TILEITEM 'LOCATION' MAXSCALE 40000 END #################################### I get no error but my shapes are not showing up... do you see a problem with the above map? Don On Apr 11, 2005 2:58 PM, Bart van den Eijnden wrote: > Hi, > > It is tile4ms, not tile2ms, probably a typo by Steve. > > It is a Mapserver utility to make a tileindex. Alternatively, you can also > use ogrtindex for vector layers and gdaltindex for raster layers. > > Best regards, > Bart > From woodbri at SWOODBRIDGE.COM Mon Apr 11 12:32:56 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Mon, 11 Apr 2005 15:32:56 -0400 Subject: shp2tile question In-Reply-To: <484a8ade050411122473d17d58@mail.gmail.com> Message-ID: Don, The layer should probably be more like this, change to suit your needs: LAYER NAME "parcels" STATUS ON TYPE POLYGON TILEINDEX 'path/to/tileindex' MAXSCALE 40000 CLASS COLOR 255 255 0 OVERLAYCOLOR 0 0 0 END END -Steve Don Deskins wrote: > Bart (and Steve), > > Thanks. > > I have my files created and tried to reference this index in my map file: > > #################################### > # parcels > LAYER > NAME 'tileindex' > TYPE TILEINDEX > DATA '/path/to/tileindex' > MAXSCALE 40000 > END > > LAYER > NAME 'SCAP_Cert2004_ParcelsUTM16M' > STATUS ON > TYPE POLYGON > TILEINDEX '/path/to/tileindex' > #TILEITEM 'LOCATION' > MAXSCALE 40000 > END > #################################### > > I get no error but my shapes are not showing up... do you see a > problem with the above map? > > Don > > On Apr 11, 2005 2:58 PM, Bart van den Eijnden wrote: > >>Hi, >> >>It is tile4ms, not tile2ms, probably a typo by Steve. >> >>It is a Mapserver utility to make a tileindex. Alternatively, you can also >>use ogrtindex for vector layers and gdaltindex for raster layers. >> >>Best regards, >>Bart >> > > From bartvde at XS4ALL.NL Mon Apr 11 12:28:45 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Mon, 11 Apr 2005 21:28:45 +0200 Subject: shp2tile question In-Reply-To: <484a8ade050411122473d17d58@mail.gmail.com> Message-ID: Hi Don, check the dbf of your generated tileindex (the LOCATION field). I usually use absolute paths in there. Are there absolute or relative paths to the files in there? Also use TYPE POLYGON. Are you zoomed in enough to have your layer showing up, since you are using a MAXSCALE setting? Best regards, Bart On Mon, 11 Apr 2005 15:24:45 -0400, Don Deskins wrote: > Bart (and Steve), > > Thanks. > > I have my files created and tried to reference this index in my map file: > > #################################### > # parcels > LAYER > NAME 'tileindex' > TYPE TILEINDEX > DATA '/path/to/tileindex' > MAXSCALE 40000 > END > > LAYER > NAME 'SCAP_Cert2004_ParcelsUTM16M' > STATUS ON > TYPE POLYGON > TILEINDEX '/path/to/tileindex' > #TILEITEM 'LOCATION' > MAXSCALE 40000 > END > #################################### > > I get no error but my shapes are not showing up... do you see a > problem with the above map? > > Don > > On Apr 11, 2005 2:58 PM, Bart van den Eijnden wrote: >> Hi, >> >> It is tile4ms, not tile2ms, probably a typo by Steve. >> >> It is a Mapserver utility to make a tileindex. Alternatively, you can >> also >> use ogrtindex for vector layers and gdaltindex for raster layers. >> >> Best regards, >> Bart >> > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From wouter.schaubroeck at GMAIL.COM Mon Apr 11 12:45:45 2005 From: wouter.schaubroeck at GMAIL.COM (Wouter Schaubroeck) Date: Mon, 11 Apr 2005 21:45:45 +0200 Subject: Difference shp2img <-> mapserv.exe Message-ID: Hi all, I have this problem: with shp2img, my mapfile, and the corresponding image shows up, but with mapserv.exe it doesn't. Actually, it does, but it is blank. I've checked both with dependency walker, but there were no problems. Is there a solution for my problem, or is this very machine related? Btw: i'm running Apache 2.0.48 on windows xp. Best regards, Wouter Schaubroeck This is my map file: MAP IMAGETYPE PNG24 EXTENT 165450 227900 166300 230060 SIZE 600 450 SHAPEPATH "Data" SYMBOLSET "symbols.sym" PROJECTION "init=epsg:4313" END LAYER NAME "Herten" TYPE POINT CONNECTIONTYPE OGR CONNECTION "virtual.ovf" DATA "GSM00837" STATUS ON LABELITEM GSM00837 PROJECTION "init=epsg:4313" END CLASS SYMBOL "cir" SIZE 6 COLOR 255 0 0 LABEL SIZE MEDIUM TYPE BITMAP COLOR 0 0 0 END END END END And this is how i call my mapserver /cgi-bin/mapserv.exe?map=C:/Program Files/Apache Group/Apache2/htdocs/herten/herten.map&mode=map From bill at BINKO.NET Mon Apr 11 12:46:07 2005 From: bill at BINKO.NET (Bill Binko) Date: Mon, 11 Apr 2005 15:46:07 -0400 Subject: Difference shp2img <-> mapserv.exe In-Reply-To: <425AD3E9.9010601@gmail.com> Message-ID: Check your permissions: apache runs as its own user, who probably cannot access your files. On Mon, 11 Apr 2005, Wouter Schaubroeck wrote: > Hi all, > > I have this problem: with shp2img, my mapfile, and the corresponding > image shows up, but with mapserv.exe it doesn't. Actually, it does, but > it is blank. > I've checked both with dependency walker, but there were no problems. Is > there a solution for my problem, or is this very machine related? > Btw: i'm running Apache 2.0.48 on windows xp. > > Best regards, > > Wouter Schaubroeck > > This is my map file: > > MAP > IMAGETYPE PNG24 > EXTENT 165450 227900 166300 230060 > SIZE 600 450 > SHAPEPATH "Data" > SYMBOLSET "symbols.sym" > PROJECTION > "init=epsg:4313" > END > > LAYER > NAME "Herten" > TYPE POINT > CONNECTIONTYPE OGR > CONNECTION "virtual.ovf" > DATA "GSM00837" > STATUS ON > LABELITEM GSM00837 > PROJECTION > "init=epsg:4313" > END > CLASS > SYMBOL "cir" > SIZE 6 > COLOR 255 0 0 > LABEL > SIZE MEDIUM > TYPE BITMAP > COLOR 0 0 0 > END > END > END > END > > > And this is how i call my mapserver > > /cgi-bin/mapserv.exe?map=C:/Program Files/Apache > Group/Apache2/htdocs/herten/herten.map&mode=map > > From bill at BINKO.NET Mon Apr 11 13:06:41 2005 From: bill at BINKO.NET (Bill Binko) Date: Mon, 11 Apr 2005 16:06:41 -0400 Subject: Difference shp2img <-> mapserv.exe In-Reply-To: <425AD3E9.9010601@gmail.com> Message-ID: Sometimes it helps to read the whole message: I'm sorry - I didn't realize you were on Windows. Perhaps my permissions issue is not the solution. Sorry about that Bill On Mon, 11 Apr 2005, Wouter Schaubroeck wrote: > Hi all, > > I have this problem: with shp2img, my mapfile, and the corresponding > image shows up, but with mapserv.exe it doesn't. Actually, it does, but > it is blank. > I've checked both with dependency walker, but there were no problems. Is > there a solution for my problem, or is this very machine related? > Btw: i'm running Apache 2.0.48 on windows xp. > > Best regards, > > Wouter Schaubroeck > > This is my map file: > > MAP > IMAGETYPE PNG24 > EXTENT 165450 227900 166300 230060 > SIZE 600 450 > SHAPEPATH "Data" > SYMBOLSET "symbols.sym" > PROJECTION > "init=epsg:4313" > END > > LAYER > NAME "Herten" > TYPE POINT > CONNECTIONTYPE OGR > CONNECTION "virtual.ovf" > DATA "GSM00837" > STATUS ON > LABELITEM GSM00837 > PROJECTION > "init=epsg:4313" > END > CLASS > SYMBOL "cir" > SIZE 6 > COLOR 255 0 0 > LABEL > SIZE MEDIUM > TYPE BITMAP > COLOR 0 0 0 > END > END > END > END > > > And this is how i call my mapserver > > /cgi-bin/mapserv.exe?map=C:/Program Files/Apache > Group/Apache2/htdocs/herten/herten.map&mode=map > > From akrherz at IASTATE.EDU Mon Apr 11 13:06:22 2005 From: akrherz at IASTATE.EDU (Daryl Herzmann) Date: Mon, 11 Apr 2005 15:06:22 -0500 Subject: Hi In-Reply-To: <9dea3a2705041111144c50b22d@mail.gmail.com> Message-ID: Greetings, On Mon, 11 Apr 2005, Shailesh Chiplunkar wrote: > Hi, > I've downloaded the Mapserver version 4.4.1 from the site.......just > wanted to know wat to do next!!! > Actually I am clueless as to what I'm supposed to do next!!! > Please help me out! Perhaps we should back up some, what prompted you to download it in the first place? What do you want to do? daryl -- /** * Daryl Herzmann (akrherz at iastate.edu) * Program Assistant -- Iowa Environmental Mesonet * http://mesonet.agron.iastate.edu */ From fwarmerdam at GMAIL.COM Mon Apr 11 13:16:48 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Mon, 11 Apr 2005 16:16:48 -0400 Subject: Difference shp2img <-> mapserv.exe In-Reply-To: <425AD3E9.9010601@gmail.com> Message-ID: On Apr 11, 2005 3:45 PM, Wouter Schaubroeck wrote: > Hi all, > > I have this problem: with shp2img, my mapfile, and the corresponding > image shows up, but with mapserv.exe it doesn't. Actually, it does, but > it is blank. > I've checked both with dependency walker, but there were no problems. Is > there a solution for my problem, or is this very machine related? > Btw: i'm running Apache 2.0.48 on windows xp. ... > > And this is how i call my mapserver > > /cgi-bin/mapserv.exe?map=C:/Program Files/Apache > Group/Apache2/htdocs/herten/herten.map&mode=map Wouter, You didn't mention what commandline you use with shp2img. I see your layer STATUS is set to ON. This really just means "potentially available", and it has to be turned on by an appropriate (hidden) form variable in the mapserv.exe context I believe. Try setting the STATUS to DEFAULT. If that works, then you need to read up on how layers are enabled and disabled in mapserver. If that doesn't help then the issue is something else... Good luck, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From morten at UNTAMO.NET Mon Apr 11 13:29:21 2005 From: morten at UNTAMO.NET (Morten Hulden) Date: Mon, 11 Apr 2005 22:29:21 +0200 Subject: problem with gd In-Reply-To: <1113246615.24583.6.camel@landslide.deprem.gov.tr> Message-ID: orkun wrote: > during compilation I receive this message: > `mapsymbol.c:269: error: structure has no member named `gd_free'` This is exactly what happens when you try to compile mapserver against a PHP that uses the bundled GD library (discussed in another thread here), because in the bundled GD the function is nowadays called php_gd_free. Only solution sofar is to recompile PHP from sources and have it use an external GD library. (Probably a good thing to do anyway because mapserver and PHP should use the same version of GD) From woodbri at SWOODBRIDGE.COM Mon Apr 11 13:30:16 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Mon, 11 Apr 2005 16:30:16 -0400 Subject: Difference shp2img <-> mapserv.exe In-Reply-To: <931f8ea905041113164e1cd2a0@mail.gmail.com> Message-ID: Wouter, You can also try layers=all on your URL, if you have a fairly resent version it has the same effect as forcing all your layers on. It's behavior is similar to shp2img -Steve W. Frank Warmerdam wrote: > On Apr 11, 2005 3:45 PM, Wouter Schaubroeck > wrote: > >>Hi all, >> >>I have this problem: with shp2img, my mapfile, and the corresponding >>image shows up, but with mapserv.exe it doesn't. Actually, it does, but >>it is blank. >>I've checked both with dependency walker, but there were no problems. Is >>there a solution for my problem, or is this very machine related? >>Btw: i'm running Apache 2.0.48 on windows xp. > > ... > >>And this is how i call my mapserver >> >>/cgi-bin/mapserv.exe?map=C:/Program Files/Apache >>Group/Apache2/htdocs/herten/herten.map&mode=map > > > Wouter, > > You didn't mention what commandline you use with shp2img. > I see your layer STATUS is set to ON. This really just means > "potentially available", and it has to be turned on by an appropriate > (hidden) form variable in the mapserv.exe context I believe. Try > setting the STATUS to DEFAULT. If that works, then you need to > read up on how layers are enabled and disabled in mapserver. > > If that doesn't help then the issue is something else... > > Good luck, > -- > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent > From dldeskins at GMAIL.COM Mon Apr 11 13:38:19 2005 From: dldeskins at GMAIL.COM (Don Deskins) Date: Mon, 11 Apr 2005 16:38:19 -0400 Subject: shp2tile question In-Reply-To: Message-ID: Bart and Steve, My shapefiles are showing up now... thanks! Now I have a time problem... It seems to take more time to generate the image than it did before. I am checking for errors now. Thanks again. Don On Apr 11, 2005 3:28 PM, Bart van den Eijnden wrote: > Hi Don, > > check the dbf of your generated tileindex (the LOCATION field). I usually > use absolute paths in there. Are there absolute or relative paths to the > files in there? > > Also use TYPE POLYGON. Are you zoomed in enough to have your layer showing > up, since you are using a MAXSCALE setting? > > Best regards, > Bart > > On Mon, 11 Apr 2005 15:24:45 -0400, Don Deskins > wrote: > > > Bart (and Steve), > > > > Thanks. > > > > I have my files created and tried to reference this index in my map file: > > > > #################################### > > # parcels > > LAYER > > NAME 'tileindex' > > TYPE TILEINDEX > > DATA '/path/to/tileindex' > > MAXSCALE 40000 > > END > > > > LAYER > > NAME 'SCAP_Cert2004_ParcelsUTM16M' > > STATUS ON > > TYPE POLYGON > > TILEINDEX '/path/to/tileindex' > > #TILEITEM 'LOCATION' > > MAXSCALE 40000 > > END > > #################################### > > > > I get no error but my shapes are not showing up... do you see a > > problem with the above map? > > > > Don > > > > On Apr 11, 2005 2:58 PM, Bart van den Eijnden wrote: > >> Hi, > >> > >> It is tile4ms, not tile2ms, probably a typo by Steve. > >> > >> It is a Mapserver utility to make a tileindex. Alternatively, you can > >> also > >> use ogrtindex for vector layers and gdaltindex for raster layers. > >> > >> Best regards, > >> Bart > >> > > > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > -- Don Deskins From woodbri at SWOODBRIDGE.COM Mon Apr 11 14:01:09 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Mon, 11 Apr 2005 17:01:09 -0400 Subject: shp2tile question In-Reply-To: <484a8ade0504111338155f2d9f@mail.gmail.com> Message-ID: Don, Like I said there is no magic number. If you are most showing all your parcels most of the time then there is not value in having it tiled. One of the MOST important performance issues is to make sure all your *.shp files have a *.qix file. Try a different set of tiling parameters and test it again. Did you have *.qix on you original shapefile? If not go back to that and add one (shptree file.shp) and see how it performs untiled. -Steve Don Deskins wrote: > Bart and Steve, > > My shapefiles are showing up now... thanks! > > Now I have a time problem... It seems to take more time to generate > the image than it did before. I am checking for errors now. > > Thanks again. > > Don > > > On Apr 11, 2005 3:28 PM, Bart van den Eijnden wrote: > >>Hi Don, >> >>check the dbf of your generated tileindex (the LOCATION field). I usually >>use absolute paths in there. Are there absolute or relative paths to the >>files in there? >> >>Also use TYPE POLYGON. Are you zoomed in enough to have your layer showing >>up, since you are using a MAXSCALE setting? >> >>Best regards, >>Bart >> >>On Mon, 11 Apr 2005 15:24:45 -0400, Don Deskins >>wrote: >> >> >>>Bart (and Steve), >>> >>>Thanks. >>> >>>I have my files created and tried to reference this index in my map file: >>> >>> #################################### >>> # parcels >>> LAYER >>> NAME 'tileindex' >>> TYPE TILEINDEX >>> DATA '/path/to/tileindex' >>> MAXSCALE 40000 >>> END >>> >>> LAYER >>> NAME 'SCAP_Cert2004_ParcelsUTM16M' >>> STATUS ON >>> TYPE POLYGON >>> TILEINDEX '/path/to/tileindex' >>> #TILEITEM 'LOCATION' >>> MAXSCALE 40000 >>> END >>> #################################### >>> >>>I get no error but my shapes are not showing up... do you see a >>>problem with the above map? >>> >>>Don >>> >>>On Apr 11, 2005 2:58 PM, Bart van den Eijnden wrote: >>> >>>>Hi, >>>> >>>>It is tile4ms, not tile2ms, probably a typo by Steve. >>>> >>>>It is a Mapserver utility to make a tileindex. Alternatively, you can >>>>also >>>>use ogrtindex for vector layers and gdaltindex for raster layers. >>>> >>>>Best regards, >>>>Bart >>>> >>> >>-- >>Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ >> > > > > -- > Don Deskins > From ajacosta at ALTAMIRATECH.COM Mon Apr 11 14:04:26 2005 From: ajacosta at ALTAMIRATECH.COM (Alan Jairo Acosta) Date: Mon, 11 Apr 2005 16:04:26 -0500 Subject: Rare scalebar problem (14Km turn into 0.1m). Message-ID: Hello everybody. I have a map, and the map's units are in DD (decimal degrees Lat/Long) and scalebar is in meters, now my problem is that scalebar is wrong because 14km turn into 0.1 meters in scalebar, the extent is good, i think, couse i can make zoom and other things, just the scalebar is wrong, Do I need to make some type of projection, please, any help is thankfully, and again, sorry by my bad english. -- Alan Jairo Acosta Res?ndiz MapReport:Geoweb PocketVision:Altamira Work office Number : 690 77 53 ext 12 Cell Phone : 300 612 6697 ajacosta at altamiratech.com From rpowers at NEOMATIX.CA Mon Apr 11 14:16:31 2005 From: rpowers at NEOMATIX.CA (Rick Powers) Date: Mon, 11 Apr 2005 16:16:31 -0500 Subject: Projections with Different Units Message-ID: I'm trying to display layers with different projections and units. There was another good post on multiple UTM projections that I will use. But an example of my case is State Boundaries (LatLong-Decimal Degrees) and Terra Server WMS DOQs (UTMs-Meters). I can make both work independently, but each wants the shared map object to provide appropriate units. Any suggestions? NAME MULTI STATUS ON SIZE 400 300 SYMBOLSET symbols/symbol.sym #EXTENT -126 24 -64 50 #UNITS DD EXTENT 189600 1976600 818200 5478800 UNITS METERS SHAPEPATH "data" IMAGETYPE JPEG IMAGECOLOR 255 255 204 FONTSET etc/fonts.txt LAYER NAME STATES METADATA WMS_TITLE "Cartgographic Boundaries of United States States" WMS_ABSTRACT "US Census" WMS_SRS "EPSG:4326" "RESULT_FIELDS" "NAME st99_d00" END GROUP Admin STATUS ON DATA cont_states TYPE POLYGON TRANSPARENCY 60 CLASS # COLOR 31 62 21 OUTLINECOLOR 31 62 21 TEMPLATE "ttt_query.html" END PROJECTION "init=epsg:4326" END END LAYER NAME ORTHOS GROUP DOQ STATUS ON TYPE RASTER MINSCALE 10000 MAXSCALE 264000 CONNECTIONTYPE WMS CONNECTION "http://terraservice.net/ogcmap.ashx?" METADATA "wms_srs" "EPSG:26910" "wms_title" "Orthophoto" "wms_name" "DOQ" "wms_server_version" "1.1.1" "wms_format" "image/png" "wms_layers" "doq" "wms_group_title" "background" END PROJECTION "init=epsg:26910" END END From gmanepal at GMAIL.COM Mon Apr 11 16:05:36 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Mon, 11 Apr 2005 19:05:36 -0400 Subject: PHP MapScript zoompoint In-Reply-To: <42538964.4070104@maxnet.co.nz> Message-ID: This helped me a lot. Thanks! On Apr 6, 2005 3:01 AM, Matthew Whiting wrote: > After hours working on this, I finally found the problem. > > Setting x and y for the PointObj like this: > $point->x = $x; > $point->y = $y; > does not work. > > This does: > $point->setxy($x,$y); > > Why is this a problem? > > Interestingly after setting the points explicitly (as opposed to setxy()) > and then printing the contents, it seems the values are actually set! > > Matthew > Hello all, > > Have been trying without success to successfully implement a zoom out > feature in my application using the zoompoint() function and -2 as the zoom > factor. For some reason, the image does not end up centred on the point > clicked on but on a different spot altogether. I'm getting nowhere with > this. I tried manually changing the extent and this works fine. Any > suggestions? > > Thanks > Matthew > > > > From ed at TOPOZONE.COM Mon Apr 11 16:21:10 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Mon, 11 Apr 2005 19:21:10 -0400 Subject: Projections with Different Units Message-ID: Rick - You have three different entities in play here - the STATES input layer, the ORTHOS input layer, and the output map image itself. If you leave out all PROJECTION blocks, then all entities are presumed to have the same projection. If you only specify a PROJECTION for the output map, then all layers are presumed to use that same projection. If you specify two layers with different projections, then you also need to specify the PROJECTION you want for the output map image. That projection can be the same as either of the two input layers, or a different projection entirely. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Rick Powers Sent: Monday, April 11, 2005 5:17 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] Projections with Different Units I'm trying to display layers with different projections and units. There was another good post on multiple UTM projections that I will use. But an example of my case is State Boundaries (LatLong-Decimal Degrees) and Terra Server WMS DOQs (UTMs-Meters). I can make both work independently, but each wants the shared map object to provide appropriate units. Any suggestions? NAME MULTI STATUS ON SIZE 400 300 SYMBOLSET symbols/symbol.sym #EXTENT -126 24 -64 50 #UNITS DD EXTENT 189600 1976600 818200 5478800 UNITS METERS SHAPEPATH "data" IMAGETYPE JPEG IMAGECOLOR 255 255 204 FONTSET etc/fonts.txt LAYER NAME STATES METADATA WMS_TITLE "Cartgographic Boundaries of United States States" WMS_ABSTRACT "US Census" WMS_SRS "EPSG:4326" "RESULT_FIELDS" "NAME st99_d00" END GROUP Admin STATUS ON DATA cont_states TYPE POLYGON TRANSPARENCY 60 CLASS # COLOR 31 62 21 OUTLINECOLOR 31 62 21 TEMPLATE "ttt_query.html" END PROJECTION "init=epsg:4326" END END LAYER NAME ORTHOS GROUP DOQ STATUS ON TYPE RASTER MINSCALE 10000 MAXSCALE 264000 CONNECTIONTYPE WMS CONNECTION "http://terraservice.net/ogcmap.ashx?" METADATA "wms_srs" "EPSG:26910" "wms_title" "Orthophoto" "wms_name" "DOQ" "wms_server_version" "1.1.1" "wms_format" "image/png" "wms_layers" "doq" "wms_group_title" "background" END PROJECTION "init=epsg:26910" END END From ed at TOPOZONE.COM Mon Apr 11 16:23:13 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Mon, 11 Apr 2005 19:23:13 -0400 Subject: I can't see my maps Message-ID: Chloe - Please always reply to the entire list, not just to one person. The first person to answer might not have all the answers, and they might not have time to take on all your follow-up questions personally . As I said earlier, look at the generated HTML you're viewing. What is the URL in the tag where the map is supposed to be? Does it look like you expect? If not, change the IMAGEURL to fix it. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: ChloeJackson [mailto:chloejackson at totalise.co.uk] Sent: Monday, April 11, 2005 6:18 PM To: Ed McNierney Subject: Re: [UMN_MAPSERVER-USERS] I can't see my maps Hi Ed, I get a grey screen which changes to a paler grey if I click in the map window. However, if I click in the map window, i get a message that 'c is not a registered protocol'. There is also a message saying 'This is the Map'. I seem to be happily creating .png files in each time I refresh the page, but still can't see the map. Can I just check with you what the IMAGEURL should point to? I have currently have it pointing to the workshop directory. CJ Ed McNierney wrote: >CJ - > >>From your description, you are likely getting a "broken link" to the >image, rather than a blank image. Is that correct? It's an important >distinction. > >Look at the generated HTML source and check the URL of the map image. >The IMAGEURL string in your map file is used to generate this URL. If >the URL in the HTML output does not point to your generated map image, >modify the IMAGEURL (or configure your Web server's settings) so the >URL points to the image. > > - Ed > >Ed McNierney >President and Chief Mapmaker >TopoZone.com / Maps a la carte, Inc. >73 Princeton Street, Suite 305 >North Chelmsford, MA 01863 >Phone: +1 (978) 251-4242 >Fax: +1 (978) 251-1396 >ed at topozone.com > >-----Original Message----- >From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] >On Behalf Of CJ >Sent: Sunday, April 10, 2005 4:19 PM >To: MAPSERVER-USERS at LISTS.UMN.EDU >Subject: [UMN_MAPSERVER-USERS] I can't see my maps > >Can anyone help me? I have Apache, PHP, MySQL setup on my local server >and have been trying to add in MapServer. I have installed and >configured all the elements and have been working with the Itasca demo >workshop. > >So far I can get the webpage working but there is no map in the map >frame. >The map is there and the Index.html points to its directory, so why >can't it find the map? > >I'd appreciate any help with this. I'm a total newbie to MapServer, >etc. > > > > From stigmata_blackangel at YAHOO.COM Mon Apr 11 16:24:13 2005 From: stigmata_blackangel at YAHOO.COM (Gregor Mosheh) Date: Mon, 11 Apr 2005 16:24:13 -0700 Subject: maps.google.com - Speed In-Reply-To: 6667 Message-ID: --- "Shanton, James A" wrote: > Is there anyway to speed this system up like > maps.google.com ? I'm having > speed issues displaying my database layers. I presume you mean PostGIS tables. For starters, make sure you have the appropriate indexes created on your PostGIS table. There are basicallly three indexes to consider: - an index on the oid column. this is used internally by MapServer and PostGIS and makes a HUGE difference. - a GIST index on the geometry column (probably called the_geom) is obviously useful, and makes a huge difference. - if your layer uses a FILTER to select only certain records, make sure those columns have indexes I hope that helps. __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From aryan at CO.LINN.OR.US Mon Apr 11 16:44:20 2005 From: aryan at CO.LINN.OR.US (Adam Ryan) Date: Mon, 11 Apr 2005 18:44:20 -0500 Subject: SWIG mapscript removeLayer() comment Message-ID: Woe is the SWIG mapscript user who really wants to help in the development of mapserver but works in a Windows shop and could never figure out how to compile Mapserver and even if he (or she) could they don't know c so combing through the mapserver c files for their particular solution is pointless, though nonetheless attempted. I defer: Doing mapObj.removeLayer() on a layer with a resultCache fouls up other resultCache objects of layers with higher index values. If layer to be removed is turned off instead, no errors ensue. So I found a work around for myself and thought I'd share it. Cheers, Adam From chloejackson at TOTALISE.CO.UK Mon Apr 11 23:12:15 2005 From: chloejackson at TOTALISE.CO.UK (Chloe Jackson) Date: Tue, 12 Apr 2005 07:12:15 +0100 Subject: I can't see my maps Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From nuri at NUSVIRTUAL.COM Tue Apr 12 02:55:15 2005 From: nuri at NUSVIRTUAL.COM (Nuri) Date: Tue, 12 Apr 2005 04:55:15 -0500 Subject: Missing files or directories Message-ID: Hi, I'm begin to use Mapserver. It is running under Windows XP with IIS. I completed install Mapserver and it runs. I have several examples of how to use it, but they haven't got all sources to execute in my PC. I'm trying to run in my PC the example that appears in: http://terrasip.gis.umn.edu/projects/tutorial/example1-1.html I have the shapes and databases used in it, but when I run the map writing in browser URL: http://nuri/cgi-bin/mapserv.exe? map=d:/webserver/mapserver2/mapa01.map&mode=map it appears the following error: msProcessProjection(): Projection library error. No such file or directory Someone could explain me which file or directory is it looking for? The map file I'm using is a simple one: MAP IMAGETYPE PNG EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514 SIZE 400 300 SHAPEPATH "data" IMAGECOLOR 255 255 255 PROJECTION "proj=laea" "ellps=clrk66" "lat_0=45" "lon_0=-100" # # Alternatively, you can specify an EPSG code. # "init=epsg:2163" # END # Start of LAYER DEFINITIONS -------------------------------------------- - LAYER # States polygon layer begins here NAME states DATA states_ugl STATUS DEFAULT TYPE POLYGON PROJECTION "init=epsg:4269" END CLASS COLOR 232 232 232 OUTLINECOLOR 32 32 32 END END # States polygon layer ends here # End of LAYER DEFINITIONS ------------------------------- END # end of map file/object Thank you From BEN at SYNCERA-ITSOLUTIONS.NL Tue Apr 12 03:08:50 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Tue, 12 Apr 2005 12:08:50 +0200 Subject: Missing files or directories Message-ID: Hi, this indicates Mapserver needs PROJ and it tries to locatie it default at c:\proj If you want another directory you can specify an environment called variable PROJ_LIB with the respective path as value. Download PROJ files from: http://dl2.maptools.org/dl/proj/proj446_win32_bin.zip and for the EPSG codes (put the epsg file in c:\proj\): http://dl2.maptools.org/dl/proj4-epsg-with-42xxx-and-esri.zip Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Nuri 04/12/05 11:55am >>> Hi, I'm begin to use Mapserver. It is running under Windows XP with IIS. I completed install Mapserver and it runs. I have several examples of how to use it, but they haven't got all sources to execute in my PC. I'm trying to run in my PC the example that appears in: http://terrasip.gis.umn.edu/projects/tutorial/example1-1.html I have the shapes and databases used in it, but when I run the map writing in browser URL: http://nuri/cgi-bin/mapserv.exe? map=d:/webserver/mapserver2/mapa01.map&mode=map it appears the following error: msProcessProjection(): Projection library error. No such file or directory Someone could explain me which file or directory is it looking for? The map file I'm using is a simple one: MAP IMAGETYPE PNG EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514 SIZE 400 300 SHAPEPATH "data" IMAGECOLOR 255 255 255 PROJECTION "proj=laea" "ellps=clrk66" "lat_0=45" "lon_0=-100" # # Alternatively, you can specify an EPSG code. # "init=epsg:2163" # END # Start of LAYER DEFINITIONS -------------------------------------------- - LAYER # States polygon layer begins here NAME states DATA states_ugl STATUS DEFAULT TYPE POLYGON PROJECTION "init=epsg:4269" END CLASS COLOR 232 232 232 OUTLINECOLOR 32 32 32 END END # States polygon layer ends here # End of LAYER DEFINITIONS ------------------------------- END # end of map file/object Thank you From lfilak at MEDINACO.ORG Tue Apr 12 05:11:33 2005 From: lfilak at MEDINACO.ORG (Lowell Filak) Date: Tue, 12 Apr 2005 08:11:33 -0400 Subject: SWIG mapscript removeLayer() comment Message-ID: The following message was sent by Adam Ryan on Mon, 11 Apr 2005 18:44:20 -0500. > Woe is the SWIG mapscript user who really wants to help in the development > of mapserver but works in a Windows shop and could never figure out how to > compile Mapserver and even if he (or she) could they don't know c so > combing through the mapserver c files for their particular solution is > pointless, though nonetheless attempted. I defer: > > Doing mapObj.removeLayer() on a layer with a resultCache fouls up other > resultCache objects of layers with higher index values. If layer to be > removed is turned off instead, no errors ensue. > > So I found a work around for myself and thought I'd share it. > > Cheers, > Adam Thanks for the info. Lowell From James.Shanton2 at NSCORP.COM Tue Apr 12 05:21:28 2005 From: James.Shanton2 at NSCORP.COM (Shanton, James A) Date: Tue, 12 Apr 2005 08:21:28 -0400 Subject: maps.google.com - Speed Message-ID: We're using a SQL Server DB, and OGR to access the coordinates to plot our items. Listed below is the info out of the connection file. Is this similar / comparable in speed to a PostGIS database ? Are there any ways I can speed this up ? We have indexes on the activity, ag_latitude, and ag_longitude columns. I'm also displaying the activity on the map with different colors, by using classitem "atvstatus" listed in the mapfile section below. Thanks ! Jim -------------------------------------- ovf File (Db Connection) -------- ODBC:myuid/mypwd at mydevDB idsites select activity,rspprty,atvtype,customer,agreement,atvstatus,milepost,ag_latitude as y,ag_longitude as x,image_file from re_activity_coordinates where atvType not like '%signboard%' wkbPoint WGS84 -------------------------------------------- Map File Section Below ------ LAYER NAME "acts" TYPE POINT CONNECTIONTYPE OGR CONNECTION "ogrActs.ovf" # the name and path to the virtual.ovf file, relative to shapepath may work? DATA "actsogrl" # the name of the OGRVrtLayer STATUS OFF SYMBOLSCALE 50000 DUMP TRUE TOLERANCE 30 LABELITEM activity #may need to use table.name or just name depending on your OVF file. CLASSITEM "atvstatus" # value to be compared to EXPRESSION CLASS #activities NAME "Completed Activities" # will show up in index this way EXPRESSION 'Completed' # String to compare to Attribute column SYMBOL 'circle' SIZE 7 MINSIZE 2 MAXSIZE 20 COLOR 255 0 0 OVERLAYSYMBOL 'circle' OVERLAYSIZE 1 OVERLAYCOLOR 255 0 0 LABEL type truetype FONT ARIAL-BOLD maxsize 10 minsize 6 COLOR 0 0 0 OUTLINECOLOR 255 255 255 END # end label END CLASS #Active activities -- Lime Green NAME "Active Activities" # will show up in index this way EXPRESSION 'Active' # String to compare to Attribute column SYMBOL 'circle' SIZE 7 MINSIZE 2 MAXSIZE 20 COLOR 0 255 0 OVERLAYSYMBOL 'circle' OVERLAYSIZE 1 OVERLAYCOLOR 0 255 0 LABEL type truetype FONT ARIAL-BOLD maxsize 10 minsize 6 COLOR 0 0 0 OUTLINECOLOR 255 255 255 END # end label END CLASS #Canceled activities -- BLack NAME "Canceled Activities" # will show up in index this way EXPRESSION 'Active' # String to compare to Attribute column SYMBOL 'circle' SIZE 7 MINSIZE 2 MAXSIZE 20 COLOR 0 0 0 OVERLAYSYMBOL 'circle' OVERLAYSIZE 1 OVERLAYCOLOR 0 0 0 LABEL type truetype FONT ARIAL-BOLD maxsize 10 minsize 6 COLOR 0 0 0 OUTLINECOLOR 255 255 255 END # end label END CLASS #Other activities - Blue NAME "Other Activities" # will show up in index this way EXPRESSION 'Other' # String to compare to Attribute column SYMBOL 'circle' SIZE 7 MINSIZE 2 MAXSIZE 20 COLOR 0 0 255 OVERLAYSYMBOL 'circle' OVERLAYSIZE 1 OVERLAYCOLOR 0 0 255 LABEL type truetype FONT ARIAL-BOLD maxsize 10 minsize 6 COLOR 0 0 0 OUTLINECOLOR 255 255 255 END # end label END END -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Gregor Mosheh Sent: Monday, April 11, 2005 7:24 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] maps.google.com - Speed --- "Shanton, James A" wrote: > Is there anyway to speed this system up like > maps.google.com ? I'm having > speed issues displaying my database layers. I presume you mean PostGIS tables. For starters, make sure you have the appropriate indexes created on your PostGIS table. There are basicallly three indexes to consider: - an index on the oid column. this is used internally by MapServer and PostGIS and makes a HUGE difference. - a GIST index on the geometry column (probably called the_geom) is obviously useful, and makes a huge difference. - if your layer uses a FILTER to select only certain records, make sure those columns have indexes I hope that helps. __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From m.marsella at ITWORKS.IT Tue Apr 12 06:08:23 2005 From: m.marsella at ITWORKS.IT (Marco Marsella) Date: Tue, 12 Apr 2005 15:08:23 +0200 Subject: Problem with MODIS images Message-ID: Hi list, I am having problems with some MODIS images. They show as skewed white squares on black background. I attach a small screen capture GIF. Mapserver is 4.4.1, gdalinfo --formats reports Supported Formats: VRT (rw+): Virtual Raster GTiff (rw+): GeoTIFF NITF (rw+): National Imagery Transmission Format HFA (rw+): Erdas Imagine Images (.img) SAR_CEOS (ro): CEOS SAR Image CEOS (ro): CEOS Image ELAS (rw+): ELAS AIG (ro): Arc/Info Binary Grid AAIGrid (rw): Arc/Info ASCII Grid SDTS (ro): SDTS Raster OGDI (ro): OGDI Bridge DTED (rw): DTED Elevation Raster PNG (rw): Portable Network Graphics JPEG (rw): JPEG JFIF MEM (rw+): In Memory Raster JDEM (ro): Japanese DEM (.mem) GIF (rw): Graphics Interchange Format (.gif) ESAT (ro): Envisat Image Format BSB (ro): Maptech BSB Nautical Charts XPM (rw): X11 PixMap Format BMP (rw+): MS Windows Device Independent Bitmap AirSAR (ro): AirSAR Polarimetric Image RS2 (ro): RadarSat 2 XML Product PCIDSK (rw+): PCIDSK Database File ILWIS (rw+): ILWIS Raster Map GMT (rw): GMT NetCDF Grid Format netCDF (ro): network Common Data Format HDF4 (ro): Hierarchical Data Format Release 4 HDF4Image (rw+): HDF4 Dataset PNM (rw+): Portable Pixmap Format (netpbm) DOQ1 (ro): USGS DOQ (Old Style) DOQ2 (ro): USGS DOQ (New Style) ENVI (rw+): ENVI .hdr Labelled EHdr (rw+): ESRI .hdr Labelled PAux (rw+): PCI .aux Labelled MFF (rw+): Atlantis MFF Raster MFF2 (rw+): Atlantis MFF2 (HKV) Raster FujiBAS (ro): Fuji BAS Scanner Image GSC (ro): GSC Geogrid FAST (ro): EOSAT FAST Format BT (rw+): VTP .bt (Binary Terrain) 1.3 Format LAN (ro): Erdas .LAN/.GIS CPG (ro): Convair PolGASP IDA (rw+): Image Data and Analysis NDF (ro): NLAPS Data Format JPEG2000 (rw): JPEG-2000 part 1 (ISO/IEC 15444-1) L1B (ro): NOAA Polar Orbiter Level 1b Data Set FIT (rw): FIT Image MrSID (ro): Multi-resolution Seamless Image Database (MrSID) USGSDEM (rw): USGS Optional ASCII DEM (and CDED) GXF (ro): GeoSoft Grid Exchange Format and gdalinfo on the image file reports Driver: GTiff/GeoTIFF Size is 12205, 10098 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.2572235630016, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]] Origin = (100.529340,-1.327067) Pixel Size = (0.00208000,-0.00208000) Metadata: TIFFTAG_SOFTWARE=MRTSwath Corner Coordinates: Upper Left ( 100.5293404, -1.3270670) Lower Left ( 100.5293404, -22.3309070) Upper Right ( 125.9157405, -1.3270670) Lower Right ( 125.9157405, -22.3309070) Center ( 113.2225405, -11.8289870) Band 1 Block=12205x1 Type=UInt16, ColorInterp=Gray Any suggestion, please ? TIA Marco -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedGraphic2.tiff Type: image/tiff Size: 7270 bytes Desc: not available URL: -------------- next part -------------- From fwarmerdam at GMAIL.COM Tue Apr 12 06:27:49 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Tue, 12 Apr 2005 09:27:49 -0400 Subject: Problem with MODIS images In-Reply-To: <916f31e78caa77f7be9ffcdd0fa7019b@itworks.it> Message-ID: On Apr 12, 2005 9:08 AM, Marco Marsella wrote: > Hi list, > > I am having problems with some MODIS images. They show as skewed white > squares on black background. I attach a small screen capture GIF. > Mapserver is 4.4.1, gdalinfo --formats reports Marco, You neglected to explain what you consider to be the problem. Is it the black edging that you want to get rid of? Or is the problem that the image area is saturated to white? Your MODIS image data is 16 bit. By default MapServer just reads the data into an 8bit buffer, converting all values over 255 to 255, and all values below 0 to 0. I imagine you will want to scale the values. If you read the RASTER HOWTO I think you will find that scaling is covered there. The quick approach is to add the following to your raster layer. PROCESSING "SCALE=AUTO" Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From fwarmerdam at GMAIL.COM Tue Apr 12 06:40:05 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Tue, 12 Apr 2005 09:40:05 -0400 Subject: maps.google.com - Speed In-Reply-To: Message-ID: On Apr 12, 2005 8:21 AM, Shanton, James A wrote: > We're using a SQL Server DB, and OGR to access the coordinates to plot our > items. Listed below is the info out of the connection file. Is this > similar / comparable in speed to a PostGIS database ? > > Are there any ways I can speed this up ? We have indexes on the activity, > ag_latitude, and ag_longitude columns. > > I'm also displaying the activity on the map with different colors, by using > classitem "atvstatus" listed in the mapfile section below. Jim, When accessing ODBC tables through VRT there is no attempt made to do spatial queries in a smart way. What happens is that all records in the ODBC tables are read, converted into features via the VRT file, and then those outside the spatial rectangle are discarded before returning the remaining features to MapServer. This is suitable for modest numbers of features, but does not scale to large number of features as you may be noteing. In particular it is not at all equivelent to using a spatial indexed RDBMS such as PostGIS or Oracle (with a spatial table). In theory I could modify the VRT driver in OGR to use a query restricting the X and Y columns based on the spatial query in a case like this, but these dual-constraint ranged based queries are often not all that efficiently handled by RDBMSes even with the columns indexed. However, if squeezing additional performance out of your current configuration is quite important to you we could talk about me adding such a features on contract. I would be willing to add such an optimization for $800 USD. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From dmorissette at DMSOLUTIONS.CA Tue Apr 12 08:04:48 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Tue, 12 Apr 2005 11:04:48 -0400 Subject: MapServer 4.4.2 released Message-ID: MapServer 4.4.2 has just been released. This new release addresses a few issues that were found since version 4.4.1 and contains no new functionality. The list of fixes is included at the end of this message. The source package is available in the MapServer downloads page: http://mapserver.gis.umn.edu/dload.html and Windows binaries should be available shortly at the usual locations, see: http://mapserver.gis.umn.edu/win32binaries.html Regards, Daniel ------------------------------------------------------------ Daniel Morissette dmorissette at dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ Version 4.4.2 (2005-04-11) -------------------------- - mapogr.c: Insure that tile index reading is restarted in msOGRLayerInitItemInfo() or else fastcgi repeat requests for a layer may fail on subsequent renders. - Construct proper polygon spatial filters. Otherwise no features will be returned by OGR for GEOS enabled builds of OGR. - Bug 1304: Avoid putting newlines and extra blanks or tabs in text in mapgml.c. - Fixed problem with map image filenames not always unique in MapScript's processTemplate() methods, causing random map image collisions (bug 1299) - Bug 1231: use mimetype "image/png; mode=24bits" for 24bit png format. This makes it seperately selectable by WMS. - Bug 1273: Fixed case in msProjectPoint() were in or out are NULL and a failure occurs to return NULL. Fixed problem of WMS capabilities with 'inf' in it. - Fixed crash in template generation with empty layer names (bug 1271) - SLD generation bug 1150 : replacing tag to - Change the output of the expression when using a wild card for PropertyIsLike (Bug 1107). - Fixed opening raster layer bug, 1118, in msOWSGetLayerExtent() (mapows.c). - Fixed ogcfilter bug #1252 - Fixed configure's --enable-runpath switch (bug 1233) - Fixed configure error message when APACHE_VERSION is not set. - Bug 1168: Better autoscaling for classifying non-integer rasters. - Fixed bug writing RGB/RGBA images via GDAL output on bigendian systems. - Bug 1152 : Fix WMS style capabilities output for FastCGI enabled builds. - Bug 1143 : Missing call to msInitShape. - Correct bug 1151 : generates twice a tag when generating an SLD. This was happening the style did not have a size set. - Bug 1257: Use gdFree() instead of free in PHP MapScript's saveImage() From gerard_b_18 at HOTMAIL.COM Tue Apr 12 07:14:38 2005 From: gerard_b_18 at HOTMAIL.COM (Gerard B) Date: Tue, 12 Apr 2005 09:14:38 -0500 Subject: line symbol with endpoints Message-ID: Hi list, I am trying to configure my map data to follow a certain symbology, and there are some symbol definitions that call for line symbols that I cannot seem to duplicate. First, there is a symbol for a bridge, which should be a black solid line, and each end should end with a tick. So it should look something like this: >-----------------------------------------< It isn't a point, but a line. So no matter how long the line is, I want the endpoints to have a tick, and the rest of the line to be simple black solid line. Does anyone have any advice on how I can do this?? I have similar symbols, such as a line with circle endpoints: 0---------------------------------0 Any advice would be much appreciated!!!! Thanks in advance, Gerard B From caveeagle at POCHTAMT.RU Tue Apr 12 07:23:15 2005 From: caveeagle at POCHTAMT.RU (Cave) Date: Tue, 12 Apr 2005 18:23:15 +0400 Subject: Perl API method setProjection doesn't work. Message-ID: subject: Perl API method setProjection doesn't work. Sorry, I have some problems with perl library for map-script. Here if I use any projection except "lonlat", the output file contains an empty image. If this projection is set in a cgi-script, everything is displayed correctly. If I comment this string: $map->setProjection('proj=eqc,lat_ts=50,lon_0=80') The graphic file appears again, but in the standard lonlat projection. In fact, my problem is that I need to set the projection in perl, instead of map-file. ############################################################### Example of perl script: #!/usr/local/bin/perl -w use mapscript; $ENV{MS_ERRORFILE} = "mapError.log"; ### mapscript error log my $mapname = "/www/allsatwms/allsat.map"; # map-file name my $map = new mapscript::mapObj($mapname); if(!$map){warn "New mapObj() error: $mapscript::ms_error->{message}\n";} $map->{extent}->{minx} = 50; $map->{extent}->{maxx} = 100; $map->{extent}->{miny} = 30; $map->{extent}->{maxy} = 70; $map->{width} = 1280; $map->{height} = 1024; $map->setProjection('proj=eqc,lat_ts=50,lon_0=80'); my $img = $map->prepareImage(); if(!$img){warn "prepareImage() error: $mapscript::ms_error->{message}\n"; } my $layerAdmin = $map->getLayerByName('admlin'); $layerObj->{status} = $mapscript::MS_ON; $layerAdmin->draw($map, $img); $img->save("maptest.gif"); ################################################################ Example of map-file: MAP NAME AllSat EXTENT -180 -90 180 90 SIZE 800 400 UNITS meters IMAGETYPE gif TRANSPARENT ON SHAPEPATH "/www/allsatwms/data" FONTSET "/www/allsatwms/fonts/fonts.list" LAYER NAME "admlin" GROUP "Admlin" PROJECTION "proj=longlat" END DATA admlin STATUS ON TYPE LINE CLASS NAME "admlin" COLOR 161 33 33 END END END ############################################################### My system is: FreeBSD 5.3-RELEASE Install swig-1.3.21_1 and perl-5.8.5 Hope for Your help. Best regards, Efremov Victor, Space Monitoring Information Support laboratory IKI RAN, Moscow, Russia. mailto:caveeagle at pochtamt.ru From akrherz at IASTATE.EDU Tue Apr 12 07:35:10 2005 From: akrherz at IASTATE.EDU (Daryl Herzmann) Date: Tue, 12 Apr 2005 09:35:10 -0500 Subject: Hi In-Reply-To: <9dea3a27050412071661acf356@mail.gmail.com> Message-ID: Shailesh, Please always cc the list back and don't top post :) On Tue, 12 Apr 2005, Shailesh Chiplunkar wrote: > Hi, Actually I have a project assigned to me which requires the use of > mapserver!! So I am currently looking for some way to get to know how to > start using it and from where to do so?? I thought may be downloading > the available version of mapserver cld help me figure out some > way......but it dint?? So wat do u suggest i do? I need to get started > as soon as possible!! What did you expect to happen when you downloaded mapserver? The website contains a bunch of useful resources to help with your new adventure with Mapserver. Have you gone through the docs page? http://mapserver.gis.umn.edu/doc.html The Support section contains a link to the WIKI, which has lots of information about installing and symbols and much more. http://mapserver.gis.umn.edu/cgi-bin/wiki.pl If you have further questions, please email the list.. but try to be more specific with what questions you have. Good luck, daryl > > Cheers, > Shailesh > > On Apr 12, 2005 1:36 AM, Daryl Herzmann wrote: >> Greetings, >> >> On Mon, 11 Apr 2005, Shailesh Chiplunkar wrote: >> >>> Hi, >>> I've downloaded the Mapserver version 4.4.1 from the site.......just >>> wanted to know wat to do next!!! >>> Actually I am clueless as to what I'm supposed to do next!!! >>> Please help me out! >> >> Perhaps we should back up some, what prompted you to download it in the >> first place? What do you want to do? >> >> daryl From trondmm-mapserver at CRUSADERS.NO Tue Apr 12 08:37:40 2005 From: trondmm-mapserver at CRUSADERS.NO (Trond Michelsen) Date: Tue, 12 Apr 2005 17:37:40 +0200 Subject: Perl API method setProjection doesn't work. In-Reply-To: <105187625890.20050412182315@pochtamt.ru> Message-ID: On Tue, Apr 12, 2005 at 06:23:15PM +0400, Cave wrote: > Here if I use any projection except "lonlat", the output file contains > an empty image. If this projection is set in a cgi-script, everything > is displayed correctly. > > If I comment this string: > $map->setProjection('proj=eqc,lat_ts=50,lon_0=80') Are you sure this a valid proj4 string? try: $map->setProjection('proj=eqc lat_ts=50 lon_0=80') or $map->setProjection('+proj=eqc +lat_ts=50 +lon_0=80') -- Trond Michelsen From raghu at KU.EDU Tue Apr 12 09:15:19 2005 From: raghu at KU.EDU (Shantha, Raghavendra Vasanth) Date: Tue, 12 Apr 2005 11:15:19 -0500 Subject: Perl API method setProjection doesn't work. Message-ID: Try using $map->setProjection('(proj=eqc,lat_ts=50,lon_0=80)') (notice the braces) I had a similar problem with clssObj.setExpression -Raghu -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Trond Michelsen Sent: Tuesday, April 12, 2005 9:38 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Perl API method setProjection doesn't work. On Tue, Apr 12, 2005 at 06:23:15PM +0400, Cave wrote: > Here if I use any projection except "lonlat", the output file contains > an empty image. If this projection is set in a cgi-script, everything > is displayed correctly. > > If I comment this string: > $map->setProjection('proj=eqc,lat_ts=50,lon_0=80') Are you sure this a valid proj4 string? try: $map->setProjection('proj=eqc lat_ts=50 lon_0=80') or $map->setProjection('+proj=eqc +lat_ts=50 +lon_0=80') -- Trond Michelsen From mark at REFRACTIONS.NET Tue Apr 12 09:15:54 2005 From: mark at REFRACTIONS.NET (Mark Leslie) Date: Tue, 12 Apr 2005 09:15:54 -0700 Subject: Mapserver for Windows 2003 + FCGI + SDE In-Reply-To: <425BE390.2030704@dmsolutions.ca> Message-ID: I'm having trouble building mapserver on a Windows 2003 server with ArcSDE and fastcgi support. I can compile it, and it runs for a while, but I eventually get memory faults in msvcrt.dll and libfcgi.dll. I have tryed this with Mapservers 4.4, 4.4.1 and now 4.4.2. I've compiled using both vc6 and vc7. Two things that may be relevent: I'm using the precompiled gd binaries; the error stack does not seem to be clearing between requests. I was under the impression that the error stack issue had been taken care of around the 4.4 release. This build has worked fine before on Win2000. If anyone has had similar problems, or has any ideas, I would appreciate it. Mark From trondmm-mapserver at CRUSADERS.NO Tue Apr 12 09:33:33 2005 From: trondmm-mapserver at CRUSADERS.NO (Trond Michelsen) Date: Tue, 12 Apr 2005 18:33:33 +0200 Subject: Perl API method setProjection doesn't work. In-Reply-To: <20050412153740.GA4328@crusaders.no> Message-ID: On Tue, Apr 12, 2005 at 05:37:40PM +0200, Trond Michelsen wrote: > On Tue, Apr 12, 2005 at 06:23:15PM +0400, Cave wrote: >> Here if I use any projection except "lonlat", the output file contains >> an empty image. If this projection is set in a cgi-script, everything >> is displayed correctly. >> If I comment this string: >> $map->setProjection('proj=eqc,lat_ts=50,lon_0=80') > Are you sure this a valid proj4 string? > try: > $map->setProjection('proj=eqc lat_ts=50 lon_0=80') > or > $map->setProjection('+proj=eqc +lat_ts=50 +lon_0=80') Ah. Hang on. The second is wrong. The two others seems to do the same thing. Anyway - I think the problem is that setProjection() doesn't change your extents, so you've probably zoomed in very closely on a spot in the Pacific Ocean. -- Trond Michelsen From joe at OTSYS.COM Tue Apr 12 09:38:19 2005 From: joe at OTSYS.COM (Joseph Bussell) Date: Tue, 12 Apr 2005 09:38:19 -0700 Subject: seeking info on drawing great circle arcs Message-ID: Greetings, Is there a way to plot great circle arcs? I am presently attempting this by adding line features via Perl Mapscript. The lines I end up getting are Euclidean as far as I can tell. I can discretize my polygon into small sub-segments, but that seems a bit heavy handed. Cordially, Joe Bussell On Time Systems From fwarmerdam at GMAIL.COM Tue Apr 12 09:46:47 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Tue, 12 Apr 2005 12:46:47 -0400 Subject: seeking info on drawing great circle arcs In-Reply-To: <425BF97B.8050706@otsys.com> Message-ID: On Apr 12, 2005 12:38 PM, Joseph Bussell wrote: > Greetings, > Is there a way to plot great circle arcs? I am presently attempting > this by adding line features via Perl Mapscript. The lines I end up > getting are Euclidean as far as I can tell. I can discretize my polygon > into small sub-segments, but that seems a bit heavy handed. Joe, When mapserver reprojects lines it never introduced extra points. This can result in quite large divergence in the case of long line segments. If you are using reprojection to turn straight lines into great circle arcs, you will need to subdivide the original lines in advance. There is no specific support for plotting great circles in mapserver. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From fwarmerdam at GMAIL.COM Tue Apr 12 10:08:23 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Tue, 12 Apr 2005 13:08:23 -0400 Subject: Mapserver for Windows 2003 + FCGI + SDE In-Reply-To: <425BF43A.7030306@refractions.net> Message-ID: On Apr 12, 2005 12:15 PM, Mark Leslie wrote: > I'm having trouble building mapserver on a Windows 2003 server with > ArcSDE and fastcgi support. I can compile it, and it runs for a while, > but I eventually get memory faults in msvcrt.dll and libfcgi.dll. I have > tryed this with Mapservers 4.4, 4.4.1 and now 4.4.2. I've compiled using > both vc6 and vc7. Two things that may be relevent: I'm using the > precompiled gd binaries; the error stack does not seem to be clearing > between requests. I was under the impression that the error stack issue > had been taken care of around the 4.4 release. Mark, The error stack reset for FastCGI support is in MapServer 4.4.1. It is version 1.141.2.1 of mapserv.c (calls msResetErrorList() after completing - or failing - an OWS request). > This build has worked > fine before on Win2000. If anyone has had similar problems, or has any > ideas, I would appreciate it. I don't know why you are running into problems on Win2003 that didn't occur on Win2000. I will say that the build process is complex including the need to past the fastcgi client library (as noted in the wiki) and care must be taken to build with MSVCRT.DLL. I haven't tried with VC7, but I think that would be imprudent. I think the precompiled binaries for GD are fine as long as you build with VC6 and /MD. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From sknutti at SMUMN.EDU Tue Apr 12 10:08:24 2005 From: sknutti at SMUMN.EDU (Scott Knutti) Date: Tue, 12 Apr 2005 12:08:24 -0500 Subject: Imagemaps Message-ID: For those who have gotten the imagemap thing to work... should the imagemap_url return the imagemap code or is that stored in a text file in the same location? When I try to include the imagemap portion of the page, it errors out because it can't include an image. Any ideas? Thanks, Scott From pauljame at GMAIL.COM Tue Apr 12 10:17:52 2005 From: pauljame at GMAIL.COM (Paul james) Date: Tue, 12 Apr 2005 14:17:52 -0300 Subject: queryByAttributes... Message-ID: I?m with problems using queryByAttributes... getResult(0) always return null... any idea? ps.: using c# thx layer = mp.getLayerByName("layer"); string value = "'[oid]' = '32141'"; if ((layer.queryByAttributes(mp,"oid", value, 0))==1) { resultCacheMemberObj result = new resultCacheMemberObj(); result =layer.getResult(0); } From pauljame at GMAIL.COM Tue Apr 12 10:25:43 2005 From: pauljame at GMAIL.COM (Paul james) Date: Tue, 12 Apr 2005 14:25:43 -0300 Subject: queryByAttributes... Message-ID: I forgot my layer: LAYER NAME layer TYPE POINT STATUS ON CONNECTIONTYPE POSTGIS CONNECTION "user=x password=x dbname=x host=localhost" DATA "the_geom from country" CLASS TEMPLATE "x.html" NAME "contry_s" COLOR 255 0 0 SYMBOL "circle" SIZE 10 END END From bartvde at XS4ALL.NL Tue Apr 12 10:25:12 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Tue, 12 Apr 2005 19:25:12 +0200 Subject: Mapserver for Windows 2003 + FCGI + SDE In-Reply-To: <425BF43A.7030306@refractions.net> Message-ID: Mark, did you download any of the Windows Platform SDK's? You could try building against the Windows 2003 Server Platform SDK, but I don't know if that will help for sure. Update your LIB and INCLUDE environment variables to include the Platform SDK files first. http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ Btw this site needs IE :-( : Best regards, Bart On Tue, 12 Apr 2005 09:15:54 -0700, Mark Leslie wrote: > I'm having trouble building mapserver on a Windows 2003 server with > ArcSDE and fastcgi support. I can compile it, and it runs for a while, > but I eventually get memory faults in msvcrt.dll and libfcgi.dll. I have > tryed this with Mapservers 4.4, 4.4.1 and now 4.4.2. I've compiled using > both vc6 and vc7. Two things that may be relevent: I'm using the > precompiled gd binaries; the error stack does not seem to be clearing > between requests. I was under the impression that the error stack issue > had been taken care of around the 4.4 release. This build has worked > fine before on Win2000. If anyone has had similar problems, or has any > ideas, I would appreciate it. > Mark > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From mark at REFRACTIONS.NET Tue Apr 12 10:43:59 2005 From: mark at REFRACTIONS.NET (Mark Leslie) Date: Tue, 12 Apr 2005 10:43:59 -0700 Subject: Mapserver for Windows 2003 + FCGI + SDE In-Reply-To: Message-ID: For vc7 I'm using the platform sdk and vc7 toolkit. For vc6 it's the visual studio tools. I tryed the 2003 tools after vc6 started causing the errors, in case the old tools didn't like the new libraries (%SystemRoot%\system32\msvcrt.dll is version 7.0.3790.0 on my win2003, 6.1.9844.0 on win2000). I'll try again with vc6 and the mapserv.c changes Frank directed me too and see how things go. Mark Bart van den Eijnden wrote: > Mark, > > did you download any of the Windows Platform SDK's? > > You could try building against the Windows 2003 Server Platform SDK, > but I don't know if that will help for sure. Update your LIB and > INCLUDE environment variables to include the Platform SDK files first. > > http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ > > Btw this site needs IE :-( : > > Best regards, > Bart > > On Tue, 12 Apr 2005 09:15:54 -0700, Mark Leslie > wrote: > >> I'm having trouble building mapserver on a Windows 2003 server with >> ArcSDE and fastcgi support. I can compile it, and it runs for a while, >> but I eventually get memory faults in msvcrt.dll and libfcgi.dll. I have >> tryed this with Mapservers 4.4, 4.4.1 and now 4.4.2. I've compiled using >> both vc6 and vc7. Two things that may be relevent: I'm using the >> precompiled gd binaries; the error stack does not seem to be clearing >> between requests. I was under the impression that the error stack issue >> had been taken care of around the 4.4 release. This build has worked >> fine before on Win2000. If anyone has had similar problems, or has any >> ideas, I would appreciate it. >> Mark >> > > > From sgillies at FRII.COM Tue Apr 12 10:45:53 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Tue, 12 Apr 2005 11:45:53 -0600 Subject: queryByAttributes... In-Reply-To: Message-ID: On Apr 12, 2005, at 11:17 AM, Paul james wrote: > I=B4m with problems using queryByAttributes... getResult(0) always > return n= > ull... > any idea? > ps.: using c# > > thx > > =20 > > layer =3D mp.getLayerByName("layer"); > string value =3D "'[oid]' =3D '32141'"; > if ((layer.queryByAttributes(mp,"oid", value, 0))=3D=3D1) > { > resultCacheMemberObj result =3D new resultCacheMemberObj(); > result =3Dlayer.getResult(0); > } > > Is it just me, or is the listserv mangling this (and other) emails? I'm assuming you are using MapServer 4.4. First, of all, you should generally compare integer results from mapscript to mapscript.MS_SUCCESS (0) and mapscript.MS_FAILURE (1). Second, I think you really should be doing something like this: layerObj layer = mp.getLayerByName("layer"); ... layer.queryByAttributes(...); resultCacheObj results = layer.getResults(); if (results) { resultCacheMemberObj result = results.getResult(0); } Keep in mind that the extents of your 'mp' map are used to filter results. If you query by attributes for a feature outside the map extents, it will not be found. cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From pauljame at GMAIL.COM Tue Apr 12 11:07:26 2005 From: pauljame at GMAIL.COM (Paul james) Date: Tue, 12 Apr 2005 15:07:26 -0300 Subject: queryByAttributes... In-Reply-To: Message-ID: Thank you Sean... I thoung '1' means sucess ... so, my queryByAttributes() is always returning 1 (Failure)... I dont know why... I think is problem with any parameter... string value = "'[state]' = 'test'"; layer.queryByAttributes(mp,"state", value, 0) I have a state column in my table : > state varchar And I have a 'test' line as well ... And the 'test' point is in my extents mp ... so, any other idea? thank you... On Apr 12, 2005 2:45 PM, Sean Gillies wrote: > On Apr 12, 2005, at 11:17 AM, Paul james wrote: > > > I=B4m with problems using queryByAttributes... getResult(0) always > > return n= > > ull... > > any idea? > > ps.: using c# > > > > thx > > > > =20 > > > > layer =3D mp.getLayerByName("layer"); > > string value =3D "'[oid]' =3D '32141'"; > > if ((layer.queryByAttributes(mp,"oid", value, 0))=3D=3D1) > > { > > resultCacheMemberObj result =3D new resultCacheMemberObj(); > > result =3Dlayer.getResult(0); > > } > > > > > > Is it just me, or is the listserv mangling this (and other) emails? > > I'm assuming you are using MapServer 4.4. First, of all, you should > generally compare integer results from mapscript to > mapscript.MS_SUCCESS (0) and mapscript.MS_FAILURE (1). Second, I think > you really should be doing something like this: > > layerObj layer = mp.getLayerByName("layer"); > ... > layer.queryByAttributes(...); > resultCacheObj results = layer.getResults(); > if (results) > { > resultCacheMemberObj result = results.getResult(0); > } > > Keep in mind that the extents of your 'mp' map are used to filter > results. If you query by attributes for a feature outside the map > extents, it will not be found. > > cheers, > Sean > > -- > Sean Gillies > sgillies at frii dot com > http://users.frii.com/sgillies > > From nunoragil at GMAIL.COM Tue Apr 12 11:44:45 2005 From: nunoragil at GMAIL.COM (Nuno Gil) Date: Tue, 12 Apr 2005 19:44:45 +0100 Subject: GDAL virtual raster file Message-ID: Dear Listers, I have some Landsat5 images in arcinfo grid format - they are separated by bands. I was trying to compose the bands together without creating more files. Is it possible to create a vrt GDAL virtual raster file from three different grid files (one for each visible band)? Is it possible afterwards to get MapServer to read it? What do I need to include in my map file? Since I have a bunch of grids (5? x 5?) can I use something like gdaltindex to create a shapefile index for the virtual files? Kind regards, Nuno From lluisgm at GMAIL.COM Tue Apr 12 11:46:45 2005 From: lluisgm at GMAIL.COM (=?ISO-8859-1?Q?Llu=EDs_Garcia_i_Mestres?=) Date: Tue, 12 Apr 2005 20:46:45 +0200 Subject: Coordinates in jBox, compatible? Message-ID: Hi list, I'm using jBox and it works fine. Also I've implemented the mousemove_handler function. The problem appears when I zoom in the map and I wait with the mouse inside, then mozilla sesion finish suddently. If I zoom but I move the mouse out of the image, it work ok. I assume the problems comes when I call the jBox.boxon function and the mousemove_handler. Anyone has solve this trouble? My scripts lines:
Rosia Montana Gold Corporation Environmental Mapserver

Map Tools
> Click the radio button to pan > > Zoom Size
Check the radio buttons for navigation...
Normally i should see a graphic legend.....isn't it? Thanks in advance Iano Ferencik _____________________________________________ Cinefil?Castiga o excursie la Venetia http://www.cineplus.ro/concurs From rob at DATAFLOWDESIGN.COM Tue Apr 12 13:57:42 2005 From: rob at DATAFLOWDESIGN.COM (Rob P.) Date: Tue, 12 Apr 2005 15:57:42 -0500 Subject: Imagemaps In-Reply-To: <425C0088.2020501@smumn.edu> Message-ID: >>>>> "Scott" == Scott Knutti writes: Scott> For those who have gotten the imagemap thing to work... Scott> should the imagemap_url return the imagemap code or is that Scott> stored in a text file in the same location? When I try to Scott> include the imagemap portion of the page, it errors out Scott> because it can't include an image. Any ideas? Scott> Thanks, Scott hi Scott, I dabbled with this a bit. I found documentation in the wiki and in the source code in a file named mapimagemap.c. My php script used 2 map files. One map file was for rendering the image, which I copied and added outputformat statements for generating the imagemap: IMAGETYPE imagemap OUTPUTFORMAT NAME imagemap DRIVER imagemap FORMATOPTION "POLYHREF=#" FORMATOPTION "SYMBOLHREF=#" FORMATOPTION "SUPPRESS=YES" FORMATOPTION "MAPNAME=tulsamap" FORMATOPTION "POLYMOUSEOUT=return nd();" FORMATOPTION "POLYMOUSEOVER=return overlib('%s');" MIMETYPE "text/html" END Not sure if you can do this without scripting. My php script disabled unwanted layers and dumped the coordinates into the html stream: $imgM = $mapImg->draw(); echo "saveImage("", $mapImg); echo "\n"; This actually worked quite well. I had one problem, though. If the map was empty (no features within the map extents) the php session would crash with no error messages. See note submitted to list on April 1. Rob From morten at DOTNETGIS.NET Tue Apr 12 14:03:14 2005 From: morten at DOTNETGIS.NET (Morten Nielsen) Date: Tue, 12 Apr 2005 23:03:14 +0200 Subject: queryByAttributes... In-Reply-To: A Message-ID: >First, of all, you should >generally compare integer results from mapscript to >mapscript.MS_SUCCESS (0) and mapscript.MS_FAILURE (1) For some reason SWIG "hides" these return values in MapServer.MS_RETURN_VALUE.MS_SUCCESS and MapServer.MS_RETURN_VALUE.MS_FAILURE /Morten From sgillies at FRII.COM Tue Apr 12 14:11:51 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Tue, 12 Apr 2005 15:11:51 -0600 Subject: queryByAttributes... In-Reply-To: <66757A67AFAB9247B5207D59104E5786CD97@terra.iter.local> Message-ID: On Apr 12, 2005, at 3:02 PM, Morten Nielsen wrote: >> First, of all, you should >> generally compare integer results from mapscript to >> mapscript.MS_SUCCESS (0) and mapscript.MS_FAILURE (1) > > For some reason SWIG "hides" these return values in > MapServer.MS_RETURN_VALUE.MS_SUCCESS and > MapServer.MS_RETURN_VALUE.MS_FAILURE > > /Morten > I'm looking in mapscript.cs and see a public class mapscript { ... public static readonly int MS_SUCCESS ... } Is that not accessible as mapscript.MS_SUCCESS from C#? Sean From stigmata_blackangel at YAHOO.COM Tue Apr 12 14:23:44 2005 From: stigmata_blackangel at YAHOO.COM (Gregor Mosheh) Date: Tue, 12 Apr 2005 14:23:44 -0700 Subject: fastcgi, lacking performance over standard cgi Message-ID: On my dev server I started using MapServer with FastCGI support. I compiled mapserver with fastcgi support, and the mapserv.fcgi process is started at Apache startup. However, there is no performance increase, even in PostGIS-heavy maps. Strangely, if I set Apache's LogLevel to info or debug, I get no diagnostic messages from the new mapserver. I was of the impression that fcgi would display debugging info, yes? (I used a test program from fastcgi.com, and it too displayed no debugging info even with LogLevel set to debug) Equally strangely, if I do lsof and grep for the mapserv's pid, I do see that the mapserver.fcgi is holding the socket file, and that the webserver is holding the socket file. But I see no indication that the mapserver.fcgi is doing anything else persistent, e.g. database connections. Should I see a few TCP connections attached to the server process? Should I see more than one mapserv.fcgi process spawned? Does the following httpd.conf paragraph look right, or am I missing something? (yes, there's a directory named fcgi where the sockets are stored) LoadModule fastcgi_module libexec/mod_fastcgi.so AddHandler fastcgi-script .fcgi FastCgiIpcDir fcgi FastCgiServer cgi-bin/mapserv.fcgi -flush -socket mapserver-fcgi.socket Any ideas as to where I should look to see a performance increase? Or is MapServer known to not benefit from FastCGI, and it's merely for compatibility? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From fwarmerdam at GMAIL.COM Tue Apr 12 14:36:47 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Tue, 12 Apr 2005 17:36:47 -0400 Subject: fastcgi, lacking performance over standard cgi In-Reply-To: <20050412212344.3576.qmail@web53803.mail.yahoo.com> Message-ID: On Apr 12, 2005 5:23 PM, Gregor Mosheh wrote: > On my dev server I started using MapServer with > FastCGI support. I compiled mapserver with fastcgi > support, and the mapserv.fcgi process is started at > Apache startup. However, there is no performance > increase, even in PostGIS-heavy maps. Gregor, MapServer normally has quite low "start up" costs, and for that reason it does not normally benefit much from FastCGI. Exceptions are the database connections with high overhead, such as Oracle, and SDE. It was specifically for these two datasources that FastCGI support was implemented. I would add that to convince MapServer to "hold open" a database connection you need to tell it to do so. This is accomplished by adding the following on layers for which you would like to preserve the database connection: PROCESSING "CLOSE_CONNECTION=DEFER" This works for SDE, Oracle and PostGIS, though it gives relatively little benefit for PostGIS since PostGIS has such a low connection overhead already. Actually, the CLOSE_CONNECTION=DEFER thing also works for OGR datasources, though how much benefit it gives for them varies greatly depending on how the format driver is implemented. In recent tests mapping directly from S-57 format (via OGR) FastCGI gave a substantial speed up, mainly because the S-57 data was all being parsed and held in OGRFeature format in RAM due to the deferred connection closing. This doesn't necessarily scale up to large amounts of data well. Eventually, I would like to also take advantage of deferred closing in FastCGI mode for GDAL rasters, but I haven't yet pursued that option. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From sgillies at FRII.COM Tue Apr 12 14:48:42 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Tue, 12 Apr 2005 15:48:42 -0600 Subject: queryByAttributes... In-Reply-To: Message-ID: On Apr 12, 2005, at 3:11 PM, Sean Gillies wrote: > On Apr 12, 2005, at 3:02 PM, Morten Nielsen wrote: > >>> First, of all, you should >>> generally compare integer results from mapscript to >>> mapscript.MS_SUCCESS (0) and mapscript.MS_FAILURE (1) >> >> For some reason SWIG "hides" these return values in >> MapServer.MS_RETURN_VALUE.MS_SUCCESS and >> MapServer.MS_RETURN_VALUE.MS_FAILURE >> >> /Morten >> > > I'm looking in mapscript.cs and see a > > public class mapscript { > ... > public static readonly int MS_SUCCESS > ... > } > > Is that not accessible as mapscript.MS_SUCCESS from C#? > > Sean > It appears that SWIGCSHARP emits different C# code in 1.3.24 (Morten's) than in 1.3.21 (mine). Bummer. I think that the "new" location of the constants is awkward and that we should consider some changes to map.h that will return them to a better location. Sean From carloseduardo at COSTARRICENSE.CR Tue Apr 12 15:07:05 2005 From: carloseduardo at COSTARRICENSE.CR (Carlos Eduardo Sibaja Salazar) Date: Tue, 12 Apr 2005 16:07:05 -0600 Subject: Print option Message-ID: An HTML attachment was scrubbed... URL: From bcrocks at GMAIL.COM Tue Apr 12 17:17:49 2005 From: bcrocks at GMAIL.COM (BC Rocks) Date: Tue, 12 Apr 2005 18:17:49 -0600 Subject: Segmentation fault: PHP Mapscript related? Message-ID: Hello, I have successfully compiled mapserver, but the compiled executable segfaults whenever called. Here is the scoop: Packages: Mapserver 4.4.2 PHP 5.0.5 gd-2.0.33 gdal-1.2.6 geos-2.1.1 tiff-3.7.2 postgis-0.9.1 proj-4.4.9 postgresql-8.0.1 PHP was configured as follows (as I am successfully using on another box): ./configure --build=i686-mandrake-linux-gnu --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var/lib --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --enable-discard-path --enable-force-cgi-redirect --enable-shared --disable-static --disable-debug --disable-rpath --enable-pic --enable-inline-optimization --enable-memory-limit --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php --with-pear=/usr/share/pear --enable-magic-quotes --enable-debugger --enable-track-vars --with-exec-dir=/usr/bin --with-versioning --with-mod_charset --with-regex=php --enable-track-vars --enable-trans-sid --enable-safe-mode --enable-ctype --enable-ftp --with-gettext=/usr --enable-posix --enable-session --enable-sysvsem --enable-sysvshm --enable-yp --with-openssl=/usr --without-kerberos --with-ttf --with-freetype-dir=/usr/include/freetype2 --with-zlib=/usr --with-zlib=/usr --with-zlib-dir=/usr --with-pear --with-jpeg-dir=/usr --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-pgsql=/var/lib/pgsql/ --without-iodbc --without-custom-odbc --without-unixODBC --without-dbmaker --enable-soap --with-xml=/usr/include/libxml2/libxml --with-apxs2=/usr/sbin/apxs2 --with-mcrypt=/usr/local/lib --with-curl=/usr/local/include Mapserver configure parameters are as follows: ./configure --with-php=/usr/include/php --with-php-regex-dir=/usr/src/php/php-5.0.4/regex --with-jpeg=/usr/lib --with-png=/usr/lib --with-freetype=/usr/bin/freetype-config --with-proj --with-gd --without-pdf --with-geos=/usr/local/bin/geos-config --with-gdal --with-postgis=/var/lib/pgsql/bin/pg_config --without-tiff --with-wmsclient --with-wfsclient --with-wcs --with-curl-config=/usr/bin --with-ogr --with-httpd=/usr/sbin/httpd2 After editing the Makefile (it included an empty -I flag with regard to the GEOS include path), I can successfully compile. When I remove the --with-php=/usr/include/php --with-php-regex-dir=/usr/src/php/php-5.0.4/regex parameters, I compile a mapserv executable capable of rendering PNG using shp2img. As mentioned above, when I include the mapscript build, the executable segfaults. I have been pulling my hair out for a couple days on this one (using 4.4.1). Any thoughts? I know the mapfile and perms, etc are correct as I can render images without the inclusion of mapscript. I read some threads with regard to GDAL and JPG/TIFF issues (I did try using the internal GDAL libs), but I don't think that is the issue...especially since if I pull the php, things compile. Could their be conflicts between my php compile and one of the other packages? Here is the gdb info, if that helps provide insight: gdb /var/www/cgi-bin/mapserv GNU gdb 6.2-2mdk (Mandrakelinux) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-mandrake-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) run "QUERY_STRING=layer=lakespy2&layer=dlgstln2&zoomsize=2&map=%2Fvar%2Fwww%2Fhtml%2Fdemo%2Fworkshop%2Fitasca.map&program=%2Fcgi-bin%2Fmapserv&root=demo%2Fworkshop&map_web_imagepath=%2Fvar%2Fwww%2Fhtml%2Ftmp%2F&map_web_imageurl=%2Ftmp%2F&map_web_template=itasca_basic.html" Starting program: /var/www/cgi-bin/mapserv "QUERY_STRING=layer=lakespy2&layer=dlgstln2&zoomsize=2&map=%2Fvar%2Fwww%2Fhtml%2Fdemo%2Fworkshop%2Fitasca.map&program=%2Fcgi-bin%2Fmapserv&root=demo%2Fworkshop&map_web_imagepath=%2Fvar%2Fwww%2Fhtml%2Ftmp%2F&map_web_imageurl=%2Ftmp%2F&map_web_template=itasca_basic.html" Program received signal SIGSEGV, Segmentation fault. 0x4073e971 in vfprintf () from /lib/tls/libc.so.6 (gdb) backtrace #0 0x4073e971 in vfprintf () from /lib/tls/libc.so.6 #1 0x40747560 in printf () from /lib/tls/libc.so.6 #2 0x0804da85 in writeError () #3 0x0804e18c in loadMap () #4 0x08050804 in main () Thanks in advance, BC From richard.greenwood at GMAIL.COM Tue Apr 12 18:28:25 2005 From: richard.greenwood at GMAIL.COM (Richard Greenwood) Date: Wed, 13 Apr 2005 01:28:25 +0000 Subject: =?utf-8?b?W1VNTl9NQVBTRVJWRVItVVNFUlNd?= Coordinates in jBox, compatible? Message-ID: Llu?s Garcia i Mestres GMAIL.COM> writes: > > Hi list, > > I'm using jBox and it works fine. Also I've implemented the > mousemove_handler function. The problem appears when I zoom in the map > and I wait with the mouse inside, then mozilla sesion finish > suddently. If I zoom but I move the mouse out of the image, it work > ok. I assume the problems comes when I call the jBox.boxon function > and the mousemove_handler. > > Anyone has solve this trouble? I hate to say it, but I do not think jBox is Mozilla/Firefox compatable. I have been strugglying with Mozilla/Firefox issues for 6 months and have not come up with a solution. Rich From covariance at SHAW.CA Tue Apr 12 19:39:56 2005 From: covariance at SHAW.CA (Bob Bruce) Date: Tue, 12 Apr 2005 21:39:56 -0500 Subject: A queryByAttribute problem Message-ID: Hi: I have been running this query on a polygon file of Winnipeg Neighbourhoods: $result = $NeighbourhoodsLayer->queryByAttributes("NAME", $NeighbourhoodName, MS_MULTIPLE); The polygon layer has polygons with these names (among others): "St. John's" "St. John's Park" when I do a search for "St. John's Park" it returns a polygon. When I do a search for "St. John's" it doesn't return anything. I changed the third argument from MS_SINGLE to MS_MULTIPLE thinking that both neighbourhoods were being returned, but it still returned a status of MS_FAILURE. If I add a '-' character to the end of the "St. John's" name in the map and search on that then it has no problem. Am I doing something wrong? Or is this maybe a bug? thanks, Bob Bruce, Winnipeg, Manitoba From BEN at SYNCERA-ITSOLUTIONS.NL Wed Apr 13 00:09:44 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Wed, 13 Apr 2005 09:09:44 +0200 Subject: Legend problems Message-ID: Hi, only CLASSes which have a NAME will show up in the legend. Try that first. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Ferencik Ioan 04/12/05 12:23pm >>> I am building a simple mapserver aplication....and i have problems with legend .....i created a LEGEND object in the map file and in the index.php with phpmapscript......the legend from mapscript produces a small PNG file where I see a little square...when i comment the legend lines from mapscript i seen nothing at all. Any suggestions(probably it is simple but i can't see it:)) ) here is my map file: MAP NAME "rosia" STATUS ON SHAPEPATH "date" SIZE 800 600 IMAGETYPE PNG24 IMAGECOLOR 255 255 255 EXTENT 319780 522564 385192 575568 PROJECTION "init=epsg:31700" END FONTSET "fonts/fonts.list" SYMBOLSET "simbol/simbol.sym" REFERENCE EXTENT 319780 522564 385192 575568 IMAGE "date/raster/dem.png" SIZE 100 100 STATUS ON COLOR -1 -1 -1 END LAYER NAME "dem" DATA 'raster/demback.tif' TYPE RASTER PROJECTION "init=epsg:31700" END STATUS ON END #LAYER #AME "curbe" #DATA curbe #TYPE LINE #LABELITEM "COTA" #PROJECTION #"init=epsg:31700" #END #STATUS DEFAULT #CLASS #COLOR 160 81 45 #END #END LAYER NAME "xysediment04" DATA xysediment04 TYPE POINT #LABELITEM "COTA" PROJECTION "init=epsg:31700" END STATUS DEFAULT CLASS COLOR 32 79 240 #albastru SYMBOL "star" EXPRESSION ([CD_114] < 1) SIZE 10 END CLASS COLOR 240 11 16 #rosu SYMBOL "star" EXPRESSION ([CD_114] > 1) SIZE 10 END END LAYER NAME "rauri" DATA retea TYPE LINE LABELITEM "DENUMIRE" PROJECTION "init=epsg:31700" END STATUS DEFAULT CLASS COLOR 35 57 214 STYLE SIZE 50 SYMBOL "line1" END LABEL ANGLE AUTO BUFFER 10 COLOR 35 57 214 FONT "Verdana" TYPE TRUETYPE SIZE 8 OFFSET 5 5 END END END LAYER NAME "aries" DATA aries TYPE LINE PROJECTION "init=epsg:31700" END STATUS DEFAULT CLASS COLOR 35 57 214 STYLE SIZE 50 SYMBOL "line1" END END END SCALEBAR COLOR -1 -1 -1 SIZE 100 3 STYLE 1 STATUS ON IMAGECOLOR 255 255 255 INTERVALS 4 UNITS KILOMETERS END LEGEND IMAGECOLOR 255 255 255 OUTLINECOLOR 0 0 0 KEYSIZE 15 15 STATUS ON LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END #TEMPLATE "legenda.html" END WEB TEMPLATE "rosia.htm" IMAGEPATH "/ms4w/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" END END and this is my index.php file(template) setextent($extent_to_set[0],$extent_to_set[1], $extent_to_set[2],$extent_to_set[3]); $my_point = ms_newpointObj(); $my_point->setXY($HTTP_POST_VARS["mapa_x"],$HTTP_POST_VARS ["mapa_y"]); $my_extent = ms_newrectObj(); $my_extent->setextent($extent_to_set[0],$extent_to_set[1], $extent_to_set[2],$extent_to_set [3]); $zoom_factor = $HTTP_POST_VARS["zoom"]*$HTTP_POST_VARS ["zsize"]; if ($zoom_factor == 0) { $zoom_factor = 1; $check_pan = "CHECKED"; $check_zout = ""; $check_zin = ""; } else if ($zoom_factor < 0) { $check_pan = ""; $check_zout = "CHECKED"; $check_zin = ""; } else { $check_pan = ""; $check_zout = ""; $check_zin = "CHECKED"; } $val_zsize = abs($zoom_factor); $map->zoompoint($zoom_factor,$my_point,$map->width,$map- >height, $my_extent); } $image=$map->draw(); $image_url=$image->saveWebImage(); $extent_to_html = $map->extent->minx." ".$map->extent->miny." " .$map->extent->maxx." ".$map->extent->maxy; //scara $map->scalebar->set(intervals, 2); $map->scalebar->set(width, 200); $map->scalebar->set(style, 0); $map->scalebar->color->setRGB( 255,255,255 ); $map->scalebar->backgroundcolor->setRGB(0, 94, 53); $map->scalebar->outlinecolor->setRGB(0, 94, 53); $imgscara=$map->drawScaleBar(); $scara=$imgscara->saveWebImage(); //referinta $map->reference->set(image, "/ms4w/rosia/date/raster/dem.png"); $map->reference->set(width,100); $map->reference->set(height,100); $map->reference->set(status, 1); $map->reference->outlinecolor->setRGB(0, 94, 53); $imgref=$map->drawreferencemap(); $ref=$imgref->saveWebImage(); //legenda $map->legend->set(width, 200); $map->legend->set(height, 200); $map->legend->imagecolor->setRGB(255, 255, 255); $map->legend->set(keysizex, 15); $map->legend->set(keysizey, 15); $map->legend->set(status, OFF); //$map->legend->set(template, "/ms4w/rosia/legenda.html"); $imgleg=$map->drawLegend(); $leg=$imgleg->saveWebImage(); ?> Rosia Montana Environmental Mapserver
Rosia Montana Gold Corporation Environmental Mapserver

Map Tools
> Click the radio button to pan > > Zoom Size
Check the radio buttons for navigation...
Normally i should see a graphic legend.....isn't it? Thanks in advance Iano Ferencik _____________________________________________ Cinefil?Castiga o excursie la Venetia http://www.cineplus.ro/concurs From ferencik.ioan at PERSONAL.RO Wed Apr 13 00:42:28 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Wed, 13 Apr 2005 10:42:28 +0300 Subject: Legend problems Message-ID: Thanks Bart, You were right....I see now the GIF legend....i wil try to create a HTML legend now..I did Many thanks, Iano Ferencik > Hi, > > only CLASSes which have a NAME will show up in the legend. Try that first. > > Best regards, > Bart > > Bart van den Eijnden > Syncera-ITSolutions > Postbus 270 > 2600 AG DELFT > > tel.nr.: 015-7512436 > email: BEN at Syncera-ITSolutions.nl > > >>> Ferencik Ioan 04/12/05 12:23pm >>> > I am building a simple mapserver aplication....and i have problems with legend > .....i created a LEGEND object in the map file and in the index.php with > phpmapscript......the legend from mapscript produces a small PNG file where I > see a little square...when i comment the legend lines from mapscript i seen > nothing at all. Any suggestions(probably it is simple but i can't see it:)) ) > > here is my map file: > > MAP > NAME "rosia" > STATUS ON > SHAPEPATH "date" > SIZE 800 600 > IMAGETYPE PNG24 > IMAGECOLOR 255 255 255 > EXTENT 319780 522564 385192 575568 > PROJECTION > "init=epsg:31700" > END > FONTSET "fonts/fonts.list" > SYMBOLSET "simbol/simbol.sym" > > REFERENCE > EXTENT 319780 522564 385192 575568 > IMAGE "date/raster/dem.png" > SIZE 100 100 > STATUS ON > COLOR -1 -1 -1 > > > END > LAYER > NAME "dem" > DATA 'raster/demback.tif' > TYPE RASTER > PROJECTION > "init=epsg:31700" > END > STATUS ON > > > END > > #LAYER > > #AME "curbe" > #DATA curbe > #TYPE LINE > #LABELITEM "COTA" > #PROJECTION > #"init=epsg:31700" > #END > #STATUS DEFAULT > #CLASS > #COLOR 160 81 45 > #END > > > > > #END > > > > LAYER > > NAME "xysediment04" > DATA xysediment04 > TYPE POINT > #LABELITEM "COTA" > PROJECTION > "init=epsg:31700" > END > STATUS DEFAULT > CLASS > COLOR 32 79 240 #albastru > SYMBOL "star" > EXPRESSION ([CD_114] < 1) > SIZE 10 > END > > CLASS > COLOR 240 11 16 #rosu > SYMBOL "star" > EXPRESSION ([CD_114] > 1) > SIZE 10 > END > > > > END > > LAYER > > NAME "rauri" > DATA retea > TYPE LINE > LABELITEM "DENUMIRE" > PROJECTION > "init=epsg:31700" > END > STATUS DEFAULT > CLASS > COLOR 35 57 214 > > STYLE > SIZE 50 > SYMBOL "line1" > END > LABEL > ANGLE AUTO > BUFFER 10 > COLOR 35 57 214 > FONT "Verdana" > TYPE TRUETYPE > SIZE 8 > OFFSET 5 5 > END > > END > > > > > END > > LAYER > > NAME "aries" > DATA aries > TYPE LINE > > PROJECTION > "init=epsg:31700" > END > STATUS DEFAULT > CLASS > COLOR 35 57 214 > > STYLE > SIZE 50 > SYMBOL "line1" > END > > END > > > > > END > > > > > SCALEBAR > COLOR -1 -1 -1 > SIZE 100 3 > STYLE 1 > > STATUS ON > IMAGECOLOR 255 255 255 > INTERVALS 4 > UNITS KILOMETERS > > END > LEGEND > IMAGECOLOR 255 255 255 > OUTLINECOLOR 0 0 0 > KEYSIZE 15 15 > STATUS ON > LABEL > TYPE BITMAP > SIZE MEDIUM > COLOR 0 0 89 > END > > #TEMPLATE "legenda.html" > END > WEB > TEMPLATE "rosia.htm" > IMAGEPATH "/ms4w/tmp/ms_tmp/" > IMAGEURL "/ms_tmp/" > > > END > > > > > > END > > and this is my index.php file(template) > > > > > > dl('php_mapscript_44.dll'); > > > > $val_zsize=2; > $check_pan="CHECKED"; > $map_path="/ms4w/rosia/"; > $map_file="rosia.map"; > > $map = ms_newMapObj($map_path.$map_file); > > > if ( isset($HTTP_POST_VARS["mapa_x"]) && isset ($HTTP_POST_VARS > ["mapa_y"]) > && !isset($HTTP_POST_VARS["full"]) ) { > > $extent_to_set = explode(" ",$HTTP_POST_VARS["extent"]); > > $map->setextent($extent_to_set[0],$extent_to_set[1], > $extent_to_set[2],$extent_to_set[3]); > > $my_point = ms_newpointObj(); > $my_point->setXY($HTTP_POST_VARS ["mapa_x"],$HTTP_POST_VARS > ["mapa_y"]); > > $my_extent = ms_newrectObj(); > > $my_extent->setextent($extent_to_set[0],$extent_to_set [1], > $extent_to_set[2],$extent_to_set > [3]); > > $zoom_factor = $HTTP_POST_VARS["zoom"]*$HTTP_POST_VARS > ["zsize"]; > if ($zoom_factor == 0) { > $zoom_factor = 1; > $check_pan = "CHECKED"; > $check_zout = ""; > $check_zin = ""; > } else if ($zoom_factor < 0) { > $check_pan = ""; > $check_zout = "CHECKED"; > $check_zin = ""; > } else { > $check_pan = ""; > $check_zout = ""; > $check_zin = "CHECKED"; > } > > $val_zsize = abs($zoom_factor); > > $map->zoompoint($zoom_factor,$my_point,$map->width,$map- > >height, > $my_extent); > > } > > > $image=$map->draw(); > $image_url=$image->saveWebImage(); > > $extent_to_html = $map->extent->minx." ".$map->extent- >miny." " > .$map->extent->maxx." ".$map->extent->maxy; > //scara > $map->scalebar->set(intervals, 2); > $map->scalebar->set(width, 200); > $map->scalebar->set(style, 0); > $map->scalebar->color->setRGB( 255,255,255 ); > $map->scalebar->backgroundcolor->setRGB(0, 94, 53); > $map->scalebar->outlinecolor->setRGB(0, 94, 53); > $imgscara=$map->drawScaleBar(); > $scara=$imgscara->saveWebImage(); > //referinta > $map->reference->set (image, "/ms4w/rosia/date/raster/dem.png"); > $map->reference->set(width,100); > $map->reference->set(height,100); > $map->reference->set(status, 1); > $map->reference->outlinecolor->setRGB(0, 94, 53); > $imgref=$map->drawreferencemap(); > $ref=$imgref->saveWebImage(); > //legenda > > $map->legend->set(width, 200); > $map->legend->set(height, 200); > $map->legend->imagecolor->setRGB(255, 255, 255); > $map->legend->set(keysizex, 15); > $map->legend->set(keysizey, 15); > $map->legend->set(status, OFF); > //$map->legend->set(template, "/ms4w/rosia/legenda.html"); > $imgleg=$map->drawLegend(); > $leg=$imgleg->saveWebImage(); > > > > > > > ?> > > > Rosia Montana Environmental Mapserver > > > > > > > > > > > > > > > > > > > > > > > > > >
Rosia Montana Gold > Corporation Environmental Mapserver
>
> >
> >
> > > >
> >
> > > >
>

> >

> > >
> > >
> > > >
> > > >
>
Map Tools
>
> > > > > > > > > > > > > > > > > > > > > >
> $check_pan?>> > > height=20 alt="Click the radio button to pan" > > > > > $check_zin?>> > > src="imagini/tool_zoomin_off.gif" height=20 > > > > > $check_zout?>> > > > src="imagini/tool_zoomout_off.gif" height=20 > > > Zoom > Size > > > SIZE=2> > > > > > > SIZE=2 style=" color:#fff; background:#596380;"> >
> Check the radio buttons for navigation... >
> > > > > > > > > > > > > > > Normally i should see a graphic legend.....isn't it? > Thanks in advance > Iano Ferencik > > > _____________________________________________ > Cinefil?Castiga o excursie la Venetia > http://www.cineplus.ro/concurs > _____________________________________________ Cinefil?Castiga o excursie la Venetia http://www.cineplus.ro/concurs From caveeagle at POCHTAMT.RU Wed Apr 13 00:45:50 2005 From: caveeagle at POCHTAMT.RU (SUBSCRIBE MAPSERVER-USERS Cave) Date: Wed, 13 Apr 2005 02:45:50 -0500 Subject: Perl API method setProjection doesn=?ISO-8859-1?Q?=92t?= work. Message-ID: Sorry, I have some problems with perl library for map-script. Here if I use any projection except ?lonlat?, the output file contains an empty image. If this projection is set in a cgi-script, everything is displayed correctly. If I comment this string: $map->setProjection('proj=eqc,lat_ts=50,lon_0=80') The graphic file appears again, but in the standard lonlat projection. In fact, my problem is that I need to set the projection in perl, instead of map-file. ############################################################### Example of perl script: #!/usr/local/bin/perl -w use mapscript; $ENV{MS_ERRORFILE} = "mapError.log"; ### mapscript error log my $mapname = "/www/allsatwms/allsat.map"; # map-file name my $map = new mapscript::mapObj($mapname); if(!$map){warn "New mapObj() error: $mapscript::ms_error->{message}\n";} $map->{extent}->{minx} = 50; $map->{extent}->{maxx} = 100; $map->{extent}->{miny} = 30; $map->{extent}->{maxy} = 70; $map->{width} = 1280; $map->{height} = 1024; $map->setProjection('proj=eqc,lat_ts=50,lon_0=80'); my $img = $map->prepareImage(); if(!$img){warn "prepareImage() error: $mapscript::ms_error->{message}\n"; } my $layerAdmin = $map->getLayerByName('admlin'); $layerObj->{status} = $mapscript::MS_ON; $layerAdmin->draw($map, $img); $img->save("maptest.gif"); ################################################################ Example of map-file: MAP NAME AllSat EXTENT -180 -90 180 90 SIZE 800 400 UNITS meters IMAGETYPE gif TRANSPARENT ON SHAPEPATH "/www/allsatwms/data" FONTSET "/www/allsatwms/fonts/fonts.list" LAYER NAME "admlin" GROUP "Admlin" PROJECTION "proj=longlat" END DATA admlin STATUS ON TYPE LINE CLASS NAME "admlin" COLOR 161 33 33 END END END ############################################################### My system is: FreeBSD 5.3-RELEASE Install swig-1.3.21_1 and perl-5.8.5 Hope for Your help. Best regards, Efremov Victor, Space Monitoring Information Support laboratory IKI RAN, Moscow, Russia. From piero.cavalieri at HEIDI.IT Wed Apr 13 01:43:00 2005 From: piero.cavalieri at HEIDI.IT (Piero Cavalieri) Date: Wed, 13 Apr 2005 03:43:00 -0500 Subject: Print option Message-ID: When I write code I just began with php (now I'm still NOT expert...), so to be sure to don't have problems with global variables I passed via URL an array with extents of the map displayed, and an array with acitve layers. Then I deactivated ALL layers and then reactivated only layers passed via url. This probably is not correct (or the bast way), so reflect about it, to have improvements. This is done in the code below: print With this I open a window where I can specify format an an optional title (printSetup.php) : print
Titolo: 
Formato:
I pass previous arrays plus format option to print.php: "; $map = ms_newMapObj("gmap75.map"); if(array_key_exists("PATH_TRANSLATED", $_SERVER)) { $map->set("shapepath", str_replace($thisFileName, "data", str_replace("\\", "/", $_SERVER["PATH_TRANSLATED"])));} $map->set("width", $MapWidth); $map->set("height", $MapHeight); $map->set("resolution", $MapResolution); //localizeMapLabels($map); //adjustScalebar($map); /*extensions*/ $ext = unserialize($_REQUEST['ext']); $map->setextent($ext[0],$ext[1],$ext[2],$ext[3]); /*Attivo i Layers*/ $layerNums = unserialize($_REQUEST['layerNums']); //setto tutti a false for($i=0; $i < $map->numlayers; $i++) { $iLayer = $map->getLayer($i); $iLayer->set("status", MS_OFF); } //ciclo su $layerNums ed attivo. for($i=0; $i < count($layerNums); $i++) { $iLayer = $map->getLayer($layerNums[$i]); $iLayer->set("status", MS_ON); // printf("%s\n", $iLayer->name); } // change layer scales to ensure pdf image still shows the same extent as the web image $map_width = $map->width; $pdf_ratio = ($map_width/$MapWidth); $allLayernames = $map- >getAllLayerNames(); $numb = count($allLayernames); for ($i = 0; $i<$numb-1; $i++) { $oLayer = $map->getLayerByName ($allLayernames[$i]); $old_min_scale = $oLayer->minscale; $new_min_scale = ($old_min_scale*$pdf_ratio); $oLayer->set('minscale', $new_min_scale); $old_max_scale = $oLayer->maxscale; $new_max_scale = ($old_max_scale*$pdf_ratio); $oLayer->set('maxscale', $new_max_scale); } /*Immagine mappa*/ $mapObj=$map->draw(); $image_url=$mapObj->saveWebImage(); //$image_map = PDF_load_image($p, "auto", "D:/11b2.jpg", ""); $image_map = PDF_load_image($p, "auto", "C:/tmp".$image_url, ""); if (!$image_map) { die("Error: " . PDF_get_errmsg($p)); } /* Immagine ScaleBar */ $imageScaleBar=$map->drawScaleBar(); $scaleBar_url=$imageScaleBar->saveWebImage(); $image_scaleBar = PDF_load_image($p, "auto", "C:/tmp".$scaleBar_url, ""); if (!$image_scaleBar) { die("Error: " . PDF_get_errmsg($p)); } /* Immagine Leggenda*/ $legendObj=$map->drawLegend(); $legend_url=$legendObj->saveWebImage(); $image_legend = PDF_load_image($p, "auto", "C:/tmp".$legend_url, ""); if (!$image_legend) { die("Error: " . PDF_get_errmsg($p)); } /* Immagine RegerenceMap */ $referenceObj=$map->drawReferenceMap(); $reference_url=$referenceObj->saveWebImage(); $image_reference = PDF_load_image($p, "auto", "C:/tmp".$reference_url, ""); if (!$image_reference) { die("Error: " . PDF_get_errmsg($p)); } /*Legend template*/ $legendWidth = $legendObj->width; $legendWidth += 50; $legendHeight = $legendObj->height; $templateLegend = PDF_begin_template($p, $legendWidth, $legendHeight) ; PDF_fit_image($p, $image_legend, 0, 0, "boxsize {".($legendWidth)." ". ($legendHeight)."} fitmethod meet"); PDF_rect($p, 0, 0, $legendWidth, $legendHeight); PDF_stroke($p); PDF_end_template($p); /* Map template */ $templateMap = PDF_begin_template($p, $MapWidth, $MapHeight) ; PDF_fit_image($p, $image_map, 0, 0, "boxsize {".($MapWidth)." ". ($MapHeight)."} fitmethod meet"); PDF_rect($p, 0, 0, $MapWidth , $MapHeight ); PDF_stroke($p); PDF_end_template($p); /* Arrow template */ $templateArrow = PDF_begin_template($p, $ArrowWidth, $ArrowHeight) ; //northarrow pdf_setcolor($p, "fill", "rgb", 0, 0, 0, 0); $x_bild = 0; $y_bild = 0; $font = PDF_findfont($p, "Helvetica", "host", 0); pdf_setlinewidth($p, 0.8); pdf_circle($p, $x_bild+30, $y_bild+27, 11.2); pdf_stroke($p); pdf_setlinewidth($p, 1); pdf_moveto($p, $x_bild+30, $y_bild+60); pdf_lineto($p, $x_bild+23, $y_bild+8); pdf_lineto($p, $x_bild+30, $y_bild+11); pdf_lineto($p, $x_bild+37, $y_bild+8); pdf_closepath_fill_stroke($p); pdf_setfont($p, $font, 20); // N pdf_setlinewidth($p, 3.5); pdf_setcolor($p, "fill", "rgb", 0, 0, 0, 0); pdf_moveto($p, $x_bild+25, $y_bild+20); pdf_lineto($p, $x_bild+25, $y_bild+34); pdf_moveto($p, $x_bild+35, $y_bild+20); pdf_lineto($p, $x_bild+35, $y_bild+34); pdf_stroke($p); pdf_setcolor($p, "stroke","rgb", 0.9, 0.9, 0.9, 0); pdf_setlinewidth($p, 3.0); pdf_moveto($p, $x_bild+25.5, $y_bild+20.9); pdf_lineto($p, $x_bild+25.5, $y_bild+33.1); pdf_moveto($p, $x_bild+25.5, $y_bild+32.15); pdf_lineto($p, $x_bild+34.3, $y_bild+21.85); pdf_moveto($p, $x_bild+34.5, $y_bild+20.9); pdf_lineto ($p, $x_bild+34.5, $y_bild+33.1); pdf_stroke($p); PDF_end_template($p); /* Reference template */ $referenceWidth = $referenceObj->width; $referenceHeight = $referenceObj->height; $templateReference = PDF_begin_template($p, $referenceWidth, $referenceHeight) ; PDF_fit_image($p, $image_reference, 0, 0, "boxsize {". ($referenceWidth)." ".($referenceHeight)."} fitmethod meet"); PDF_rect($p, 0, 0, $referenceWidth , $referenceHeight); PDF_stroke($p); PDF_end_template($p); /* Dispongo i template e le scritte */ PDF_begin_page_ext($p, $width, $height, ""); $delta = $width * 0.007; PDF_rect($p, $delta, $delta, $width - 2 * $delta, $height - 2 * $delta); PDF_stroke($p); /*title*/ $font = PDF_load_font ($p, "Verdana", "host",""); if ($font) { pdf_setfont($p, $font, $fontWidth); pdf_fit_textline($p, $title, $width/85, $height/110, "boxsize {". ($width/13)." ". ($height/1.05)."} orientate ".$mapOrientation." fitmethod meet position {50 50}"); } PDF_fit_image($p, $templateMap, $width/6.5, $height/110, "boxsize {". ($width/1.2)." ". ($height)."} orientate ".$mapOrientation." fitmethod meet"); PDF_fit_image($p, $templateArrow, $width - $width/8 , $height - $height/1.01, "boxsize {".($width/10)." ". ($height/10)."} orientate ".$mapOrientation." fitmethod meet"); PDF_fit_image($p, $image_scaleBar, $width * 0.95, $height * 0.5, "boxsize {".($ScaleBarWidth)." ".($ScaleBarHeight)."} orientate ".$mapOrientation." fitmethod meet"); PDF_fit_image($p, $templateReference, $width/6.5, $height * 0.65, "boxsize {".($width/5)." ".($height/5)."} orientate ".$mapOrientation." fitmethod meet"); PDF_fit_image($p, $templateLegend, $width/6.5 + $width/5 + $width/20, $height * 0.65, "boxsize {".($width/5)." ".($height/5)."} orientate ".$mapOrientation." fitmethod meet"); //PDF_close_image($p, $image_map); //PDF_close_image($p, $image_legend); //PDF_close_image($p, $image_scaleBar); PDF_end_page_ext($p, ""); PDF_end_document($p, ""); $buf = PDF_get_buffer($p); $len = strlen($buf); header("Content-type: application/pdf"); header("Content-Length: $len"); header("Content-Disposition: inline; filename=image.pdf"); print $buf; PDF_delete($p); ?> I used templates and then fit them into boxes expresses as percentage of the page size (both in positioning and in extensions), so u could use virtually any page size (not only A4, A4, A0 es I done). To say the truth when I tested with Apache2 (under Windows) I have problems (not rememeber very well, but about: errors when image maps was over a certain file size). With IIS this worked fine (for me). I think this was bug in library. However test it (or rewrite it ;-) ). Some code (NorthArrow) comes from KGIS application code, however this could be replaced with image inserted, as the others. Bye Piero From caveeagle at POCHTAMT.RU Wed Apr 13 03:46:21 2005 From: caveeagle at POCHTAMT.RU (SUBSCRIBE MAPSERVER-USERS Cave) Date: Wed, 13 Apr 2005 05:46:21 -0500 Subject: Perl API method setProjection doesn't work. Message-ID: > Ah. Hang on. > The second is wrong. The two others seems to do the same thing. Unfortunately, it?s right. All methods of solving my problem do not work. > Anyway - I think the problem is that setProjection() doesn't change > your extents, so you've probably zoomed in very closely on a spot in > the Pacific Ocean. To test this hypothesis, I have calculate the extents with proj utility, and set them manually. Unfortunately, it didn?t the help also. It is significant that setting the projection in query string from CGI- script works successfully. From hypery2kus at YAHOO.COM Wed Apr 13 04:15:42 2005 From: hypery2kus at YAHOO.COM (Lawal Olanrewaju) Date: Wed, 13 Apr 2005 12:15:42 +0100 Subject: Still on Example 1.9 Message-ID: Hi Everyone I am new to Mapserver and I have just downloaded the Tutorial (Mapserver 4.0) I could see the static map but not the dynamic one, there was 'Submit query' displayed in the box where the dynamic map was suppose to be displayed. I have a feeling the mapfil is alright since I was able to see the static map but I could not figure out what was wrong with the html file. I hope someone can help me out. Best regards Olanrewaju Lawal Institute for Soil Science and Land Evaluation (310) University of Hohenheim 70599, Stuttgart Germany Office. +497114593633 Mob. +491632677964 Webpage: http://larrylaw1.tripod.com/index.htm Send instant messages to your online friends http://uk.messenger.yahoo.com From ferencik.ioan at PERSONAL.RO Wed Apr 13 04:23:48 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Wed, 13 Apr 2005 14:23:48 +0300 Subject: Still on Example 1.9 Message-ID: The problem could be your IMAGEPATH and IMAGEURL properties from the WEB object try to send the map file in message > Hi Everyone > I am new to Mapserver and I have just downloaded the > Tutorial (Mapserver 4.0) > I could see the static map but not the dynamic one, > there was 'Submit query' displayed in the box where > the dynamic map was suppose to be displayed. > I have a feeling the mapfil is alright since I was > able to see the static map but I could not figure out > what was wrong with the html file. > I hope someone can help me out. > Best regards > > Olanrewaju Lawal > Institute for Soil Science and Land Evaluation (310) > University of Hohenheim > 70599, Stuttgart > Germany > Office. +497114593633 > Mob. +491632677964 > Webpage: http://larrylaw1.tripod.com/index.htm > > > > > > Send instant messages to your online friends http://uk.messenger.yahoo.com > _____________________________________________ Cinefil?Castiga o excursie la Venetia http://www.cineplus.ro/concurs From hypery2kus at YAHOO.COM Wed Apr 13 04:28:12 2005 From: hypery2kus at YAHOO.COM (Lawal Olanrewaju) Date: Wed, 13 Apr 2005 12:28:12 +0100 Subject: Still on Example 1.9 In-Reply-To: 6667 Message-ID: The mapfile is as found below ------------- MAP NAME EX1.9_ IMAGETYPE PNG24 EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514 # LAEA #EXTENT -97.5 41.619778 -82.122902 49.38562 # Geographic SIZE 400 300 SHAPEPATH "\ms4w\httpd.d\tutorial\data" SYMBOLSET "symbols/symbols35.sym" FONTSET "fonts/fonts.list" WEB TEMPLATE 'example1-9.html' IMAGEPATH '/data/tmp/' IMAGEURL '/tmp/' END PROJECTION # "proj=laea" # "ellps=clrk66" # "lat_0=45" # "lon_0=-100" # # Alternatively, you can specify an EPSG code. "init=epsg:2163" # END # Start of LAYER DEFINITIONS --------------------------------------------- LAYER # States polygon layer begins here NAME states DATA states_ugl STATUS OFF TYPE POLYGON PROJECTION "init=epsg:4326" END CLASSITEM "CLASS" CLASS EXPRESSION 'land' SYMBOL 0 COLOR 232 232 232 END END # States polygon layer ends here LAYER # MODIS raster layer begins here NAME modis DATA "raster/mod09a12003161_ugl_ll_8bit.tif" STATUS DEFAULT TYPE RASTER PROCESSING "BANDS=1,2,3" OFFSITE 71 74 65 PROJECTION "init=epsg:4326" END END # MODIS raster layer ends here LAYER # LandSat WMS map from JPL (or from USGS) NAME LandSat TYPE RASTER OFFSITE 0 0 0 STATUS OFF CONNECTIONTYPE WMS #CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?REQUEST=map&LAYERS=us_landsat7&STYLES=&FORMAT=png&TRANSPARENT=true" CONNECTION "http://gisdata.usgs.net/servlet/com.esri.wms.Esrimap?ServiceName=USGS_WMS_LANDSAT7&VERSION=1.0.0&REQUEST=map&Layers=LANDSAT7&SRS=EPSG:4326&REASPECT=false&Format=png&" METADATA "wms_title" "LandSat" "wms_name" "us_landsat7" "wms_server_version" "1.0.0" "wms_srs" "epsg:4326" "wms_format" "image/png" #"wms_title" "US_Landsat7" # "wms_srs" "epsg:4326" # "wms_connectiontimeout" "1000" END PROJECTION "init=epsg:4326" END END # LandSat WMS image ends here LAYER # States line layer begins here NAME states DATA states_ugl STATUS DEFAULT TYPE LINE PROJECTION "init=epsg:4326" END CLASSITEM "CLASS" CLASS EXPRESSION 'land' SYMBOL 'line5' COLOR 64 64 64 SIZE 1 END END # States line layer ends here LAYER # States label layer begins here NAME states DATA states_ugl STATUS DEFAULT TYPE ANNOTATION PROJECTION "init=epsg:4326" END CLASSITEM "CLASS" LABELITEM "STATE" CLASS EXPRESSION 'land' COLOR -1 -1 -1 LABEL COLOR 255 255 255 TYPE TRUETYPE FONT arial-bold SIZE 12 ANTIALIAS FALSE POSITION CL PARTIALS FALSE MINDISTANCE 300 BUFFER 4 END # end of label END # end of class END # States label layer ends here # End of LAYER DEFINITIONS ------------------------------- END # end of map file --- Ferencik Ioan wrote: > The problem could be your IMAGEPATH and IMAGEURL > properties from the WEB object > try to send the map file in message > > Hi Everyone > > I am new to Mapserver and I have just downloaded > the > > Tutorial (Mapserver 4.0) > > I could see the static map but not the dynamic > one, > > there was 'Submit query' displayed in the box > where > > the dynamic map was suppose to be displayed. > > I have a feeling the mapfil is alright since I was > > able to see the static map but I could not figure > out > > what was wrong with the html file. > > I hope someone can help me out. > > Best regards > > > > Olanrewaju Lawal > > Institute for Soil Science and Land Evaluation > (310) > > University of Hohenheim > > 70599, Stuttgart > > Germany > > Office. +497114593633 > > Mob. +491632677964 > > Webpage: http://larrylaw1.tripod.com/index.htm > > > > > > > > > > > > Send instant messages to your online friends > http://uk.messenger.yahoo.com > > > > > > > _____________________________________________ > Cinefil?Castiga o excursie la Venetia > http://www.cineplus.ro/concurs > Send instant messages to your online friends http://uk.messenger.yahoo.com From gerard_b_18 at HOTMAIL.COM Wed Apr 13 04:31:10 2005 From: gerard_b_18 at HOTMAIL.COM (gerard barrington) Date: Wed, 13 Apr 2005 09:01:10 -0230 Subject: Layer/class definitions In-Reply-To: <20050413111543.95362.qmail@web52309.mail.yahoo.com> Message-ID: An HTML attachment was scrubbed... URL: From BEN at SYNCERA-ITSOLUTIONS.NL Wed Apr 13 04:40:44 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Wed, 13 Apr 2005 13:40:44 +0200 Subject: Layer/class definitions Message-ID: Hi Gerard, STYLE is the new way (starting Mapserver 4.0) to do things, AFAIK it was invented so that you can use multiple STYLEs in a CLASS, which gives you a lot more options with respect to symbology. I would advise you to use the first example you gave, ie the new way. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> gerard barrington 04/13/05 01:31pm >>> Hi list, Can someone tell me the difference between these two class definitions? What does the style do? CLASS STYLE COLOR 0 0 0 SIZE 1 SYMBOL dashed END END as opposed to CLASS COLOR 0 0 0 SIZE 1 SYMBOL dashed END Thanks in advance... Gerard B From ferencik.ioan at PERSONAL.RO Wed Apr 13 04:49:11 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Wed, 13 Apr 2005 14:49:11 +0300 Subject: confused with legend template Message-ID: I have folowing LAYER: LAYER NAME "rivers" DATA retea TYPE LINE LABELITEM "DENUMIRE" PROJECTION "init=epsg:31700" END STATUS DEFAULT CLASS COLOR 35 57 214 NAME "Rivers" STYLE SIZE 50 SYMBOL "line1" END LABEL ANGLE AUTO BUFFER 10 COLOR 35 57 214 FONT "times-italic" TYPE TRUETYPE SIZE 8 OFFSET 5 5 END END METADATA END END and trying to display it in my index php with folowing line:
Legenda
[legend]
I set the legend template do "legend.html". I see only [legend] text in the div element instead the legend This is my legend.html [leg_layer_html order_metadata=0 opt_flag=12 ] [leg_layer_name] [/leg_layer_html] Thanks in advance _____________________________________________ Cinefil?Castiga o excursie la Venetia http://www.cineplus.ro/concurs From gerard_b_18 at HOTMAIL.COM Wed Apr 13 05:12:10 2005 From: gerard_b_18 at HOTMAIL.COM (gerard barrington) Date: Wed, 13 Apr 2005 09:42:10 -0230 Subject: problem with .sym definition In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From woodbri at SWOODBRIDGE.COM Wed Apr 13 06:15:01 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Wed, 13 Apr 2005 09:15:01 -0400 Subject: problem with .sym definition In-Reply-To: Message-ID: Have you tried using: SYMBOL 'triangle' names in the mapfile should be quoted. -Steve gerard barrington wrote: > Just like to thank Bart for his quick reply to an earlier post. > > Here's another question for the group. In my map file i have this class > definition: > > CLASS > STYLE > COLOR 0 0 0 > SIZE 1 > SYMBOL triangle > END > END > > and in my symbol file I have: > > SYMBOL > NAME 'triangle' > TYPE VECTOR > FILLED TRUE > POINTS > 0 1 > 1 0 > 1 1 > 0 1 > END > END > > but i get an error on the 'SYMBOL triangle' line of my map file. > However, when i replace 'triangle' with another symbol in my .sym file, > the line shows perfect. > > Is there something wrong with my triangle symbol definition? > > cheers! > > Gerard B > From aritterbusch at YAHOO.COM Wed Apr 13 06:55:30 2005 From: aritterbusch at YAHOO.COM (Andreas Ritterbusch) Date: Wed, 13 Apr 2005 06:55:30 -0700 Subject: Still on Example 1.9 --same here! In-Reply-To: <20050413112812.98058.qmail@web52309.mail.yahoo.com> Message-ID: Hi: Not to hi-jack Lawal's thread too much... but I got the exact same problem (and I'm sure this has come up in the past, but unfortunately I can't get into the archives). In other words, if someone answers Lawal's question, he/she would make more than one new UMNer very, very happy. Having said that, I now allow myself to include my .html file and .map file (both clipped to save some bandwidth). Note that I ended up using full paths, since nothing made this thing work. I use Windows. All my static maps work fine and it's just a path problem that I can't seem to figure out. First the .MAP file: MAP NAME EX1.9_ IMAGETYPE PNG24 EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514 # LAEA #EXTENT -97.5 41.619778 -82.122902 49.38562 # Geographic SIZE 400 300 SHAPEPATH "C:/ms4w/Apache/htdocs/tutorial/data" SYMBOLSET "C:/ms4w/Apache/htdocs/tutorial/symbols/symbols35.sym" FONTSET "C:/ms4w/Apache/htdocs/tutorial/fonts/fonts.list" WEB TEMPLATE 'C:/ms4w/Apache/htdocs/tutorial/example1-9.html' IMAGEURL '/tmp/' IMAGEPATH 'C:/ms4w/Apache/htdocs/tutorial/tmp/' #IMAGEURL 'http://localhost/tmp/' #IMAGEPATH '/data/tmp/' END PROJECTION # "proj=laea" # "ellps=clrk66" # "lat_0=45" # "lon_0=-100" # # Alternatively, you can specify an EPSG code. "init=epsg:2163" # END ...etc...etc...etc... Now the .HTML file: MapServer 4.0 Tutorial

MapServer Tutorial:
Example 1.8

The map above was created in "map" mode. It is a static map.

...etc...etc...etc... Thanks a lot in advance, Andreas. __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From gerard_b_18 at HOTMAIL.COM Wed Apr 13 07:35:33 2005 From: gerard_b_18 at HOTMAIL.COM (gerard barrington) Date: Wed, 13 Apr 2005 12:05:33 -0230 Subject: problem with .sym definition In-Reply-To: <425D1B55.4090408@swoodbridge.com> Message-ID: An HTML attachment was scrubbed... URL: From kgrootendorst at BAIRD.COM Wed Apr 13 08:44:33 2005 From: kgrootendorst at BAIRD.COM (Kevin Grootendorst) Date: Wed, 13 Apr 2005 10:44:33 -0500 Subject: Projection problem after upgrade from 4.2 to 4.4 Message-ID: I just recently upgraded from: MS 4.2 and PHP 4.3.4 to MS 4.4 and PHP 4.3.7. I also upgraded to Proj 4.4.9 The application (built using MapLab 2.2) was running smoothly before the upgrade, but now I'm presented with the error: PHP Fatal error: [MapServer Error]: msProcessProjection(): projection not named in C:\web\maplab-2.2 \projects\gmf_apps\GreatLakes\wrapper\map_session.php on line 845 Line 845 is: $this->oMap->setprojection(implode( "\n", split( " ", $aszKeys ["SRS"] ) )); My original projection info in the map file was: PROJECTION #"init=epsg:4269" #NAD 83 "SRS=epsg:4269" #NAD 83 END If I use "init=epsg:4269", then the app loads but no map is ever displayed. If I comment out both, then everything works fine (all data is in NAD 83). However, I may want to reproject on the fly later on. My epsg file contains the parameters for NAD 83. Can anybody shed some light on this? Thanks, Kevin From kgeurts at GIS.UMN.EDU Wed Apr 13 09:18:33 2005 From: kgeurts at GIS.UMN.EDU (Kari Geurts) Date: Wed, 13 Apr 2005 11:18:33 -0500 Subject: Important - OpenSource GeoSpatial '05' Conference- Early Registration deadline In-Reply-To: Message-ID: Hello MapServer Community, Early bird registration for the OpenSource GeoSpatial '05' Conference ends at 00:01 AM Mountain Time on the morning of April 15th. At this moment, the regular registration rate of $225.00 will go into effect. For more information about the conference please visit the website at http://mapserver.gis.umn.edu/mum/mtg2005.html The workshop seats are filling up fast and the Post GIS workshop is full! We encourage you to register now to get the workshop of your choice. The following are the number of reserved seats for each of the workshops as of 4/13/05: *Half Day AM * PostGIS Full ? no more registrations accepted GRASS GIS 16 of 30 seats reserved MapServer 17 of 30 seats reserved OpenMap 4 of 30 seats reserved *Half Day PM * Chameleon 7 of 30 seats reserved OSSIM 8 of 30 seats reserved OGC Protocols 20 of 30 seats reserved Python GIS Hacks 25 of 30 seats reserved See you all at the conference, Kari -- Kari A. Geurts GIS and Remote Sensing Laboratory Department of Forest Resources University of Minnesota 1530 Cleveland Ave N. St. Paul, MN. 55108 Phone: 612-624-3459 Fax: 612-625-5212 From williampaul28 at YAHOO.COM Wed Apr 13 09:41:17 2005 From: williampaul28 at YAHOO.COM (william paul) Date: Wed, 13 Apr 2005 09:41:17 -0700 Subject: print page Message-ID: Hi, I want to create a print page which contain the image from Mapsever window and the legend, but I don't know how can I do this. Can any give me some help. I use javascript, mapserver 4.4.1 with IIS 6 si Windows 2003. Thank you in advance William --------------------------------- Do you Yahoo!? Yahoo! Small Business - Try our new resources site! -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.rasinmaki at HELSINKI.FI Thu Apr 14 10:38:14 2005 From: jussi.rasinmaki at HELSINKI.FI (=?iso-8859-1?Q?Jussi_Rasinm=E4ki?=) Date: Thu, 14 Apr 2005 20:38:14 +0300 Subject: Mapserver & Oracle: WMS request works, but plain mode=map request doesn't Message-ID: Hi all, I've got a map file that uses Oracle as data source (see below) The following request produces a blank page: http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/testi/testi2.map&mode=map but this one http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/testi/testi2.map&request=map&layers=maa&bbox=2499999,6849999,2530000,6870000&version=1.1.0&format=png&width=500&height=500 returns what it is supposed to. Why? Cheers, Jussi Rasinm?ki ============== MAP IMAGETYPE PNG EXTENT 2499999 6849999 2530000 6870000 SIZE 400 300 IMAGECOLOR 255 255 255 PROJECTION "init=epsg:2392" END # Start of LAYER DEFINITIONS --------------------------------------------- LAYER NAME maa TYPE POLYGON CONNECTIONTYPE ORACLESPATIAL CONNECTION "usr/psw at sid" DATA "GEOLOC FROM MAA USING SRID 294913" DUMP TRUE CLASS OUTLINECOLOR 0 0 0 COLOR 0 128 128 END PROJECTION "init=epsg:2392" END END # Maa polygon layer ends here # End of LAYER DEFINITIONS ------------------------------- END # end of map file/object From stigmata_blackangel at YAHOO.COM Wed Apr 13 10:54:08 2005 From: stigmata_blackangel at YAHOO.COM (Gregor Mosheh) Date: Wed, 13 Apr 2005 10:54:08 -0700 Subject: fastcgi, lacking performance over standard cgi In-Reply-To: 6667 Message-ID: --- Frank Warmerdam wrote: > I would add that to convince MapServer to "hold > open" a database connection you need to tell it to > do so. ... > PROCESSING "CLOSE_CONNECTION=DEFER" Nice. That did the trick. Thank you, Frank. For most of the map, the speedup is modest but measurable. For one particular view, though, it reduces the generation time from 15 seconds to <5 seconds. Mileage varies. What is the algorithm for keeping those DB connections persistent? Do they get closed automatically after a set period or number of connections? Do I need to worry about maxing out my DB's allowed connections? Say, the documentation on the PROCESSING keyword is rather sparse. What exactly does the CLOSE_CONNECTION=DEFER flag do in a non-fcgi environment? Does the data source stay open until the end of the mapserv.cgi execution, and save the overhead of opening/closing a data source that would be used in multiple layers? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From bartvde at XS4ALL.NL Wed Apr 13 10:49:31 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Wed, 13 Apr 2005 19:49:31 +0200 Subject: Mapserver & Oracle: WMS request works, but plain mode=map request doesn't In-Reply-To: <002301c54118$bc8dfe50$e7abe754@hyytiala.helsinki.fi> Message-ID: Hi, Can you try defining STATUS DEFAULT at your LAYER? Best regards, Bart On Thu, 14 Apr 2005 20:38:14 +0300, Jussi Rasinm?ki wrote: > Hi all, > > I've got a map file that uses Oracle as data source (see below) > The following request produces a blank page: > http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/testi/testi2.map&mode=map > but this one > http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/testi/testi2.map&request=map&layers=maa&bbox=2499999,6849999,2530000,6870000&version=1.1.0&format=png&width=500&height=500 > returns what it is supposed to. > > Why? > > Cheers, > > Jussi Rasinm?ki > > ============== > MAP > IMAGETYPE PNG > EXTENT 2499999 6849999 2530000 6870000 > SIZE 400 300 > IMAGECOLOR 255 255 255 > > PROJECTION > "init=epsg:2392" > END > > # Start of LAYER DEFINITIONS > --------------------------------------------- > LAYER > NAME maa > TYPE POLYGON > CONNECTIONTYPE ORACLESPATIAL > CONNECTION "usr/psw at sid" > DATA "GEOLOC FROM MAA USING SRID 294913" > DUMP TRUE > CLASS > OUTLINECOLOR 0 0 0 > COLOR 0 128 128 > END > PROJECTION > "init=epsg:2392" > END > END # Maa polygon layer ends here > # End of LAYER DEFINITIONS ------------------------------- > END # end of map file/object > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From stigmata_blackangel at YAHOO.COM Wed Apr 13 10:59:27 2005 From: stigmata_blackangel at YAHOO.COM (Gregor Mosheh) Date: Wed, 13 Apr 2005 10:59:27 -0700 Subject: print page In-Reply-To: 6667 Message-ID: --- william paul wrote: > I want to create a print page which contain the > image from Mapsever window and the legend, but I > don't know how can I do this. We use PDF output via PHP/MapScript to accomplish this. The following PHP/MapScript program does something close to what you want. Credits: Matthew Perry, and mods by me $mapfile = $_REQUEST['map']; $fontfile = '/usr/local/apache/hostgis/dev/mwc-lib/arial.ttf'; // 828 and 576 are the x/y of the pdf document.. should be the same as 11.5 x 8 in // at 72 pixels per inch $pdf = pdf_new(); if (!pdf_open_file($pdf)) {echo "PDF Doesn't work"; } pdf_begin_page($pdf, 828, 576); //Set font pdf_set_parameter($pdf, "FontOutline", "Arial=$fontfile"); $font = pdf_findfont($pdf, "Arial", "host", 1); pdf_setfont($pdf, $font , 24); // Load the mapfile $map = ms_newMapObj($mapfile); // Read optional CGI vars if ($_REQUEST['mapext']) { $mapext = $_REQUEST['mapext']; $extent = explode(" ", $mapext); //echo "$extent[0], $extent[1], $extent[2], $extent[3]"; $map->setExtent($extent[0], $extent[1], $extent[2], $extent[3]); } if (isset($_REQUEST['layers'])) { $layerlist = $_REQUEST['layers']; $layer = explode(" ", $layerlist); //turn off all layers 1st $numLayers = $map->numlayers; for ($i = 0; $i < $numLayers; $i++) { $activeLayer = $map->getlayer($i); $activeLayer->set("status", 0); } // Turn on all given layers foreach ($layer as $l) { $activeLayer = $map->getlayerbyname($l); $activeLayer->set("status", 1); } } $map->set("width", 1230); $map->set("height", 1000); // *** Generate map images, and autodetect their image type so they can be loaded into the PDF $imgMap = $map->draw(); $imgLegend = $map->drawLegend(); $imgScalebar = $map->drawScaleBar(); $imgReferenceMap = $map->reference->status ? $map->drawReferenceMap() : false; $urlMap = $imgMap->saveWebImage(); $urlLegend = $imgLegend->saveWebImage(); $urlScalebar = $imgScalebar->saveWebImage(); $urlReferenceMap = $imgReferenceMap ? $imgReferenceMap->saveWebImage() : false; // figure out the file extension for the generated images $fileextensions = array( 'jpg' => 'jpeg', 'jpeg' => 'jpeg', 'tif' => 'tiff', 'tiff' => 'tiff', 'gif' => 'gif', 'png' => 'png', ); $extMap = $fileextensions[ array_pop(explode('.', basename($urlMap))) ]; $extLegend = $fileextensions[ array_pop(explode('.', basename($urlLegend))) ]; $extScalebar = $fileextensions[ array_pop(explode('.', basename($urlScalebar))) ]; $extReferenceMap = @$fileextensions[ array_pop(explode('.', basename($urlReferenceMap))) ]; // Filename $filePrefix = $map->name; // *** Add images to pdf document $element = pdf_open_image_file($pdf, $extMap, $htdocs."/$urlMap"); pdf_place_image($pdf, $element, 200, 30, 0.5); // 120, 25, .8 => xoffset, yoffset, size_factor (offsets refer to bottom left corner of the image) pdf_close_image($pdf, $element); $element = pdf_open_image_file($pdf, $extLegend, $htdocs."/$urlLegend"); pdf_place_image($pdf, $element, 10, 200, 1); pdf_close_image($pdf, $element); $element = pdf_open_image_file($pdf, $extScalebar, $htdocs."/$urlScalebar"); pdf_place_image($pdf, $element, 600, 1, 1); pdf_close_image($pdf, $element); if ($imgReferenceMap) { $element = pdf_open_image_file($pdf, $extReferenceMap, $htdocs."/$urlReferenceMap"); pdf_place_image($pdf, $element, 10, 400, 1); pdf_close_image($pdf, $element); } //Add Title pdf_show_xy($pdf, $map->name, 10, 540); // Add Date pdf_setfont($pdf, $font , 14); $date = getdate(); $dateStr = $date['mon'] . "/" . $date['mday'] . "/" . $date['year']; pdf_show_xy($pdf, $dateStr, 650, 538); //Add disclaimer pdf_setfont($pdf, $font , 10); $disclaimer = "Map generated by PHP/Mapscript 4.0 with pdflib."; pdf_show_xy($pdf, $disclaimer, 2, 4); // Close out pdf file pdf_end_page($pdf); pdf_close($pdf); // *** Send the pdf file back to the web browser $data = pdf_get_buffer($pdf); header("Cache-control: private"); header("Pragma: public"); header("Content-type: application/x-unknown"); header("Content-disposition: attachment; filename=$filePrefix.pdf"); header("Content-length: " . strlen($data)); print $data; __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jussi.rasinmaki at HELSINKI.FI Thu Apr 14 11:03:18 2005 From: jussi.rasinmaki at HELSINKI.FI (=?ISO-8859-15?Q?Jussi_Rasinm=E4ki?=) Date: Thu, 14 Apr 2005 21:03:18 +0300 Subject: Mapserver & Oracle: WMS request works, but plain mode=map request doesn't Message-ID: Hi, Indeed..., problem solved. Thanks, Jussi ----- Original Message ----- From: "Bart van den Eijnden" To: "Jussi Rasinm?ki" ; Sent: Wednesday, April 13, 2005 8:49 PM Subject: Re: [UMN_MAPSERVER-USERS] Mapserver & Oracle: WMS request works, but plain mode=map request doesn't > Hi, > > Can you try defining STATUS DEFAULT at your LAYER? > > Best regards, > Bart > > On Thu, 14 Apr 2005 20:38:14 +0300, Jussi Rasinm?ki > wrote: > >> Hi all, >> >> I've got a map file that uses Oracle as data source (see below) >> The following request produces a blank page: >> http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/testi/testi2.map&mode=map >> but this one >> http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/testi/testi2.map&request=map&layers=maa&bbox=2499999,6849999,2530000,6870000&version=1.1.0&format=png&width=500&height=500 >> returns what it is supposed to. >> >> Why? >> >> Cheers, >> >> Jussi Rasinm?ki >> >> ============== >> MAP >> IMAGETYPE PNG >> EXTENT 2499999 6849999 2530000 6870000 >> SIZE 400 300 >> IMAGECOLOR 255 255 255 >> >> PROJECTION >> "init=epsg:2392" >> END >> >> # Start of LAYER >> EFINITIONS --------------------------------------------- >> LAYER >> NAME maa >> TYPE POLYGON >> CONNECTIONTYPE ORACLESPATIAL >> CONNECTION "usr/psw at sid" >> DATA "GEOLOC FROM MAA USING SRID 294913" >> DUMP TRUE >> CLASS >> OUTLINECOLOR 0 0 0 >> COLOR 0 128 128 >> END >> PROJECTION >> "init=epsg:2392" >> END >> END # Maa polygon layer ends here >> # End of LAYER DEFINITIONS ------------------------------- >> END # end of map file/object >> > > > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > From bartvde at XS4ALL.NL Wed Apr 13 11:20:44 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Wed, 13 Apr 2005 20:20:44 +0200 Subject: Mapserver & Oracle: WMS request works, but plain mode=map request doesn't In-Reply-To: <003501c5411c$3d08be00$e7abe754@hyytiala.helsinki.fi> Message-ID: Hi, Not completely, I just realized STATUS DEFAULT is probably not what you want for WMS (since with a WMS you can turn layers on or off, and with status default a layer is always on). This is okay for copyright notices, but not for most layers. So a better solution is: http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/testi/testi2.map&mode=map&layers=maa Best regards, Bart On Thu, 14 Apr 2005 21:03:18 +0300, Jussi Rasinm?ki wrote: > Hi, > > Indeed..., problem solved. > > Thanks, > > Jussi > > ----- Original Message ----- > From: "Bart van den Eijnden" > To: "Jussi Rasinm?ki" ; > > Sent: Wednesday, April 13, 2005 8:49 PM > Subject: Re: [UMN_MAPSERVER-USERS] Mapserver & Oracle: WMS request works, > but plain mode=map request doesn't > > >> Hi, >> >> Can you try defining STATUS DEFAULT at your LAYER? >> >> Best regards, >> Bart >> >> On Thu, 14 Apr 2005 20:38:14 +0300, Jussi Rasinm?ki >> wrote: >> >>> Hi all, >>> >>> I've got a map file that uses Oracle as data source (see below) >>> The following request produces a blank page: >>> http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/testi/testi2.map&mode=map >>> but this one >>> http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/testi/testi2.map&request=map&layers=maa&bbox=2499999,6849999,2530000,6870000&version=1.1.0&format=png&width=500&height=500 >>> returns what it is supposed to. >>> >>> Why? >>> >>> Cheers, >>> >>> Jussi Rasinm?ki >>> >>> ============== >>> MAP >>> IMAGETYPE PNG >>> EXTENT 2499999 6849999 2530000 6870000 >>> SIZE 400 300 >>> IMAGECOLOR 255 255 255 >>> >>> PROJECTION >>> "init=epsg:2392" >>> END >>> >>> # Start of LAYER >>> EFINITIONS --------------------------------------------- >>> LAYER >>> NAME maa >>> TYPE POLYGON >>> CONNECTIONTYPE ORACLESPATIAL >>> CONNECTION "usr/psw at sid" >>> DATA "GEOLOC FROM MAA USING SRID 294913" >>> DUMP TRUE >>> CLASS >>> OUTLINECOLOR 0 0 0 >>> COLOR 0 128 128 >>> END >>> PROJECTION >>> "init=epsg:2392" >>> END >>> END # Maa polygon layer ends here >>> # End of LAYER DEFINITIONS ------------------------------- >>> END # end of map file/object >>> >> >> >> >> -- >> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ >> > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From gerard_b_18 at HOTMAIL.COM Wed Apr 13 11:34:39 2005 From: gerard_b_18 at HOTMAIL.COM (gerard barrington) Date: Wed, 13 Apr 2005 16:04:39 -0230 Subject: shapefile polygon opens in arcgis but not mapserver In-Reply-To: <003501c5411c$3d08be00$e7abe754@hyytiala.helsinki.fi> Message-ID: An HTML attachment was scrubbed... URL: From bartvde at XS4ALL.NL Wed Apr 13 11:32:42 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Wed, 13 Apr 2005 20:32:42 +0200 Subject: shapefile polygon opens in arcgis but not mapserver In-Reply-To: Message-ID: Hi, are you sure it is not a polyline shape? Did you try TYPE LINE? Otherwise open it up with ogrinfo and see what it says (http://fwtools.maptools.org). Best regards, Bart On Wed, 13 Apr 2005 16:04:39 -0230, gerard barrington wrote: > Hi list, I have a polygon shapefile which I can open and view in > ArcExplorer and everything looks perfect. However, when I try to use the > same shapefile as data for a LAYER of TYPE POLYGON, I get the following > exception: msDrawMap(): Image handling error. Failed to draw layer named > 'aal135'. msDrawShape(): General error message. Only polygon shapes can > be drawn using a POLYGON layer definition. So I tried switching the TYPE > in my layer to POINT and a couple of points along the border of the > polygon showed up. I know the shapefile is a polygon though because it > displays as the correct shape in arcExplorer. Can someone tell me why > the polygon will show up in ArcExplorer but not in mapserver? Is there > anything I can do to fix this problem?? I am at real loss here for why > this happens and would really appreciate any help.... Thanks Gerard B -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From toomas.aas at RAAD.TARTU.EE Wed Apr 13 11:36:23 2005 From: toomas.aas at RAAD.TARTU.EE (Toomas Aas) Date: Wed, 13 Apr 2005 21:36:23 +0300 Subject: Segmentation fault: PHP Mapscript related? In-Reply-To: <1f2e23be050412171752741934@mail.gmail.com> Message-ID: BC Rocks wrote: > PHP was configured as follows (as I am successfully using on another > box): ./configure --build=i686-mandrake-linux-gnu --prefix=/usr > --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin > --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include > --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var/lib > --sharedstatedir=/usr/com --mandir=/usr/share/man > --infodir=/usr/share/info --enable-discard-path > --enable-force-cgi-redirect --enable-shared --disable-static > --disable-debug --disable-rpath --enable-pic > --enable-inline-optimization --enable-memory-limit > --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php > --with-pear=/usr/share/pear --enable-magic-quotes --enable-debugger > --enable-track-vars --with-exec-dir=/usr/bin --with-versioning > --with-mod_charset --with-regex=php --enable-track-vars > --enable-trans-sid --enable-safe-mode --enable-ctype --enable-ftp > --with-gettext=/usr --enable-posix --enable-session --enable-sysvsem > --enable-sysvshm --enable-yp --with-openssl=/usr --without-kerberos > --with-ttf --with-freetype-dir=/usr/include/freetype2 > --with-zlib=/usr --with-zlib=/usr --with-zlib-dir=/usr --with-pear > --with-jpeg-dir=/usr --with-png-dir=/usr --with-gd > --enable-gd-native-ttf --with-pgsql=/var/lib/pgsql/ --without-iodbc > --without-custom-odbc --without-unixODBC --without-dbmaker > --enable-soap --with-xml=/usr/include/libxml2/libxml > --with-apxs2=/usr/sbin/apxs2 --with-mcrypt=/usr/local/lib > --with-curl=/usr/local/include > > Mapserver configure parameters are as follows: ./configure > --with-php=/usr/include/php > --with-php-regex-dir=/usr/src/php/php-5.0.4/regex > --with-jpeg=/usr/lib --with-png=/usr/lib > --with-freetype=/usr/bin/freetype-config --with-proj --with-gd > --without-pdf --with-geos=/usr/local/bin/geos-config --with-gdal > --with-postgis=/var/lib/pgsql/bin/pg_config --without-tiff > --with-wmsclient --with-wfsclient --with-wcs > --with-curl-config=/usr/bin --with-ogr --with-httpd=/usr/sbin/httpd2 I notice that you have used --with-gd both when compiling PHP and Mapserver. Actually, you should use something like --with-gd=/usr when compiling PHP. Otherwise PHP gets compiled with it's bundled version of GD, and php_mapscript.so gets compiled with whatever version of GD is found at build time. If these versions don't match exactly, nasty things can happen. Substitute the real path where GD is installed instead of /usr, of course. To be really sure, use the same path when compiling Mapserver. If you have only one version of GD installed on your system, it shouldn't matter, but better safe than sorry. > I read some threads with regard to GDAL and JPG/TIFF issues (I did > try using the internal GDAL libs), but I don't think that is the > issue... especially since if I pull the php, things compile. This seems a likely indication of conflicting GD versions between PHP and Mapserver. -- Toomas From gerard_b_18 at HOTMAIL.COM Wed Apr 13 12:15:50 2005 From: gerard_b_18 at HOTMAIL.COM (gerard barrington) Date: Wed, 13 Apr 2005 16:45:50 -0230 Subject: shapefile polygon opens in arcgis but not mapserver In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From bartvde at XS4ALL.NL Wed Apr 13 12:18:12 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Wed, 13 Apr 2005 21:18:12 +0200 Subject: shapefile polygon opens in arcgis but not mapserver In-Reply-To: Message-ID: Hi, It should work if you are using Mapserver 4.4 or later. Otherwise try showing it through OGR. CONNECTIONTYPE OGR CONNECTION "path/my.shp" Best regards, Bart On Wed, 13 Apr 2005 16:45:50 -0230, gerard barrington wrote: > I checked with ogrinfo and the shapefile is a <3D POLYGON>. Other shape > files I have show up simply as when checked with ogrinfo. Is > there anything i can do to show this polygon in mapserver? > >> From: Bart van den Eijnden > >> Reply-To: Bart van den Eijnden > >> To: MAPSERVER-USERS at LISTS.UMN.EDU > >> Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in arcgis >> but not > mapserver >> Date: Wed, 13 Apr 2005 20:32:42 +0200 > >> > >> Hi, > >> > >> are you sure it is not a polyline shape? Did you try TYPE LINE? > >> > >> Otherwise open it up with ogrinfo and see what it says > >> (http://fwtools.maptools.org). > >> > >> Best regards, > >> Bart > >> > >> On Wed, 13 Apr 2005 16:04:39 -0230, gerard barrington > >> wrote: > >> > >>> Hi list, I have a polygon shapefile which I can open and view in > >>> ArcExplorer and everything looks perfect. However, when I try to > >>> use the > >>> same shapefile as data for a LAYER of TYPE POLYGON, I get the > >>> following > >>> exception: msDrawMap(): Image handling error. Failed to draw layer > >>> named > >>> 'aal135'. msDrawShape(): General error message. Only polygon shapes > >>> can > >>> be drawn using a POLYGON layer definition. So I tried switching the > >>> TYPE > >>> in my layer to POINT and a couple of points along the border of the > >>> polygon showed up. I know the shapefile is a polygon though because > >>> it > >>> displays as the correct shape in arcExplorer. Can someone tell me > >>> why > >>> the polygon will show up in ArcExplorer but not in mapserver? Is > >>> there > >>> anything I can do to fix this problem?? I am at real loss here for > >>> why > >>> this happens and would really appreciate any help.... Thanks Gerard > >>> B > >> > >> > >> > >> -- > >> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From nacional at CBS.UMN.EDU Wed Apr 13 12:52:42 2005 From: nacional at CBS.UMN.EDU (Pericles S. Nacionales) Date: Wed, 13 Apr 2005 14:52:42 -0500 Subject: Still on Example 1.9 In-Reply-To: <20050413112812.98058.qmail@web52309.mail.yahoo.com> Message-ID: OK, let me butt in on this. First, I have to make many assumptions as I don't know if you change any of the directory structure of the tutorial. I'm assuming you didn't and that you unzipped it under "/ms4w/apps". This would give you a directory "/ms4w/apps/tutorial" and everything will be set there save the Apache configuration. My second assumption is that you have created an "httpd_tutorial.conf" Apache config file in "/ms4w/httpd.d" and that this file contains something like: Alias /tutorial "/ms4w/apps/tutorial" AllowOverride None Options Indexes MultiViews Order allow,deny Allow from all If you haven't read the README_HTTPD.txt under /ms4w/httpd.d, you should do so. The last assumption I'll make is that you didn't change the MS4W temp directory so that it's still under /ms4w/tmp/ms_tmp. OK then, have a look at your IMAGEPATH and IMAGEURL parameters... Your IMAGEPATH should point to "/ms4w/tmp/ms_tmp/"--that's your local path. Your IMAGEURL then should point to "/ms_tmp/"--that's how it's referenced in an HTTP url (the Alias in Apache). These paths should be explained in MS4W README somewhere in your installation. It's also explained in the WMS example (example 1.6?). Finally, you have your SHAPEPATH pointing to "/ms4w/httpd.d/tutorial/data". Did you install the tutorial in the httpd.d directory? If so, you might want to move the whole tutorial to "/ms4w/apps"--that's where your MapServer applications are supposed to be. You can then edit your httpd_tutorial.conf to have the lines I have above. This is just something to follow to keep your MS4W installation clean. I hope this helps. Good luck! Perry On Wednesday 13 April 2005 06:28 am, Lawal Olanrewaju wrote: > The mapfile is as found below > ------------- > MAP > NAME EX1.9_ > IMAGETYPE PNG24 > EXTENT 201621.496941 -294488.285333 > 1425518.020722 498254.511514 # LAEA > #EXTENT -97.5 41.619778 -82.122902 49.38562 # > Geographic > SIZE 400 300 > SHAPEPATH "\ms4w\httpd.d\tutorial\data" > SYMBOLSET "symbols/symbols35.sym" > FONTSET "fonts/fonts.list" > > WEB > TEMPLATE 'example1-9.html' > IMAGEPATH '/data/tmp/' > IMAGEURL '/tmp/' > END > > PROJECTION > # "proj=laea" > # "ellps=clrk66" > # "lat_0=45" > # "lon_0=-100" > # > # Alternatively, you can specify an EPSG code. > "init=epsg:2163" > # > END > > # Start of LAYER DEFINITIONS > --------------------------------------------- > LAYER # States polygon layer begins here > NAME states > DATA states_ugl > STATUS OFF > TYPE POLYGON > > PROJECTION > "init=epsg:4326" > END > > CLASSITEM "CLASS" > CLASS > EXPRESSION 'land' > SYMBOL 0 > COLOR 232 232 232 > END > END # States polygon layer ends here > > LAYER # MODIS raster layer begins here > NAME modis > DATA "raster/mod09a12003161_ugl_ll_8bit.tif" > STATUS DEFAULT > TYPE RASTER > PROCESSING "BANDS=1,2,3" > OFFSITE 71 74 65 > > PROJECTION > "init=epsg:4326" > END > END # MODIS raster layer ends here > > LAYER # LandSat WMS map from JPL (or from USGS) > NAME LandSat > TYPE RASTER > OFFSITE 0 0 0 > STATUS OFF > CONNECTIONTYPE WMS > #CONNECTION > "http://wms.jpl.nasa.gov/wms.cgi?REQUEST=map&LAYERS=us_landsat7&STYLES=&FOR >MAT=png&TRANSPARENT=true" CONNECTION > "http://gisdata.usgs.net/servlet/com.esri.wms.Esrimap?ServiceName=USGS_WMS_ >LANDSAT7&VERSION=1.0.0&REQUEST=map&Layers=LANDSAT7&SRS=EPSG:4326&REASPECT=fa >lse&Format=png&" > > METADATA > "wms_title" "LandSat" > "wms_name" "us_landsat7" > "wms_server_version" "1.0.0" > "wms_srs" "epsg:4326" > "wms_format" "image/png" > #"wms_title" "US_Landsat7" > # "wms_srs" "epsg:4326" > # "wms_connectiontimeout" "1000" > END > > PROJECTION > "init=epsg:4326" > END > END # LandSat WMS image ends here > > LAYER # States line layer begins here > NAME states > DATA states_ugl > STATUS DEFAULT > TYPE LINE > > PROJECTION > "init=epsg:4326" > END > > CLASSITEM "CLASS" > CLASS > EXPRESSION 'land' > SYMBOL 'line5' > COLOR 64 64 64 > SIZE 1 > END > END # States line layer ends here > > LAYER # States label layer begins here > NAME states > DATA states_ugl > STATUS DEFAULT > TYPE ANNOTATION > > PROJECTION > "init=epsg:4326" > END > > CLASSITEM "CLASS" > LABELITEM "STATE" > CLASS > EXPRESSION 'land' > COLOR -1 -1 -1 > LABEL > COLOR 255 255 255 > TYPE TRUETYPE > FONT arial-bold > SIZE 12 > ANTIALIAS FALSE > POSITION CL > PARTIALS FALSE > MINDISTANCE 300 > BUFFER 4 > END # end of label > END # end of class > END # States label layer ends here > # End of LAYER DEFINITIONS > ------------------------------- > > END # end of map file > > --- Ferencik Ioan wrote: > > The problem could be your IMAGEPATH and IMAGEURL > > properties from the WEB object > > try to send the map file in message > > > > > Hi Everyone > > > I am new to Mapserver and I have just downloaded > > > > the > > > > > Tutorial (Mapserver 4.0) > > > I could see the static map but not the dynamic > > > > one, > > > > > there was 'Submit query' displayed in the box > > > > where > > > > > the dynamic map was suppose to be displayed. > > > I have a feeling the mapfil is alright since I was > > > able to see the static map but I could not figure > > > > out > > > > > what was wrong with the html file. > > > I hope someone can help me out. > > > Best regards > > > > > > Olanrewaju Lawal > > > Institute for Soil Science and Land Evaluation > > > > (310) > > > > > University of Hohenheim > > > 70599, Stuttgart > > > Germany > > > Office. +497114593633 > > > Mob. +491632677964 > > > Webpage: http://larrylaw1.tripod.com/index.htm > > > > > > > > > > > > > > > > > > Send instant messages to your online friends > > > > http://uk.messenger.yahoo.com > > > > > > > > > > > > _____________________________________________ > > Cinefil?Castiga o excursie la Venetia > > http://www.cineplus.ro/concurs > > Send instant messages to your online friends http://uk.messenger.yahoo.com -- Pericles S. Nacionales Dept. of Ecology, Evolution, and Behavior University of Minnesota work: 612 624 6713 e-mail: nacional at cbs.umn.edu From jalfarid at GMAIL.COM Wed Apr 13 12:47:17 2005 From: jalfarid at GMAIL.COM (Farid Vakilzadeh) Date: Wed, 13 Apr 2005 15:47:17 -0400 Subject: Question about using tile index Message-ID: Hi, I want to use tile index files in mapserver. I have several geo referenced raster files( .tif ) and I made a shape file by using GDAL "gdaltindex" utility. Then I put some related lines in map file but I can not see my raster file. Does any one have a map file sample in this field to help me? Thanks Farid From bcrocks at GMAIL.COM Wed Apr 13 13:28:54 2005 From: bcrocks at GMAIL.COM (BC Rocks) Date: Wed, 13 Apr 2005 14:28:54 -0600 Subject: Segmentation fault: PHP Mapscript related? In-Reply-To: <425D66A7.8060001@raad.tartu.ee> Message-ID: Thanks Toomas, I tried what you suggested: PHP and Mapserver are explicitly using --with-gd=/usr/local but I still segfault. I even tried compiling PHP with no GD support, but no luck (segfault). FYI, I did have 2 versions of GD installed, but I uninstalled one and am left with gd-2.0.33. Still segfaulting BTW, here is my GDAL config (just in case there are other blatent conflicting libraries I am overlooking): ./configure --enable-shared --with-png=/usr/lib --with-jpeg=/usr/lib --with-pg=/var/lib/pgsql/bin/pg_config --with-geos=yes --with-libtiff=/usr/local/lib --with-geotiff=yes --with-ecw=yes (ecw did not work) Any other thoughts? Thanks, BC On 4/13/05, Toomas Aas wrote: > BC Rocks wrote: > > > PHP was configured as follows (as I am successfully using on another > > box): ./configure --build=i686-mandrake-linux-gnu --prefix=/usr > > --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin > > --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include > > --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var/lib > > --sharedstatedir=/usr/com --mandir=/usr/share/man > > --infodir=/usr/share/info --enable-discard-path > > --enable-force-cgi-redirect --enable-shared --disable-static > > --disable-debug --disable-rpath --enable-pic > > --enable-inline-optimization --enable-memory-limit > > --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php > > --with-pear=/usr/share/pear --enable-magic-quotes --enable-debugger > > --enable-track-vars --with-exec-dir=/usr/bin --with-versioning > > --with-mod_charset --with-regex=php --enable-track-vars > > --enable-trans-sid --enable-safe-mode --enable-ctype --enable-ftp > > --with-gettext=/usr --enable-posix --enable-session --enable-sysvsem > > --enable-sysvshm --enable-yp --with-openssl=/usr --without-kerberos > > --with-ttf --with-freetype-dir=/usr/include/freetype2 > > --with-zlib=/usr --with-zlib=/usr --with-zlib-dir=/usr --with-pear > > --with-jpeg-dir=/usr --with-png-dir=/usr --with-gd > > --enable-gd-native-ttf --with-pgsql=/var/lib/pgsql/ --without-iodbc > > --without-custom-odbc --without-unixODBC --without-dbmaker > > --enable-soap --with-xml=/usr/include/libxml2/libxml > > --with-apxs2=/usr/sbin/apxs2 --with-mcrypt=/usr/local/lib > > --with-curl=/usr/local/include > > > > Mapserver configure parameters are as follows: ./configure > > --with-php=/usr/include/php > > --with-php-regex-dir=/usr/src/php/php-5.0.4/regex > > --with-jpeg=/usr/lib --with-png=/usr/lib > > --with-freetype=/usr/bin/freetype-config --with-proj --with-gd > > --without-pdf --with-geos=/usr/local/bin/geos-config --with-gdal > > --with-postgis=/var/lib/pgsql/bin/pg_config --without-tiff > > --with-wmsclient --with-wfsclient --with-wcs > > --with-curl-config=/usr/bin --with-ogr --with-httpd=/usr/sbin/httpd2 > > I notice that you have used --with-gd both when compiling PHP and Mapserver. > > Actually, you should use something like --with-gd=/usr when compiling > PHP. Otherwise PHP gets compiled with it's bundled version of GD, and > php_mapscript.so gets compiled with whatever version of GD is found at > build time. If these versions don't match exactly, nasty things can happen. > > Substitute the real path where GD is installed instead of /usr, of course. > > To be really sure, use the same path when compiling Mapserver. If you > have only one version of GD installed on your system, it shouldn't > matter, but better safe than sorry. > > > I read some threads with regard to GDAL and JPG/TIFF issues (I did > > try using the internal GDAL libs), but I don't think that is the > > issue... especially since if I pull the php, things compile. > > This seems a likely indication of conflicting GD versions between PHP > and Mapserver. > > -- > Toomas > From nacional at CBS.UMN.EDU Wed Apr 13 13:49:35 2005 From: nacional at CBS.UMN.EDU (Pericles S. Nacionales) Date: Wed, 13 Apr 2005 15:49:35 -0500 Subject: Still on Example 1.9 --same here! In-Reply-To: <20050413135530.34352.qmail@web32015.mail.mud.yahoo.com> Message-ID: Hi, I just replied to Lawal's post and that reply should answer your issues as well. In your case, it looks like you installed the tutorial directly under "/ms4w/Apache/htdocs"--that's fine but you're missing an opportunity to learn more about Apache. ;) Anyway, I see that you created a temp directory under tutorial but you're pointing your IMAGEURL to "/tmp/"... It should point to "/tutorial/tmp/". This is really a web server issue--MapServer, when processing your mapfile, uses local paths (that's why you have SHAPEPATH, IMAGEPATH, and all other PATHs pointing to your local directories). However, after MapServer finishes processing the mapfile, the output images need to be referenced in web server terms--the resulting HTML file that the browser reads has to reference the location of your images in web server terms, not as local paths. You need to understand what your web root directory is and what an alias (or virtual directory) is as they become important for referencing MapServer generated images. So, IMAGEURL is really the web server alias for your IMAGEPATH and relative to your web root directory (which is "/ms4w/Apache/htdocs"), it is under "/tutorial/tmp/". This isn't an issue when using "mode=map" and when you're not using WMS or WFS layers. When you set "mode=map" you're telling MapServer to stream the image directly to the browser and forego writing images to a tmp directory. This is also why you didn't have an issue with the images until now (when you use "mode=browse"). I hope that clarify things up a little... (not quite like butter ;) -Perry On Wednesday 13 April 2005 08:55 am, Andreas Ritterbusch wrote: > Hi: Not to hi-jack Lawal's thread too much... but I got the > exact same problem (and I'm sure this has come up in the past, > but unfortunately I can't get into the archives). > > In other words, if someone answers Lawal's question, he/she > would make more than one new UMNer very, very happy. > > Having said that, I now allow myself to include my .html file > and .map file (both clipped to save some bandwidth). Note that I > ended up using full paths, since nothing made this thing work. I > use Windows. > > All my static maps work fine and it's just a path problem that I > can't seem to figure out. > > > > First the .MAP file: > > MAP > NAME EX1.9_ > IMAGETYPE PNG24 > EXTENT 201621.496941 -294488.285333 1425518.020722 > 498254.511514 # LAEA > #EXTENT -97.5 41.619778 -82.122902 49.38562 # Geographic > SIZE 400 300 > SHAPEPATH "C:/ms4w/Apache/htdocs/tutorial/data" > SYMBOLSET > "C:/ms4w/Apache/htdocs/tutorial/symbols/symbols35.sym" > FONTSET "C:/ms4w/Apache/htdocs/tutorial/fonts/fonts.list" > > WEB > TEMPLATE 'C:/ms4w/Apache/htdocs/tutorial/example1-9.html' > IMAGEURL '/tmp/' > IMAGEPATH 'C:/ms4w/Apache/htdocs/tutorial/tmp/' > #IMAGEURL 'http://localhost/tmp/' > #IMAGEPATH '/data/tmp/' > END > > PROJECTION > # "proj=laea" > # "ellps=clrk66" > # "lat_0=45" > # "lon_0=-100" > # > # Alternatively, you can specify an EPSG code. > "init=epsg:2163" > # > END > ...etc...etc...etc... > > > > > Now the .HTML file: > > > > MapServer 4.0 Tutorial > > > > > > > > [/leg_group_html] [leg_layer_html order_metadata=order opt_flag=12] [/leg_layer_html] i have accessed the legend in my template file with: Legenda
[legend]
but I see the [legend] text insted the legend can somebody tell me where I am wrong? thanks _____________________________________________ Cinefil?Castiga o excursie la Venetia http://www.cineplus.ro/concurs From BEN at SYNCERA-ITSOLUTIONS.NL Thu Apr 14 01:44:24 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Thu, 14 Apr 2005 10:44:24 +0200 Subject: Installation - phpmapscript and postgis Message-ID: Hi, if you will use the 4.4.2 release there will be no problem connecting to PostGIS 1.0 AFAIK. There was a fix around 4.4.2 (or 4.4.1) for supporting PostGIS 1.0. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Thevenon Fabrice 04/14/05 09:50am >>> Hi all, We are preparing a migration from phpmapscript 3.6 to phpmapscript 4.4. I also would like to use PostGis soon (I am waiting for PostGis 1.0). I work under WinXP and use the binaries from maptools.org and don't know very much about compiling source code. My question is : I download the phpmapscript_44.dll from maptools this morning (mapserver-4.4.2-win32-php4.3.11.zip). In a near future, the PostGis 1.0 version will be released (today, it is 1.0 RC6). Will the phpmapscript_44.dll still work with postgis 1.0 or will I need to download a new version of phpmapscript_44.dll, compiled with postgis 1.0? Thanks ! Fabrice From BEN at SYNCERA-ITSOLUTIONS.NL Thu Apr 14 01:49:53 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Thu, 14 Apr 2005 10:49:53 +0200 Subject: legend problems Message-ID: Hi, if you are using PHP you need to call a function processLegendTemplate, see the PHP Mapscript docs. If you are using Mapserver CGI, then you to use a mode=legend request to get the legend. See the Mapserver CGI docs. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Ferencik Ioan 04/14/05 10:43am >>> I am a little bit confused i have folowing map file MAP NAME "rosia" STATUS ON SHAPEPATH "date" SIZE 800 600 IMAGETYPE PNG24 IMAGECOLOR 255 255 255 EXTENT 319780 522564 385192 575568 PROJECTION "init=epsg:31700" END FONTSET "fonts/fonts.list" SYMBOLSET "simbol/simbol.sym" REFERENCE EXTENT 319780 522564 385192 575568 IMAGE "date/raster/dem.png" SIZE 100 100 STATUS ON COLOR -1 -1 -1 END LAYER NAME "DEM" DATA 'raster/demback.tif' TYPE RASTER PROJECTION "init=epsg:31700" END STATUS ON GROUP "Base" END LAYER NAME "Cadmium " DATA xysediment04 TYPE POINT PROJECTION "init=epsg:31700" END STATUS ON CLASS NAME "Cadmium normal" COLOR 32 79 240 #albastru SYMBOL "star" EXPRESSION ([CD_114] < 1) SIZE 10 END CLASS NAME "Cadmium plus" COLOR 240 11 16 #rosu SYMBOL "star" EXPRESSION ([CD_114] > 1) SIZE 10 END METADATA END END LAYER NAME "rivers" DATA retea TYPE LINE LABELITEM "DENUMIRE" PROJECTION "init=epsg:31700" END STATUS ON GROUP "Base" CLASS COLOR 35 57 214 NAME "riv" STYLE SIZE 50 SYMBOL "line1" END LABEL ANGLE AUTO BUFFER 10 COLOR 35 57 214 FONT "times-italic" TYPE TRUETYPE SIZE 8 OFFSET 5 5 END END METADATA order 1 END END LAYER NAME "aries" DATA aries TYPE LINE PROJECTION "init=epsg:31700" END STATUS ON CLASS COLOR 35 57 214 NAME "ARIES" STYLE SIZE 50 SYMBOL "line1" END END END SCALEBAR COLOR -1 -1 -1 SIZE 100 3 STYLE 1 STATUS ON IMAGECOLOR 255 255 255 INTERVALS 4 UNITS KILOMETERS END LEGEND IMAGECOLOR 255 255 255 OUTLINECOLOR 0 0 0 KEYSIZE 15 15 STATUS ON LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END TEMPLATE "legenda.html" END WEB TEMPLATE "rosia.html" IMAGEPATH "/ms4w/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" END END and my legend.html looks like this: [leg_group_html] [/leg_group_html] [leg_layer_html order_metadata=order opt_flag=12] [/leg_layer_html] i have accessed the legend in my template file with: Legenda
[legend]
but I see the [legend] text insted the legend can somebody tell me where I am wrong? thanks _____________________________________________ Cinefil?Castiga o excursie la Venetia http://www.cineplus.ro/concurs From BEN at SYNCERA-ITSOLUTIONS.NL Thu Apr 14 01:52:06 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Thu, 14 Apr 2005 10:52:06 +0200 Subject: Layer stacking Message-ID: Not that I know of for the MAP file. But ofcourse using WMS mode or PHP/Mapscript you can have control over this. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Blammo 04/14/05 06:50am >>> All, I'm looking for a way to control which layers display over which others. Is there a way to apply a hierarchy to the MAP file other than the order of the layer as it's read by MapServer? Thanks bobb From mercutio at POBOX.COM Thu Apr 14 02:45:03 2005 From: mercutio at POBOX.COM (Aaron Craig) Date: Thu, 14 Apr 2005 11:45:03 +0200 Subject: glibc error in queryByPoint call Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Here's some code: #!/usr/bin/perl use warnings; use strict; use mapscript; $| = 1; my $map = new mapscript::mapObj("/home/aaron/dev/OpenPortal/app/PortalData/confartigianato/Tag/MapServer/Sardegna.map") ~ || die("Couldn't make a mapscript::mapObj: "._GetMapscriptError()); my $lyr = $map->getLayerByName("musei") ~ || die("Can't get layer: "._GetMapscriptError()); my $pnt = mapscript::pointObj->new(); # map extent as defined in Sardegna.map: 1426638 4301755 1570229 4573136 $pnt->{x} = 1513869.5325; $pnt->{y} = 4517136.74603175; $lyr->{template} = "DummyTemplateOrQueriesWontWork" ~ if(!$lyr->{template}); my $rst = $lyr->queryByPoint($map, $pnt, $mapscript::MS_SINGLE, 10); sub _GetMapscriptError { my $sReturn = "\n================================\n"; my $err = mapscript::errorObj->new(); while($err && $err->{code} != $mapscript::MS_NOERR) { $sReturn .= "\tError in '$err->{routine}': code $err->{code} (see documentation for error code meanings.)\n"; $sReturn .= "\tError message: $err->{message}\n"; $err = $err->next(); } return "$sReturn\n================================\n"; } =pod Mapfile MAP # [minx] [miny] [maxx] [maxy] ~ EXTENT 1426638 4301755 1570229 4573136 STATUS ON SIZE 400 756 IMAGETYPE PNG UNITS METERS SYMBOLSET "../../../Common/MapServer/Symbols/default.sym" FONTSET "../../../Common/MapServer/fonts.list" DEBUG ON WEB TEMPLATE 'index.html' HEADER 'Templates/header.html' FOOTER 'Templates/footer.html' IMAGEPATH 'var/www/OpenPortal/htdocs/confartigianato/Images/' IMAGEURL '/' LOG '/var/www/OpenPortal' END # Layers for displaying clicks LAYER NAME "musei" TYPE POINT STATUS OFF CONNECTION 'user=tsc2 password=tsc2 dbname=geo_sardegna' CONNECTIONTYPE POSTGIS DATA 'the_point from musei' CLASS NAME "musei" STYLE SYMBOL "/var/www/OpenPortal/htdocs/confartigianato/Images/icona_small.gif" SIZE 10 COLOR 0 0 0 END LABEL TYPE BITMAP SIZE TINY COLOR 0 0 0 POSITION AUTO PARTIALS FALSE BUFFER 1 END END END END =cut Here's the error message: [aaron at Zaphod Utilities]$ ./TestMapServerQuery.pl *** glibc detected *** double free or corruption (!prev): 0x083654c0 *** Aborted Any ideas? I've tried Google but come up with nothing helpful. Thanks! - -- Aaron Craig mercutio at pobox.com =========================================================== Get Firefox! http://www.spreadfirefox.com/?q=affiliates&id=0&t=1 =========================================================== - -=-=- Sweet are the uses of adversity. -- Romeo and Juliet - -=-=- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCXjufoyEQRcU83p4RAqNsAJ0QAWSgzzikkikmgzYzTfUvRT/a+gCfQdBx mpBzN0WmLz5B+nJacNrZ+ek= =wqK4 -----END PGP SIGNATURE----- From williampaul28 at YAHOO.COM Thu Apr 14 03:01:56 2005 From: williampaul28 at YAHOO.COM (william paul) Date: Thu, 14 Apr 2005 03:01:56 -0700 Subject: print page Message-ID: Thank you Gregor, My problem here is that I don't know PHP, only _javascript (I still learn). I will try to understand the code in PHP. I have seen that mapsurfer has the same option. If anyone has a example in _javascript it will help me a lot. William --------------------------------- Do you Yahoo!? Yahoo! Small Business - Try our new resources site! -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.riff at CERENE.FR Thu Apr 14 02:41:12 2005 From: stephane.riff at CERENE.FR (=?ISO-8859-1?Q?St=E9phane_RIFF?=) Date: Thu, 14 Apr 2005 11:41:12 +0200 Subject: Imagemaps always empty Message-ID: Hi I tried to make imagemap support to work with no success. I have a mapfile create with phpmapscript. there is one point layer, this mapfile draws fine so i can see my symbols in a png image. Now i take the same mapfile with : IMAGETYPE imagemap OUTPUTFORMAT NAME imagemap DRIVER imagemap FORMATOPTION "POLYHREF=#" FORMATOPTION "SYMBOLHREF=#" FORMATOPTION "SUPPRESS=YES" FORMATOPTION "MAPNAME=map_test" FORMATOPTION "POLYMOUSEOUT=alert('poly out');" FORMATOPTION "POLYMOUSEOVER=alert('poly %s');" FORMATOPTION "SYMBOLMOUSEOUT=alert('symbol out');" FORMATOPTION "SYMBOLMOUSEOVER=alert('symbol %s');" MIMETYPE "text/html" END With phpmapscript i do that : $imagemap = ms_newMapObj("/var/www/html/map/imagemap.map","/var/www/html/map/"); $htmlmap = $imagemap->draw(); $htmlmap->saveImage("/var/tmp/test.html", $imagemap); Here comes the problem : there is no error and tha imagemap file is write well but i always get this in "/var/tmp/test.html": I use mapserver 4.4.2 , postgis , phpmapscript on redhat box. Every advice are welcome Thanks From TODD.M.BRENNINGMEYER at SAIC.COM Thu Apr 14 06:09:38 2005 From: TODD.M.BRENNINGMEYER at SAIC.COM (Brenningmeyer, Todd M.) Date: Thu, 14 Apr 2005 06:09:38 -0700 Subject: shapefile polygon opens in arcgis but n ot mapserver Message-ID: Hi, I've had to deal with a similar issue connected with shapes with M values (I can't recall if they also had Z). When I had the entire polygon within the view it was visible but if any portion of that file extended outside of the viewer the rest of the features for that shapefile would disappear. I was able to get around this by removing the z and m values and exporting a plain 2D shapefile. After that everything worked. The issue appears to be the way mapserver opens or handles M and possibly Z shapes. The shapes were created with arcgis 9.0 which may be part of the problem as ArcGIS products tend to handle and create shapefiles a little differently than arcview 3.x. Todd Brenningmeyer, Ph.D. SAIC - EEMG 8421 St. John Industrial Drive St. Louis, MO 63114 Phone: (314) 770-3097 Fax: (314) 344-4349 Todd.M.Brenningmeyer at saic.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Bart van den Eijnden Sent: Wednesday, April 13, 2005 2:18 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in arcgis but not mapserver Hi, It should work if you are using Mapserver 4.4 or later. Otherwise try showing it through OGR. CONNECTIONTYPE OGR CONNECTION "path/my.shp" Best regards, Bart On Wed, 13 Apr 2005 16:45:50 -0230, gerard barrington wrote: > I checked with ogrinfo and the shapefile is a <3D POLYGON>. Other shape > files I have show up simply as when checked with ogrinfo. Is > there anything i can do to show this polygon in mapserver? > >> From: Bart van den Eijnden > >> Reply-To: Bart van den Eijnden > >> To: MAPSERVER-USERS at LISTS.UMN.EDU > >> Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in arcgis >> but not > mapserver >> Date: Wed, 13 Apr 2005 20:32:42 +0200 > >> > >> Hi, > >> > >> are you sure it is not a polyline shape? Did you try TYPE LINE? > >> > >> Otherwise open it up with ogrinfo and see what it says > >> (http://fwtools.maptools.org). > >> > >> Best regards, > >> Bart > >> > >> On Wed, 13 Apr 2005 16:04:39 -0230, gerard barrington > >> wrote: > >> > >>> Hi list, I have a polygon shapefile which I can open and view in > >>> ArcExplorer and everything looks perfect. However, when I try to > >>> use the > >>> same shapefile as data for a LAYER of TYPE POLYGON, I get the > >>> following > >>> exception: msDrawMap(): Image handling error. Failed to draw layer > >>> named > >>> 'aal135'. msDrawShape(): General error message. Only polygon shapes > >>> can > >>> be drawn using a POLYGON layer definition. So I tried switching the > >>> TYPE > >>> in my layer to POINT and a couple of points along the border of the > >>> polygon showed up. I know the shapefile is a polygon though because > >>> it > >>> displays as the correct shape in arcExplorer. Can someone tell me > >>> why > >>> the polygon will show up in ArcExplorer but not in mapserver? Is > >>> there > >>> anything I can do to fix this problem?? I am at real loss here for > >>> why > >>> this happens and would really appreciate any help.... Thanks Gerard > >>> B > >> > >> > >> > >> -- > >> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From fwarmerdam at GMAIL.COM Thu Apr 14 06:35:36 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Thu, 14 Apr 2005 09:35:36 -0400 Subject: fastcgi, lacking performance over standard cgi In-Reply-To: <20050413175409.78083.qmail@web53803.mail.yahoo.com> Message-ID: On 4/13/05, Gregor Mosheh wrote: > Nice. That did the trick. Thank you, Frank. > > For most of the map, the speedup is modest but > measurable. For one particular view, though, it > reduces the generation time from 15 seconds to <5 > seconds. Mileage varies. Gregor, Whew, that is surprising. > What is the algorithm for keeping those DB connections > persistent? Do they get closed automatically after a > set period or number of connections? Do I need to > worry about maxing out my DB's allowed connections? The DB connections are never closed till fastcgi shutdown. There are things you can configure in the apache .conf file to control how many fastcgi processes may be started, and how long they are kept alive. You may want to tune these to try and cleanup fastcgi processes after a set period of inactivity. Generally speaking, yes, you do need to be wary about database connection consumption in environments where the number of connections is limited due to licensing or resource restrictions. > Say, the documentation on the PROCESSING keyword is > rather sparse. What exactly does the > CLOSE_CONNECTION=DEFER flag do in a non-fcgi > environment? Does the data source stay open until the > end of the mapserv.cgi execution, and save the > overhead of opening/closing a data source that would > be used in multiple layers? In a non-FastCGI situation the closes are deferred till the cgi process is ready to terminate. This effectly allows for "connection sharing" between layers but does not help the next cgi request that starts up. So for a map with multiple layers drawing from a single database the deferred closing can still provide a significant speedup over opening a connection for each layer rendered. The PROCESSING keyword is a bit of a hack to make it easy to add new features. If we now consider the pooling mechanism sufficiently mainline perhaps we should be making CLOSE_CONNECTION a proper keyword in mapfiles, instead of going through the PROCESSING directive. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From stephane.riff at CERENE.FR Thu Apr 14 06:47:25 2005 From: stephane.riff at CERENE.FR (=?ISO-8859-1?Q?St=E9phane_RIFF?=) Date: Thu, 14 Apr 2005 15:47:25 +0200 Subject: Imagemaps always empty In-Reply-To: <425E3AB8.1060503@cerene.fr> Message-ID: I found why it doesn't work. When looking in mapimagemap.c i found that only symbol "0" are process so in the mapfile you have to set all your symbols to "0" or nothing process Another question how can i get id of a pointObj so i can query (shapefile or postgis) to get data from datasource instead of the layer name ??? St?phane RIFF wrote: > Hi > > I tried to make imagemap support to work with no success. > > I have a mapfile create with phpmapscript. there is one point layer, > this mapfile draws fine so i can see my symbols in a png image. > > Now i take the same mapfile with : > IMAGETYPE imagemap > > OUTPUTFORMAT > NAME imagemap > DRIVER imagemap > FORMATOPTION "POLYHREF=#" > FORMATOPTION "SYMBOLHREF=#" > FORMATOPTION "SUPPRESS=YES" > FORMATOPTION "MAPNAME=map_test" > FORMATOPTION "POLYMOUSEOUT=alert('poly out');" > FORMATOPTION "POLYMOUSEOVER=alert('poly %s');" > FORMATOPTION "SYMBOLMOUSEOUT=alert('symbol out');" > FORMATOPTION "SYMBOLMOUSEOVER=alert('symbol %s');" > MIMETYPE "text/html" > END > > With phpmapscript i do that : > $imagemap = > ms_newMapObj("/var/www/html/map/imagemap.map","/var/www/html/map/"); > $htmlmap = $imagemap->draw(); > $htmlmap->saveImage("/var/tmp/test.html", $imagemap); > > Here comes the problem : there is no error and tha imagemap file is > write well but i always get this in "/var/tmp/test.html": > > > > I use mapserver 4.4.2 , postgis , phpmapscript on redhat box. > > Every advice are welcome > Thanks > > From stephane.riff at CERENE.FR Thu Apr 14 07:24:10 2005 From: stephane.riff at CERENE.FR (=?ISO-8859-1?Q?St=E9phane_RIFF?=) Date: Thu, 14 Apr 2005 16:24:10 +0200 Subject: Imagemaps always empty In-Reply-To: <425E746D.4020003@cerene.fr> Message-ID: Another thought on mapserver source. In mapdraw.c, the function "msDrawShape" : There a switch on layer type in case MS_LAYER_POINT there is a loop on "shape->line[j].numpoints" but if it's a point layer i think there is only one point so shape->line[0].point[0] is the point we want to draw. If we agree that the shape can only have one point we can pass a shape object to "msDrawMarkerSymbol" instead of a point object and in mapimagemap.c in the function "msDrawMarkerSymbolIM" we can get the point x,y with shape->line[0].point[0] and the shape index with shape->index so we can get the point index in datasource like polygons So my question is why point layer are process like a polygon layer by msDrawShape ? St?phane RIFF wrote: > I found why it doesn't work. > When looking in mapimagemap.c i found > that only symbol "0" are process so in the mapfile > you have to set all your symbols to "0" or nothing process > > Another question how can i get id of a pointObj so i can query > (shapefile or postgis) to get data from datasource instead of the > layer name ??? > > St?phane RIFF wrote: > >> Hi >> >> I tried to make imagemap support to work with no success. >> >> I have a mapfile create with phpmapscript. there is one point layer, >> this mapfile draws fine so i can see my symbols in a png image. >> >> Now i take the same mapfile with : >> IMAGETYPE imagemap >> >> OUTPUTFORMAT >> NAME imagemap >> DRIVER imagemap >> FORMATOPTION "POLYHREF=#" >> FORMATOPTION "SYMBOLHREF=#" >> FORMATOPTION "SUPPRESS=YES" >> FORMATOPTION "MAPNAME=map_test" >> FORMATOPTION "POLYMOUSEOUT=alert('poly out');" >> FORMATOPTION "POLYMOUSEOVER=alert('poly %s');" >> FORMATOPTION "SYMBOLMOUSEOUT=alert('symbol out');" >> FORMATOPTION "SYMBOLMOUSEOVER=alert('symbol %s');" >> MIMETYPE "text/html" >> END >> >> With phpmapscript i do that : >> $imagemap = >> ms_newMapObj("/var/www/html/map/imagemap.map","/var/www/html/map/"); >> $htmlmap = $imagemap->draw(); >> $htmlmap->saveImage("/var/tmp/test.html", $imagemap); >> >> Here comes the problem : there is no error and tha imagemap file is >> write well but i always get this in "/var/tmp/test.html": >> >> >> >> I use mapserver 4.4.2 , postgis , phpmapscript on redhat box. >> >> Every advice are welcome >> Thanks >> >> > > > From BEN at SYNCERA-ITSOLUTIONS.NL Thu Apr 14 07:29:25 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Thu, 14 Apr 2005 16:29:25 +0200 Subject: WFS: DWithin with a polygon supported? Message-ID: Hi list, does Mapserver WFS support selecting all features within a buffer around a polygon? Ie using the DWithin operator with a Polygon on Mapserver WFS? Or does it use the centroid of the polygon to calculate the distances? Thanks in advance. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl From saintsjd at YAHOO.COM Thu Apr 14 08:35:41 2005 From: saintsjd at YAHOO.COM (Jon Saints) Date: Thu, 14 Apr 2005 08:35:41 -0700 Subject: compiling with thread safety Message-ID: I am testing compiling mapserver with the "thread-safety" flag off and on. It seems that with thread safety on, mapserver runs slower when my server is hit with many requests at once. Is this my imagination, or could this really be true? What are the benefits/trade-offs of the tread safety option? From sc at BYTRON.COM Thu Apr 14 08:29:12 2005 From: sc at BYTRON.COM (sc) Date: Thu, 14 Apr 2005 16:29:12 +0100 Subject: Labels not displaying Message-ID: Hi I have managed to get several layers switched on and off via mapscript/php but I am unable to see any labels whose text comes from my shapefile. I can annotate the map directly with TEXT (), but cannot get labelitem to work within my "Codes" Layer. here is my mapfile: thanks Simon MAP NAME UK STATUS ON SIZE 1000 1000 IMAGETYPE PNG IMAGECOLOR 240 240 240 SHAPEPATH "/usr/local/apache/htdocs/map/data/conic" EXTENT -994934.821920 5173124.716504 322333.423383 6431993.097353 SYMBOL NAME 'circle' TYPE ELLIPSE POINTS 1 1 END FILLED TRUE END WEB IMAGEPATH "/usr/local/apache/htdocs/tmp/" IMAGEURL "/tmp/" END LAYER NAME "Airports" GROUP airfields TYPE POINT STATUS DEFAULT DATA "airports" CLASSITEM "ICAODesign" CLASS NAME "UKAIRPORTS" STYLE OUTLINECOLOR 60 60 60 COLOR 255 0 0 SYMBOL 'circle' SIZE 4 END END END LAYER NAME "Codes" TYPE ANNOTATION DATA "uk_airports" STATUS DEFAULT LABELITEM "ICAODesign" CLASS LABEL FORCE TRUE SIZE MEDIUM POSITION CC PARTIALS TRUE COLOR 0 0 0 END END END LAYER NAME "credits" STATUS DEFAULT TRANSFORM FALSE TYPE ANNOTATION FEATURE POINTS 10 480 END TEXT 'Map of the United Kingdom and Ireland' END FEATURE POINTS 10 500 END TEXT 'By SC' END CLASS LABEL TYPE BITMAP POSITION CR COLOR 0 0 0 END END END END -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.9 - Release Date: 13/04/2005 From sgillies at FRII.COM Thu Apr 14 08:47:14 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Thu, 14 Apr 2005 09:47:14 -0600 Subject: MapServer and Threads FAQ (Re: compiling with thread safety) In-Reply-To: Message-ID: On Apr 14, 2005, at 9:35 AM, Jon Saints wrote: > I am testing compiling mapserver with the > "thread-safety" flag off and on. It seems that with > thread safety on, mapserver runs slower when my server > is hit with many requests at once. Is this my > imagination, or could this really be true? > > What are the benefits/trade-offs of the tread safety > option? > > Jon, By coincidence, I just typed up answers to some related frequently asked questions here: http://ms.gis.umn.edu/docs/faq/thread_safety The same FAQ with some extra editorializing is on my news page: http://zcologia.com/news/24 It's not your imagination, we are trading performance for thread safety, and you may very well expect certain components of MapServer to be slower. cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From cdaily at GMAIL.COM Thu Apr 14 08:47:33 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Thu, 14 Apr 2005 10:47:33 -0500 Subject: Labels not displaying In-Reply-To: Message-ID: from a quick glance, you're pointing the two layers at two different data files, "airports" and "uk_airports". are they really two seperate files? -camden On 4/14/05, sc wrote: > Hi > > I have managed to get several layers switched on and off via mapscript/php > but I am unable to see any labels whose text comes from my shapefile. > > I can annotate the map directly with TEXT (), but cannot get labelitem to > work within > my "Codes" Layer. > > here is my mapfile: > > thanks > Simon > > MAP > NAME UK > STATUS ON > SIZE 1000 1000 > IMAGETYPE PNG > IMAGECOLOR 240 240 240 > SHAPEPATH "/usr/local/apache/htdocs/map/data/conic" > EXTENT -994934.821920 5173124.716504 322333.423383 6431993.097353 > > SYMBOL > NAME 'circle' > TYPE ELLIPSE > POINTS 1 1 END > FILLED TRUE > END > > WEB > IMAGEPATH "/usr/local/apache/htdocs/tmp/" > IMAGEURL "/tmp/" > END > > LAYER > NAME "Airports" > GROUP airfields > TYPE POINT > STATUS DEFAULT > DATA "airports" > CLASSITEM "ICAODesign" > CLASS > NAME "UKAIRPORTS" > STYLE > OUTLINECOLOR 60 60 60 > COLOR 255 0 0 > SYMBOL 'circle' > SIZE 4 > END > END > END > > LAYER > NAME "Codes" > TYPE ANNOTATION > DATA "uk_airports" > STATUS DEFAULT > LABELITEM "ICAODesign" > CLASS > LABEL > FORCE TRUE > SIZE MEDIUM > POSITION CC > PARTIALS TRUE > COLOR 0 0 0 > END > END > END > > LAYER > NAME "credits" > STATUS DEFAULT > TRANSFORM FALSE > TYPE ANNOTATION > FEATURE > POINTS > 10 480 > END > TEXT 'Map of the United Kingdom and Ireland' > END > FEATURE > POINTS > 10 500 > END > TEXT 'By SC' > END > CLASS > LABEL > TYPE BITMAP > POSITION CR > COLOR 0 0 0 > END > END > END > > END > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.9.9 - Release Date: 13/04/2005 > From woodbri at SWOODBRIDGE.COM Thu Apr 14 08:54:17 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Thu, 14 Apr 2005 11:54:17 -0400 Subject: Labels not displaying In-Reply-To: <16264e07050414084718fe7fc4@mail.gmail.com> Message-ID: Also look at your extents, they appear to be in some projection, it is unlikely that your uk_airports and airports are in that same projection. What are the extents of your shapefiles? shpdump uk_airports | head shpdump airports | head or use: gdalinfo uk_airports -Steve W. Camden Daily wrote: > from a quick glance, you're pointing the two layers at two different > data files, "airports" and "uk_airports". are they really two > seperate files? > > -camden > > On 4/14/05, sc wrote: > >>Hi >> >>I have managed to get several layers switched on and off via mapscript/php >>but I am unable to see any labels whose text comes from my shapefile. >> >>I can annotate the map directly with TEXT (), but cannot get labelitem to >>work within >>my "Codes" Layer. >> >>here is my mapfile: >> >>thanks >>Simon >> >>MAP >> NAME UK >> STATUS ON >> SIZE 1000 1000 >> IMAGETYPE PNG >> IMAGECOLOR 240 240 240 >> SHAPEPATH "/usr/local/apache/htdocs/map/data/conic" >> EXTENT -994934.821920 5173124.716504 322333.423383 6431993.097353 >> >> SYMBOL >> NAME 'circle' >> TYPE ELLIPSE >> POINTS 1 1 END >> FILLED TRUE >> END >> >> WEB >> IMAGEPATH "/usr/local/apache/htdocs/tmp/" >> IMAGEURL "/tmp/" >> END >> >> LAYER >> NAME "Airports" >> GROUP airfields >> TYPE POINT >> STATUS DEFAULT >> DATA "airports" >> CLASSITEM "ICAODesign" >> CLASS >> NAME "UKAIRPORTS" >> STYLE >> OUTLINECOLOR 60 60 60 >> COLOR 255 0 0 >> SYMBOL 'circle' >> SIZE 4 >> END >> END >> END >> >> LAYER >> NAME "Codes" >> TYPE ANNOTATION >> DATA "uk_airports" >> STATUS DEFAULT >> LABELITEM "ICAODesign" >> CLASS >> LABEL >> FORCE TRUE >> SIZE MEDIUM >> POSITION CC >> PARTIALS TRUE >> COLOR 0 0 0 >> END >> END >> END >> >> LAYER >> NAME "credits" >> STATUS DEFAULT >> TRANSFORM FALSE >> TYPE ANNOTATION >> FEATURE >> POINTS >> 10 480 >> END >> TEXT 'Map of the United Kingdom and Ireland' >> END >> FEATURE >> POINTS >> 10 500 >> END >> TEXT 'By SC' >> END >> CLASS >> LABEL >> TYPE BITMAP >> POSITION CR >> COLOR 0 0 0 >> END >> END >> END >> >>END >> >>-- >>No virus found in this outgoing message. >>Checked by AVG Anti-Virus. >>Version: 7.0.308 / Virus Database: 266.9.9 - Release Date: 13/04/2005 >> > > From assefa at DMSOLUTIONS.CA Thu Apr 14 08:54:59 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Thu, 14 Apr 2005 11:54:59 -0400 Subject: Unexpected WFS GetFeature results In-Reply-To: <2576812186CDD411BF1500508B6DCE950972F960@ecnwri1.ontario.int.ec.gc.ca> Message-ID: Tom, I have rechecked the code and when not using SQL statements, the filter encoding colde would create in your case : keywords benthic : - a class item called "keywords" - expression /benthic/ The expression built like that would match your field value defined like "cabin,benthic,canada,biomonitoring,sites,site,sample,". The expression generation could be thighten up to be /^benthic$/. If that is the inteded interpretation, please file a speperate bug on this and assigh it to me. Thanks for testing. Bug 1308 is closed. Later, Kralidis,Tom [Burlington] wrote: > Close out on this thread: > > It seems that, before the changes to mapogcfilter.c, the like filter > evaluated directives like: > > like 'benthic' > > To: > > Like '%benthic%' > > ...whereas this was tightened up in the changes. > > So my original test case with the GetFeature filter was getting results > back when it shouldn't have, i.e. now MapServer only applies wildcards > around the search term if put forth by the client. > > Thanks Assefa! > > ..Tom > > > >>-----Original Message----- >>From: UMN MapServer Users List >>[mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of >>Yewondwossen Assefa >>Sent: Wednesday, 06 April, 2005 13:16 >>To: MAPSERVER-USERS at LISTS.UMN.EDU >>Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS GetFeature results >> >> >>I will look today into it and provide you with the exact SQL >>statment created if I do not see any thing obvious. >> >>Later, >> >> >>Kralidis,Tom [Burlington] wrote: >> >>>Assefa, >>> >>>I tested this scenario with CVS 20050328 (the day before >> >>you committed >> >>>to mapogcfilter.c and mapogcfilter.h), and everything works fine. >>> >>>So the problem is somewhere in those changes. >>> >>>Here's the actual OGC filter: >>> >>> >>> >>> >>> NAME >>> >>> -141.84,21.599999999999994 >> >>-56.16,74.16 >> >>> >>> >>> >>> >>> >>> title >>> benthic >>> >>> >>> abstract >>> benthic >>> >>> >>> >>> keywords >>> benthic >>> >>> >>> >>> >>> >>>..Tom >>> >>> >>> >>> >>>>-----Original Message----- >>>>From: UMN MapServer Users List >> >>[mailto:MAPSERVER-USERS at LISTS.UMN.EDU] >> >>>>On Behalf Of Yewondwossen Assefa >>>>Sent: Wednesday, 06 April, 2005 13:03 >>>>To: MAPSERVER-USERS at LISTS.UMN.EDU >>>>Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS GetFeature results >>>> >>>> >>>>Tom, >>>> >>>> I did make some changes recently to the way filters were >> >>handled for >> >>>>postgis layers (Bug >>>>http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1292). >>>> >>>> It's probably related to thoses changes. Is it easy for >> >>you to test >> >>>>it against 4.4.x releases ? If you can test and It works I >> >>will start >> >>>>looking into the code to see what the problem is. >>>> >>>>Later, >>>> >>>> >>>>Kralidis,Tom [Burlington] wrote: >>>> >>>> >>>>>Hi, >>>>> >>>>>(MapServer CVS, FC2, latest stable supporting libs). >>>>> >>>>>I have a WFS instance running against a PostGIS table, and when I >>>>>invoke a Filter'd GetFeature operation (bbox AND a nested OR), I >>>>>expect one result to be returned (only one record in the DB >>>> >>>>satisfies >>>> >>>> >>>>>this request). >>>>> >>>>>I've attached a sample HTML form page to correctly invoke >>>> >>>>the request. >>>> >>>> >>>>>However, I receive all records back in the DB. >>>>> >>>>>Any idea what's going on here? FYI, here's my DATA string in the >>>>>LAYER >>>>>object: >>>>> >>>>> DATA "the_geom from (select service_endpoints.organization as >>>>>organization,service_endpoints.endpoint_getresource as >>>>>endpoint_getresource,service_endpoints.service_type as >>>>>service_type,service_endpoints.service_version as >>>>>service_version,service_resources.the_geom as >>>>>the_geom,service_resources.resource_id as >>>>>resource_id,service_resources.service_id as >>>>>service_id,service_resources.name as >>>> >>>>name,service_resources.title as >>>> >>>> >>>>>title,service_resources.abstract as >>>>>abstract,service_resources.keywords >>>>>as keywords,service_resources.dataurl as >>>>>dataurl,service_resources.metadataurl as >>>>>metadataurl,service_resources.legendurl as >>>>>legendurl,service_resources.scale_min as >>>>>scale_min,service_resources.scale_max >>>>>as scale_max,service_resources.srs as >>>> >>>>srs,service_endpoints.format_list >>>> >>>> >>>>>as format_list,service_resources.style_list as >>>>>style_list,service_resources.time_extent as >>>>>time_extent,service_resources.queryable as queryable from >>>>>service_resources inner join service_endpoints on >>>>>service_endpoints.service_id = >>>> >>>>service_resources.service_id) as t using >>>> >>>> >>>>>unique resource_id" >>>>> >>>>>Thanks >>>>> >>>>>..Tom >>>>> >>>>> >>>>> >>>> >>>>------------------------------------------------------------ >> >>---------- >> >>>>>-- >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>>-- >>>>---------------------------------------------------------------- >>>>Assefa Yewondwossen >>>>Software Analyst >>>> >>>>Email: assefa at dmsolutions.ca >>>>http://www.dmsolutions.ca/ >>>> >>>>Phone: (613) 565-5056 (ext 14) >>>>Fax: (613) 565-0925 >>>>---------------------------------------------------------------- >>>> >>> >>> >>> >>-- >>---------------------------------------------------------------- >>Assefa Yewondwossen >>Software Analyst >> >>Email: assefa at dmsolutions.ca >>http://www.dmsolutions.ca/ >> >>Phone: (613) 565-5056 (ext 14) >>Fax: (613) 565-0925 >>---------------------------------------------------------------- >> > > > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From Tom.Kralidis at EC.GC.CA Thu Apr 14 09:02:54 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Thu, 14 Apr 2005 12:02:54 -0400 Subject: Unexpected WFS GetFeature results Message-ID: > -----Original Message----- > From: Yewondwossen Assefa [mailto:assefa at dmsolutions.ca] > Sent: Thursday, 14 April, 2005 11:55 > To: Kralidis,Tom [Burlington] > Cc: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS GetFeature results > > > Tom, > > I have rechecked the code and when not using SQL statements, the > filter encoding colde would create in your case : > > keywords > benthic > : > - a class item called "keywords" > - expression /benthic/ > > The expression built like that would match your field value defined > like "cabin,benthic,canada,biomonitoring,sites,site,sample,". > The expression generation could be thighten up to be > /^benthic$/. If > that is the inteded interpretation, please file a speperate > bug on this > and assigh it to me. > ...but isn't this what is happening now? If I apply: keywords benthic ...then I get no results. If I apply: keywords *benthic* ...then I get results. My interpretation of the Filter spec PropertyIsLike construct is that you need wildcards to do wildcard searches. ..Tom > Thanks for testing. Bug 1308 is closed. > > Later, > > Kralidis,Tom [Burlington] wrote: > > Close out on this thread: > > > > It seems that, before the changes to mapogcfilter.c, the > like filter > > evaluated directives like: > > > > like 'benthic' > > > > To: > > > > Like '%benthic%' > > > > ...whereas this was tightened up in the changes. > > > > So my original test case with the GetFeature filter was getting > > results back when it shouldn't have, i.e. now MapServer > only applies > > wildcards around the search term if put forth by the client. > > > > Thanks Assefa! > > > > ..Tom > > > > > > > >>-----Original Message----- > >>From: UMN MapServer Users List > >>[mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of > >>Yewondwossen Assefa > >>Sent: Wednesday, 06 April, 2005 13:16 > >>To: MAPSERVER-USERS at LISTS.UMN.EDU > >>Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS GetFeature results > >> > >> > >>I will look today into it and provide you with the exact SQL > >>statment created if I do not see any thing obvious. > >> > >>Later, > >> > >> > >>Kralidis,Tom [Burlington] wrote: > >> > >>>Assefa, > >>> > >>>I tested this scenario with CVS 20050328 (the day before > >> > >>you committed > >> > >>>to mapogcfilter.c and mapogcfilter.h), and everything works fine. > >>> > >>>So the problem is somewhere in those changes. > >>> > >>>Here's the actual OGC filter: > >>> > >>> > >>> > >>> > >>> NAME > >>> > >>> -141.84,21.599999999999994 > >> > >>-56.16,74.16 > >> > >>> > >>> > >>> > >>> > >>> > >>> title > >>> benthic > >>> > >>> > >>> abstract > >>> benthic > >>> > >>> > >>> > >>> keywords > >>> benthic > >>> > >>> > >>> > >>> > >>> > >>>..Tom > >>> > >>> > >>> > >>> > >>>>-----Original Message----- > >>>>From: UMN MapServer Users List > >> > >>[mailto:MAPSERVER-USERS at LISTS.UMN.EDU] > >> > >>>>On Behalf Of Yewondwossen Assefa > >>>>Sent: Wednesday, 06 April, 2005 13:03 > >>>>To: MAPSERVER-USERS at LISTS.UMN.EDU > >>>>Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS > GetFeature results > >>>> > >>>> > >>>>Tom, > >>>> > >>>> I did make some changes recently to the way filters were > >> > >>handled for > >> > >>>>postgis layers (Bug > >>>>http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1292). > >>>> > >>>> It's probably related to thoses changes. Is it easy for > >> > >>you to test > >> > >>>>it against 4.4.x releases ? If you can test and It works I > >> > >>will start > >> > >>>>looking into the code to see what the problem is. > >>>> > >>>>Later, > >>>> > >>>> > >>>>Kralidis,Tom [Burlington] wrote: > >>>> > >>>> > >>>>>Hi, > >>>>> > >>>>>(MapServer CVS, FC2, latest stable supporting libs). > >>>>> > >>>>>I have a WFS instance running against a PostGIS table, and when I > >>>>>invoke a Filter'd GetFeature operation (bbox AND a nested OR), I > >>>>>expect one result to be returned (only one record in the DB > >>>> > >>>>satisfies > >>>> > >>>> > >>>>>this request). > >>>>> > >>>>>I've attached a sample HTML form page to correctly invoke > >>>> > >>>>the request. > >>>> > >>>> > >>>>>However, I receive all records back in the DB. > >>>>> > >>>>>Any idea what's going on here? FYI, here's my DATA string in the > >>>>>LAYER > >>>>>object: > >>>>> > >>>>> DATA "the_geom from (select service_endpoints.organization as > >>>>>organization,service_endpoints.endpoint_getresource as > >>>>>endpoint_getresource,service_endpoints.service_type as > >>>>>service_type,service_endpoints.service_version as > >>>>>service_version,service_resources.the_geom as > >>>>>the_geom,service_resources.resource_id as > >>>>>resource_id,service_resources.service_id as > >>>>>service_id,service_resources.name as > >>>> > >>>>name,service_resources.title as > >>>> > >>>> > >>>>>title,service_resources.abstract as > >>>>>abstract,service_resources.keywords > >>>>>as keywords,service_resources.dataurl as > >>>>>dataurl,service_resources.metadataurl as > >>>>>metadataurl,service_resources.legendurl as > >>>>>legendurl,service_resources.scale_min as > >>>>>scale_min,service_resources.scale_max > >>>>>as scale_max,service_resources.srs as > >>>> > >>>>srs,service_endpoints.format_list > >>>> > >>>> > >>>>>as format_list,service_resources.style_list as > >>>>>style_list,service_resources.time_extent as > >>>>>time_extent,service_resources.queryable as queryable from > >>>>>service_resources inner join service_endpoints on > >>>>>service_endpoints.service_id = > >>>> > >>>>service_resources.service_id) as t using > >>>> > >>>> > >>>>>unique resource_id" > >>>>> > >>>>>Thanks > >>>>> > >>>>>..Tom > >>>>> > >>>>> > >>>>> > >>>> > >>>>------------------------------------------------------------ > >> > >>---------- > >> > >>>>>-- > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>> > >>>>-- > >>>>---------------------------------------------------------------- > >>>>Assefa Yewondwossen > >>>>Software Analyst > >>>> > >>>>Email: assefa at dmsolutions.ca > >>>>http://www.dmsolutions.ca/ > >>>> > >>>>Phone: (613) 565-5056 (ext 14) > >>>>Fax: (613) 565-0925 > >>>>---------------------------------------------------------------- > >>>> > >>> > >>> > >>> > >>-- > >>---------------------------------------------------------------- > >>Assefa Yewondwossen > >>Software Analyst > >> > >>Email: assefa at dmsolutions.ca > >>http://www.dmsolutions.ca/ > >> > >>Phone: (613) 565-5056 (ext 14) > >>Fax: (613) 565-0925 > >>---------------------------------------------------------------- > >> > > > > > > > > -- > ---------------------------------------------------------------- > Assefa Yewondwossen > Software Analyst > > Email: assefa at dmsolutions.ca > http://www.dmsolutions.ca/ > > Phone: (613) 565-5056 (ext 14) > Fax: (613) 565-0925 > ---------------------------------------------------------------- > > > From assefa at DMSOLUTIONS.CA Thu Apr 14 09:10:12 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Thu, 14 Apr 2005 12:10:12 -0400 Subject: WFS: DWithin with a polygon supported? In-Reply-To: Message-ID: Bart, If you do a Dwithin with a polygon and set a distance value, that end up : - setting a the layer's tolerance value equal to the distance value passed - calling underlying mapsrver's querybyshape function using the polygon passed The querybyshape function will calculate the distance between the polygon and all features; and if the distance is < to the tolernace the shape is selected. Later, Bart van den Eijnden wrote: > Hi list, > > does Mapserver WFS support selecting all features within a buffer around a polygon? Ie using the DWithin operator with a Polygon on Mapserver WFS? Or does it use the centroid of the polygon to calculate the distances? > > Thanks in advance. > > Best regards, > Bart > > Bart van den Eijnden > Syncera-ITSolutions > Postbus 270 > 2600 AG DELFT > > tel.nr.: 015-7512436 > email: BEN at Syncera-ITSolutions.nl > > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From kenlord at GMAIL.COM Thu Apr 14 09:40:36 2005 From: kenlord at GMAIL.COM (Ken Lord) Date: Thu, 14 Apr 2005 09:40:36 -0700 Subject: legend problems In-Reply-To: Message-ID: Hi Ferencik, Your map file appears to be missing a legend object, Its a block similiar to the layer objects or web, reference, scalebar objects but it sets up the layer including telling mapserver the name and location of your legend template file, and whether the legend is On, Off, or Embedded. Within the mapfile documentation, the Legend object is described here: http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#legend I use CGI mapserver, with HTML templates, using the [legend] tag, with no need to set any 'mode=legend' value anywhere. The legend object of the mapfile tells mapserver to process it when the map / scalebar / reference image are generated. Cheers, Ken Lord Vancouver BC On 4/14/05, Bart van den Eijnden wrote: > Hi, > > if you are using PHP you need to call a function processLegendTemplate, see the PHP Mapscript docs. > > If you are using Mapserver CGI, then you to use a mode=legend request to get the legend. See the Mapserver CGI docs. > > Best regards, > Bart > > Bart van den Eijnden > Syncera-ITSolutions > Postbus 270 > 2600 AG DELFT > > tel.nr.: 015-7512436 > email: BEN at Syncera-ITSolutions.nl > > >>> Ferencik Ioan 04/14/05 10:43am >>> > I am a little bit confused > > i have folowing map file > MAP > NAME "rosia" > STATUS ON > SHAPEPATH "date" > SIZE 800 600 > IMAGETYPE PNG24 > IMAGECOLOR 255 255 255 > EXTENT 319780 522564 385192 575568 > PROJECTION > "init=epsg:31700" > END > FONTSET "fonts/fonts.list" > SYMBOLSET "simbol/simbol.sym" > > REFERENCE > EXTENT 319780 522564 385192 575568 > IMAGE "date/raster/dem.png" > SIZE 100 100 > STATUS ON > COLOR -1 -1 -1 > > END > LAYER > NAME "DEM" > DATA 'raster/demback.tif' > TYPE RASTER > PROJECTION > "init=epsg:31700" > END > STATUS ON > GROUP "Base" > END > > LAYER > > NAME "Cadmium " > DATA xysediment04 > TYPE POINT > PROJECTION > "init=epsg:31700" > END > STATUS ON > CLASS > NAME "Cadmium normal" > COLOR 32 79 240 #albastru > SYMBOL "star" > EXPRESSION ([CD_114] < 1) > SIZE 10 > END > > CLASS > NAME "Cadmium plus" > COLOR 240 11 16 #rosu > SYMBOL "star" > EXPRESSION ([CD_114] > 1) > SIZE 10 > END > > METADATA > END > > END > > LAYER > > NAME "rivers" > DATA retea > TYPE LINE > LABELITEM "DENUMIRE" > PROJECTION > "init=epsg:31700" > END > STATUS ON > GROUP "Base" > CLASS > COLOR 35 57 214 > NAME "riv" > STYLE > SIZE 50 > SYMBOL "line1" > END > LABEL > ANGLE AUTO > BUFFER 10 > COLOR 35 57 214 > FONT "times-italic" > TYPE TRUETYPE > SIZE 8 > OFFSET 5 5 > END > > END > > METADATA > order 1 > END > > END > > LAYER > > NAME "aries" > DATA aries > TYPE LINE > > PROJECTION > "init=epsg:31700" > END > STATUS ON > CLASS > COLOR 35 57 214 > NAME "ARIES" > STYLE > SIZE 50 > SYMBOL "line1" > END > > END > > END > > SCALEBAR > COLOR -1 -1 -1 > SIZE 100 3 > STYLE 1 > > STATUS ON > IMAGECOLOR 255 255 255 > INTERVALS 4 > UNITS KILOMETERS > > END > LEGEND > IMAGECOLOR 255 255 255 > OUTLINECOLOR 0 0 0 > KEYSIZE 15 15 > STATUS ON > LABEL > TYPE BITMAP > SIZE MEDIUM > COLOR 0 0 89 > END > > TEMPLATE "legenda.html" > END > WEB > TEMPLATE "rosia.html" > IMAGEPATH "/ms4w/tmp/ms_tmp/" > IMAGEURL "/ms_tmp/" > > END > > END > > and my legend.html looks like this: > > [leg_group_html] > > > > [/leg_group_html] > > [leg_layer_html order_metadata=order opt_flag=12] > > > > > [/leg_layer_html] > > i have accessed the legend in my template file with: > > Legenda
[legend]
> > but I see the [legend] text insted the legend > > can somebody tell me where I am wrong? > > thanks > > _____________________________________________ > Cinefil?Castiga o excursie la Venetia > http://www.cineplus.ro/concurs > -- ============================== Ken Lord B.Sc., A.Dipl.T.H. 7488 Magnolia Terrace Burnaby BC, V5E 4L1 604-777-2171 kenlord at gmail.com kenlord at email.com klord at bgcengineering.com From bcrocks at GMAIL.COM Thu Apr 14 09:52:42 2005 From: bcrocks at GMAIL.COM (BC Rocks) Date: Thu, 14 Apr 2005 10:52:42 -0600 Subject: Segmentation fault: PHP Mapscript related? In-Reply-To: <007501c54084$c7606050$1701a8c0@omnilink.com.au> Message-ID: Thanks Rhys. I tried with GDAL 1.2.5 and tried without GDAL at all...and still get segfaults. Anyone else with ideas? Thanks, BC On 4/13/05, Rhys Ickeringill wrote: > BC, > > I'm pretty new to MapServer myself, but since your not having any luck I > thought I'd share my limited experiences. > > Basically I can't get MapServer with mapscript to work when I compile and > link Mapserver against GDAL 1.2.6, but if I do the same against GDAL 1.2.5 > everything works as it should. Since nobody else has mentioned this I'd just > assumed it was something I was doing wrong. But perhaps it is worth a try? > > Rhys > > > ----- Original Message ----- > From: "BC Rocks" > To: > Sent: Thursday, April 14, 2005 6:28 AM > Subject: Re: [UMN_MAPSERVER-USERS] Segmentation fault: PHP Mapscript > related? > > Thanks Toomas, > > I tried what you suggested: PHP and Mapserver are explicitly using > --with-gd=/usr/local > but I still segfault. I even tried compiling PHP with no GD support, > but no luck (segfault). FYI, I did have 2 versions of GD installed, > but I uninstalled one and am left with gd-2.0.33. Still segfaulting > > BTW, here is my GDAL config (just in case there are other blatent > conflicting libraries I am overlooking): > ./configure --enable-shared --with-png=/usr/lib --with-jpeg=/usr/lib > --with-pg=/var/lib/pgsql/bin/pg_config --with-geos=yes > --with-libtiff=/usr/local/lib --with-geotiff=yes --with-ecw=yes > (ecw did not work) > > Any other thoughts? > > Thanks, > BC > > On 4/13/05, Toomas Aas wrote: > > BC Rocks wrote: > > > > > PHP was configured as follows (as I am successfully using on another > > > box): ./configure --build=i686-mandrake-linux-gnu --prefix=/usr > > > --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin > > > --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include > > > --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var/lib > > > --sharedstatedir=/usr/com --mandir=/usr/share/man > > > --infodir=/usr/share/info --enable-discard-path > > > --enable-force-cgi-redirect --enable-shared --disable-static > > > --disable-debug --disable-rpath --enable-pic > > > --enable-inline-optimization --enable-memory-limit > > > --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php > > > --with-pear=/usr/share/pear --enable-magic-quotes --enable-debugger > > > --enable-track-vars --with-exec-dir=/usr/bin --with-versioning > > > --with-mod_charset --with-regex=php --enable-track-vars > > > --enable-trans-sid --enable-safe-mode --enable-ctype --enable-ftp > > > --with-gettext=/usr --enable-posix --enable-session --enable-sysvsem > > > --enable-sysvshm --enable-yp --with-openssl=/usr --without-kerberos > > > --with-ttf --with-freetype-dir=/usr/include/freetype2 > > > --with-zlib=/usr --with-zlib=/usr --with-zlib-dir=/usr --with-pear > > > --with-jpeg-dir=/usr --with-png-dir=/usr --with-gd > > > --enable-gd-native-ttf --with-pgsql=/var/lib/pgsql/ --without-iodbc > > > --without-custom-odbc --without-unixODBC --without-dbmaker > > > --enable-soap --with-xml=/usr/include/libxml2/libxml > > > --with-apxs2=/usr/sbin/apxs2 --with-mcrypt=/usr/local/lib > > > --with-curl=/usr/local/include > > > > > > Mapserver configure parameters are as follows: ./configure > > > --with-php=/usr/include/php > > > --with-php-regex-dir=/usr/src/php/php-5.0.4/regex > > > --with-jpeg=/usr/lib --with-png=/usr/lib > > > --with-freetype=/usr/bin/freetype-config --with-proj --with-gd > > > --without-pdf --with-geos=/usr/local/bin/geos-config --with-gdal > > > --with-postgis=/var/lib/pgsql/bin/pg_config --without-tiff > > > --with-wmsclient --with-wfsclient --with-wcs > > > --with-curl-config=/usr/bin --with-ogr --with-httpd=/usr/sbin/httpd2 > > > > I notice that you have used --with-gd both when compiling PHP and > Mapserver. > > > > Actually, you should use something like --with-gd=/usr when compiling > > PHP. Otherwise PHP gets compiled with it's bundled version of GD, and > > php_mapscript.so gets compiled with whatever version of GD is found at > > build time. If these versions don't match exactly, nasty things can > happen. > > > > Substitute the real path where GD is installed instead of /usr, of course. > > > > To be really sure, use the same path when compiling Mapserver. If you > > have only one version of GD installed on your system, it shouldn't > > matter, but better safe than sorry. > > > > > I read some threads with regard to GDAL and JPG/TIFF issues (I did > > > try using the internal GDAL libs), but I don't think that is the > > > issue... especially since if I pull the php, things compile. > > > > This seems a likely indication of conflicting GD versions between PHP > > and Mapserver. > > > > -- > > Toomas > > > From gerard_b_18 at HOTMAIL.COM Thu Apr 14 10:17:48 2005 From: gerard_b_18 at HOTMAIL.COM (gerard barrington) Date: Thu, 14 Apr 2005 14:47:48 -0230 Subject: shapefile polygon opens in arcgis but not mapserver In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From bartvde at XS4ALL.NL Thu Apr 14 11:20:00 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Thu, 14 Apr 2005 20:20:00 +0200 Subject: shapefile polygon opens in arcgis but not mapserver In-Reply-To: Message-ID: Gerard, does your LOCATION item in your tile-index dbf have c:\shapefile or c:\shapefile.shp? Looking at your error message it looks like the first option which is incorrect. You can also try c:\shapefile.shp,0 in the LOCATION field. Hope this helps. Best regards, Bart On Thu, 14 Apr 2005 14:47:48 -0230, gerard barrington wrote: > hi, using the ogr worked out for a POLYGON layer that did not have a > tiledindex. The following worked perfect: LAYER > NAME "name" > TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "C:\shapefile.shp" ... END > However, this will not work for tiledindex. On the doc page for OGR it > says the following should work but it does not. LAYER > NAME "nam" > TYPE POLYGON > CONNECTIONTYPE OGR > TILEINDEX "C:\tiledindex.shp" > ... END The first entry in the tiled index is for c:\shapefile.shp but > it returns the following error: msDrawMap(): Image handling error. > Failed to draw layer named 'nam'. msOGRFileOpen(): OGR error. Open > failed for OGR connection `c:\shapefile'. File not found or unsupported > format. Any ideas why the tiledindex wouldn't work? I have used > tiledindexes for points and lines and it works fine. Thanks again! > Gerard B. > >> From: Bart van den Eijnden > >> Reply-To: Bart van den Eijnden > >> To: MAPSERVER-USERS at LISTS.UMN.EDU > >> Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in arcgis >> but not > mapserver >> Date: Wed, 13 Apr 2005 21:18:12 +0200 > >> > >> Hi, > >> > >> It should work if you are using Mapserver 4.4 or later. > >> > >> Otherwise try showing it through OGR. > >> > >> CONNECTIONTYPE OGR > >> CONNECTION "path/my.shp" > >> > >> Best regards, > >> Bart > >> > >> On Wed, 13 Apr 2005 16:45:50 -0230, gerard barrington > >> wrote: > >> > >>> I checked with ogrinfo and the shapefile is a <3D POLYGON>. Other > >>> shape > >>> files I have show up simply as when checked with ogrinfo. > >>> Is > >>> there anything i can do to show this polygon in mapserver? > >>> > >>>> From: Bart van den Eijnden > >>> > >>>> Reply-To: Bart van den Eijnden > >>> > >>>> To: MAPSERVER-USERS at LISTS.UMN.EDU > >>> > >>>> Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in > >>>> arcgis > >>>> but not > >>> mapserver > >>>> Date: Wed, 13 Apr 2005 20:32:42 +0200 > >>> > >>>> > >>> > >>>> Hi, > >>> > >>>> > >>> > >>>> are you sure it is not a polyline shape? Did you try TYPE LINE? > >>> > >>>> > >>> > >>>> Otherwise open it up with ogrinfo and see what it says > >>> > >>>> (http://fwtools.maptools.org). > >>> > >>>> > >>> > >>>> Best regards, > >>> > >>>> Bart > >>> > >>>> > >>> > >>>> On Wed, 13 Apr 2005 16:04:39 -0230, gerard barrington > >>> > >>>> wrote: > >>> > >>>> > >>> > >>>>> Hi list, I have a polygon shapefile which I can open and view in > >>> > >>>>> ArcExplorer and everything looks perfect. However, when I try to > >>> > >>>>> use the > >>> > >>>>> same shapefile as data for a LAYER of TYPE POLYGON, I get the > >>> > >>>>> following > >>> > >>>>> exception: msDrawMap(): Image handling error. Failed to draw > >>>>> layer > >>> > >>>>> named > >>> > >>>>> 'aal135'. msDrawShape(): General error message. Only polygon > >>>>> shapes > >>> > >>>>> can > >>> > >>>>> be drawn using a POLYGON layer definition. So I tried switching > >>>>> the > >>> > >>>>> TYPE > >>> > >>>>> in my layer to POINT and a couple of points along the border of > >>>>> the > >>> > >>>>> polygon showed up. I know the shapefile is a polygon though > >>>>> because > >>> > >>>>> it > >>> > >>>>> displays as the correct shape in arcExplorer. Can someone tell me > >>> > >>>>> why > >>> > >>>>> the polygon will show up in ArcExplorer but not in mapserver? Is > >>> > >>>>> there > >>> > >>>>> anything I can do to fix this problem?? I am at real loss here > >>>>> for > >>> > >>>>> why > >>> > >>>>> this happens and would really appreciate any help.... Thanks > >>>>> Gerard > >>> > >>>>> B > >>> > >>>> > >>> > >>>> > >>> > >>>> > >>> > >>>> -- > >>> > >>>> Using Opera's revolutionary e-mail client: > >>>> http://www.opera.com/m2/ > >>> > >> > >> > >> > >> -- > >> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From gerard_b_18 at HOTMAIL.COM Thu Apr 14 12:09:29 2005 From: gerard_b_18 at HOTMAIL.COM (gerard barrington) Date: Thu, 14 Apr 2005 16:39:29 -0230 Subject: shapefile polygon opens in arcgis but not mapserver In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From bartvde at XS4ALL.NL Thu Apr 14 12:13:37 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Thu, 14 Apr 2005 21:13:37 +0200 Subject: shapefile polygon opens in arcgis but not mapserver In-Reply-To: Message-ID: Hi Gerard, I would suggest using ogrtindex instead to build the tileindexes. There is a little trick that you should not run ogrtindex from the directory which contains the data (otherwise it does not create an absolute path to the data in the LOCATION item). So run it from the directory where you installed FWTools eg: for %i in (d:\data\*.shp) do d:\programs\fwtools\bin\ogrtindex mytileindex.shp %i About the performance, have you created shapefile qix indexes (using shptree?). Also, it depends on the GDAL/OGR version whether or not the qix files are actually used (that's a relatively new feature). If I recall correctly that was added in GDAL/OGR 1.2.6, but Frank knows for sure. I think Mapserver normally scales well with a lot of LAYERs, it may have to do with your data structures and not the amount of LAYERs. Best regards, Bart On Thu, 14 Apr 2005 16:39:29 -0230, gerard barrington wrote: > Bart, Thanks....your solution worked. None of the entries in the > LOCATION field of my dbf file had the '.shp'. So I added it to the > entries and the tiledindex displays correctly. (I didn't need to use the > 0, it works without it.) As a side note, do you know how I could go > about editing all my dbf files without having to go into them maunally > and add the ending to every entry. I used the tile4ms command to create > the tiledindex. Also, the speed of mapserver seems to go down > drastically when you add more layers to the map file. My map file > currently has 46 layers in it,all of which have a tiledindex as its > datasource. What can I do to help speed up the mapserver. Thanks again, > Gerard B >> From: Bart van den Eijnden > >> Reply-To: Bart van den Eijnden > >> To: MAPSERVER-USERS at LISTS.UMN.EDU > >> Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in arcgis >> but not > mapserver >> Date: Thu, 14 Apr 2005 20:20:00 +0200 > >> > >> Gerard, > >> > >> does your LOCATION item in your tile-index dbf have c:\shapefile or > >> c:\shapefile.shp? Looking at your error message it looks like the > >> first > >> option which is incorrect. > >> > >> You can also try c:\shapefile.shp,0 in the LOCATION field. > >> > >> Hope this helps. > >> > >> Best regards, > >> Bart > >> > >> On Thu, 14 Apr 2005 14:47:48 -0230, gerard barrington > >> wrote: > >> > >>> hi, using the ogr worked out for a POLYGON layer that did not have > >>> a > >>> tiledindex. The following worked perfect: LAYER > >>> NAME "name" > >>> TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "C:\shapefile.shp" ... > >>> END > >>> However, this will not work for tiledindex. On the doc page for OGR > >>> it > >>> says the following should work but it does not. LAYER > >>> NAME "nam" > >>> TYPE POLYGON > >>> CONNECTIONTYPE OGR > >>> TILEINDEX "C:\tiledindex.shp" > >>> ... END The first entry in the tiled index is for c:\shapefile.shp > >>> but > >>> it returns the following error: msDrawMap(): Image handling error. > >>> Failed to draw layer named 'nam'. msOGRFileOpen(): OGR error. Open > >>> failed for OGR connection `c:\shapefile'. File not found or > >>> unsupported > >>> format. Any ideas why the tiledindex wouldn't work? I have used > >>> tiledindexes for points and lines and it works fine. Thanks again! > >>> Gerard B. > >>> > >>>> From: Bart van den Eijnden > >>> > >>>> Reply-To: Bart van den Eijnden > >>> > >>>> To: MAPSERVER-USERS at LISTS.UMN.EDU > >>> > >>>> Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in > >>>> arcgis > >>>> but not > >>> mapserver > >>>> Date: Wed, 13 Apr 2005 21:18:12 +0200 > >>> > >>>> > >>> > >>>> Hi, > >>> > >>>> > >>> > >>>> It should work if you are using Mapserver 4.4 or later. > >>> > >>>> > >>> > >>>> Otherwise try showing it through OGR. > >>> > >>>> > >>> > >>>> CONNECTIONTYPE OGR > >>> > >>>> CONNECTION "path/my.shp" > >>> > >>>> > >>> > >>>> Best regards, > >>> > >>>> Bart > >>> > >>>> > >>> > >>>> On Wed, 13 Apr 2005 16:45:50 -0230, gerard barrington > >>> > >>>> wrote: > >>> > >>>> > >>> > >>>>> I checked with ogrinfo and the shapefile is a <3D POLYGON>. Other > >>> > >>>>> shape > >>> > >>>>> files I have show up simply as when checked with > >>>>> ogrinfo. > >>> > >>>>> Is > >>> > >>>>> there anything i can do to show this polygon in mapserver? > >>> > >>>>> > >>> > >>>>>> From: Bart van den Eijnden > >>> > >>>>> > >>> > >>>>>> Reply-To: Bart van den Eijnden > >>> > >>>>> > >>> > >>>>>> To: MAPSERVER-USERS at LISTS.UMN.EDU > >>> > >>>>> > >>> > >>>>>> Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in > >>> > >>>>>> arcgis > >>> > >>>>>> but not > >>> > >>>>> mapserver > >>> > >>>>>> Date: Wed, 13 Apr 2005 20:32:42 +0200 > >>> > >>>>> > >>> > >>>>>> > >>> > >>>>> > >>> > >>>>>> Hi, > >>> > >>>>> > >>> > >>>>>> > >>> > >>>>> > >>> > >>>>>> are you sure it is not a polyline shape? Did you try TYPE LINE? > >>> > >>>>> > >>> > >>>>>> > >>> > >>>>> > >>> > >>>>>> Otherwise open it up with ogrinfo and see what it says > >>> > >>>>> > >>> > >>>>>> (http://fwtools.maptools.org). > >>> > >>>>> > >>> > >>>>>> > >>> > >>>>> > >>> > >>>>>> Best regards, > >>> > >>>>> > >>> > >>>>>> Bart > >>> > >>>>> > >>> > >>>>>> > >>> > >>>>> > >>> > >>>>>> On Wed, 13 Apr 2005 16:04:39 -0230, gerard barrington > >>> > >>>>> > >>> > >>>>>> wrote: > >>> > >>>>> > >>> > >>>>>> > >>> > >>>>> > >>> > >>>>>>> Hi list, I have a polygon shapefile which I can open and view > >>>>>>> in > >>> > >>>>> > >>> > >>>>>>> ArcExplorer and everything looks perfect. However, when I try > >>>>>>> to > >>> > >>>>> > >>> > >>>>>>> use the > >>> > >>>>> > >>> > >>>>>>> same shapefile as data for a LAYER of TYPE POLYGON, I get the > >>> > >>>>> > >>> > >>>>>>> following > >>> > >>>>> > >>> > >>>>>>> exception: msDrawMap(): Image handling error. Failed to draw > >>> > >>>>>>> layer > >>> > >>>>> > >>> > >>>>>>> named > >>> > >>>>> > >>> > >>>>>>> 'aal135'. msDrawShape(): General error message. Only polygon > >>> > >>>>>>> shapes > >>> > >>>>> > >>> > >>>>>>> can > >>> > >>>>> > >>> > >>>>>>> be drawn using a POLYGON layer definition. So I tried switching > >>> > >>>>>>> the > >>> > >>>>> > >>> > >>>>>>> TYPE > >>> > >>>>> > >>> > >>>>>>> in my layer to POINT and a couple of points along the border of > >>> > >>>>>>> the > >>> > >>>>> > >>> > >>>>>>> polygon showed up. I know the shapefile is a polygon though > >>> > >>>>>>> because > >>> > >>>>> > >>> > >>>>>>> it > >>> > >>>>> > >>> > >>>>>>> displays as the correct shape in arcExplorer. Can someone tell > >>>>>>> me > >>> > >>>>> > >>> > >>>>>>> why > >>> > >>>>> > >>> > >>>>>>> the polygon will show up in ArcExplorer but not in mapserver? > >>>>>>> Is > >>> > >>>>> > >>> > >>>>>>> there > >>> > >>>>> > >>> > >>>>>>> anything I can do to fix this problem?? I am at real loss here > >>> > >>>>>>> for > >>> > >>>>> > >>> > >>>>>>> why > >>> > >>>>> > >>> > >>>>>>> this happens and would really appreciate any help.... Thanks > >>> > >>>>>>> Gerard > >>> > >>>>> > >>> > >>>>>>> B > >>> > >>>>> > >>> > >>>>>> > >>> > >>>>> > >>> > >>>>>> > >>> > >>>>> > >>> > >>>>>> > >>> > >>>>> > >>> > >>>>>> -- > >>> > >>>>> > >>> > >>>>>> Using Opera's revolutionary e-mail client: > >>> > >>>>>> http://www.opera.com/m2/ > >>> > >>>>> > >>> > >>>> > >>> > >>>> > >>> > >>>> > >>> > >>>> -- > >>> > >>>> Using Opera's revolutionary e-mail client: > >>>> http://www.opera.com/m2/ > >>> > >> > >> > >> > >> -- > >> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From pauljame at GMAIL.COM Thu Apr 14 12:44:24 2005 From: pauljame at GMAIL.COM (Paul james) Date: Thu, 14 Apr 2005 16:44:24 -0300 Subject: Find a line(road) ... Message-ID: How can I find the line(road) through the point X ? --- From woodbri at SWOODBRIDGE.COM Thu Apr 14 12:49:41 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Thu, 14 Apr 2005 15:49:41 -0400 Subject: Find a line(road) ... In-Reply-To: <33fad6880504141244703be04f@mail.gmail.com> Message-ID: Paul james wrote: > How can I find the line(road) through the point X ? In mapserver you would want to do a Query. You can also specify the tolerance to select lines withing the bounding box about X +- tolerance. I think there is an example of this in the mapserver demo. -Steve From pauljame at GMAIL.COM Thu Apr 14 12:58:07 2005 From: pauljame at GMAIL.COM (Paul james) Date: Thu, 14 Apr 2005 16:58:07 -0300 Subject: Find a line(road) ... In-Reply-To: <425EC955.2030106@swoodbridge.com> Message-ID: Thank you... but... What kind of query?? Do you have any sample? ps.: im using php mapscript On 4/14/05, Stephen Woodbridge wrote: > Paul james wrote: > > How can I find the line(road) through the point X ? > > In mapserver you would want to do a Query. You can also specify the > tolerance to select lines withing the bounding box about X +- tolerance. > > I think there is an example of this in the mapserver demo. > > -Steve > From bartvde at XS4ALL.NL Thu Apr 14 12:55:24 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Thu, 14 Apr 2005 21:55:24 +0200 Subject: Find a line(road) ... In-Reply-To: <33fad68805041412586d0a9690@mail.gmail.com> Message-ID: Hi, see: http://mapserver.gis.umn.edu/doc44/phpmapscript-class-guide.html int queryByPoint(pointObj point, int mode, double buffer) Best regards, Bart On Thu, 14 Apr 2005 16:58:07 -0300, Paul james wrote: > Thank you... but... > What kind of query?? > > Do you have any sample? > > ps.: im using php mapscript > > On 4/14/05, Stephen Woodbridge wrote: >> Paul james wrote: >> > How can I find the line(road) through the point X ? >> >> In mapserver you would want to do a Query. You can also specify the >> tolerance to select lines withing the bounding box about X +- tolerance. >> >> I think there is an example of this in the mapserver demo. >> >> -Steve >> > > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From nunoragil at GMAIL.COM Thu Apr 14 13:12:37 2005 From: nunoragil at GMAIL.COM (Nuno Gil) Date: Thu, 14 Apr 2005 21:12:37 +0100 Subject: GDAL virtual raster file In-Reply-To: <931f8ea905041212071c5bc29e@mail.gmail.com> Message-ID: Dear Frank/Listers, There was no problem in creating the virtual files or the shape index file. The problem now is with the overviews... Each original Landsat file is about 300 Mb, so when MapServer is requesting each tile it is asking for a 300 x 3 Mb file (RGB bands). I created overviews with "gdaladdo -r average cover.vrt 5 10 50 100" but when trying to access all of them (100 landsat images) in the webclient it takes a lot of time. If I first zoom in (lets say the UK) and then request the layer (Europe Landsat 5) the performance is ok. You can take a look at http://iceds.ge.ucl.ac.uk:8080/viewer/iceds/index.html Could this have to do with the overviews? Perhaps not enough levels? Can it be also the number of tiles MapServer is requesting at the same time (100 tiles)? Should I aggregate them first? Thanks, Nuno On 4/12/05, Frank Warmerdam wrote: > On Apr 12, 2005 2:44 PM, Nuno Gil wrote: > > Dear Listers, > > I have some Landsat5 images in arcinfo grid format - they are > > separated by bands. > > I was trying to compose the bands together without creating more files. > > Is it possible to create a vrt GDAL virtual raster file from three > > different grid files (one for each visible band)? > > Nuno, > > Yes, you can do this. The "easiest" way would likely be to > use gdal_translate to convert one of the files to VRT format. > Then hand edit that .vrt file, duplicating the band data for the > additional two bands and editing the filenames, and band index > values accordingly. > > Copying to VRT with gdal_translate is done like this: > > gdal_translate -of VRT incover out.vrt > > This just makes a VRT file "linked" back to the source file, but > with all metadata and georeferencing duplicated in the VRT. > > > Is it possible afterwards to get MapServer to read it? What do I need > > to include in my map file? > > Just reference the .vrt file. > > > Since I have a bunch of grids (5? x 5?) can I use something like > > gdaltindex to create a shapefile index for the virtual files? > > Yes, you should be able to run gdaltindex on the .vrt's normally. > > Best regards, > -- > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent > From fwarmerdam at GMAIL.COM Thu Apr 14 13:27:11 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Thu, 14 Apr 2005 16:27:11 -0400 Subject: GDAL virtual raster file In-Reply-To: Message-ID: On 4/14/05, Nuno Gil wrote: > Dear Frank/Listers, > There was no problem in creating the virtual files or the shape index file. > The problem now is with the overviews... Each original Landsat file is > about 300 Mb, so when MapServer is requesting each tile it is asking > for a 300 x 3 Mb file (RGB bands). > I created overviews with "gdaladdo -r average cover.vrt 5 10 50 100" > but when trying to access all of them (100 landsat images) in the > webclient it takes a lot of time. If I first zoom in (lets say the UK) > and then request the layer (Europe Landsat 5) the performance is ok. > You can take a look at > http://iceds.ge.ucl.ac.uk:8080/viewer/iceds/index.html > Could this have to do with the overviews? Perhaps not enough levels? > Can it be also the number of tiles MapServer is requesting at the same > time (100 tiles)? Should I aggregate them first? Nuno, The traditional approach to this is to prepare composite "overviews" that would apply at large scales. So you would set a MAXSCALE on the tile indexed layer at some reasonable level (perhaps a scale were the user is likely to be seeing more than 9 images or so. And then create a new layer - the overview version - with it's MINSCALE set to the same thing. This layer can be just a single file at a very much reduced resolution - matching the scale at which it kicks in. I would suggest actually using MapServer to generate it from the other layer -- perhaps using shp2img or just doing it on the web. Now, I am fluffing over lots of details of how to compute the scales, and build the alternative overview but then I get confused about those details. :-) They are solvable but a bit messy. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From bluetuna_goes_skying at YAHOO.CO.UK Thu Apr 14 13:41:08 2005 From: bluetuna_goes_skying at YAHOO.CO.UK (=?iso-8859-1?q?jo=FFffffffffffe3o=20Antunes?=) Date: Thu, 14 Apr 2005 21:41:08 +0100 Subject: Could not find config.h or php_config.h in /usr Message-ID: Hello everybody, I am trying to compile Mapserver on Linux RedHat9 having already apache, php installed and running in my system. I am using the option --with-php=/usr/include in configure command so that I can compile the module for mapscript as well.. I keep getting this error message: !!! Could not find config.h or php_config.h in /usr. !!! !!! Has PHP been configured yet? !!! I know this problem has been discussed earlier but found no solution.. Can someone give a clue on how to solve this? thank you so much Joao Antunes Send instant messages to your online friends http://uk.messenger.yahoo.com From nunoragil at GMAIL.COM Thu Apr 14 13:43:02 2005 From: nunoragil at GMAIL.COM (Nuno Gil) Date: Thu, 14 Apr 2005 21:43:02 +0100 Subject: GDAL virtual raster file In-Reply-To: <931f8ea9050414132759648739@mail.gmail.com> Message-ID: Frank, Ok, so if I understand you correctly one layer calls the original full-res tiles and then another one call the overviews. My overview files have an "ovr" extension and when creating the index file for them I get It appears no georeferencing is available for `landsat/europe/5degvirtual/w10_n40.vrt.ovr', skipping. Greetings, Nuno On 4/14/05, Frank Warmerdam wrote: > On 4/14/05, Nuno Gil wrote: > > Dear Frank/Listers, > > There was no problem in creating the virtual files or the shape index file. > > The problem now is with the overviews... Each original Landsat file is > > about 300 Mb, so when MapServer is requesting each tile it is asking > > for a 300 x 3 Mb file (RGB bands). > > I created overviews with "gdaladdo -r average cover.vrt 5 10 50 100" > > but when trying to access all of them (100 landsat images) in the > > webclient it takes a lot of time. If I first zoom in (lets say the UK) > > and then request the layer (Europe Landsat 5) the performance is ok. > > You can take a look at > > http://iceds.ge.ucl.ac.uk:8080/viewer/iceds/index.html > > Could this have to do with the overviews? Perhaps not enough levels? > > Can it be also the number of tiles MapServer is requesting at the same > > time (100 tiles)? Should I aggregate them first? > > Nuno, > > The traditional approach to this is to prepare composite "overviews" > that would apply at large scales. So you would set a MAXSCALE > on the tile indexed layer at some reasonable level (perhaps a scale > were the user is likely to be seeing more than 9 images or so. And > then create a new layer - the overview version - with it's MINSCALE > set to the same thing. This layer can be just a single file at a very > much reduced resolution - matching the scale at which it kicks in. > > I would suggest actually using MapServer to generate it from the > other layer -- perhaps using shp2img or just doing it on the web. > > Now, I am fluffing over lots of details of how to compute the scales, > and build the alternative overview but then I get confused about > those details. :-) They are solvable but a bit messy. > > Best regards, > -- > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent > From pauljame at GMAIL.COM Thu Apr 14 13:43:36 2005 From: pauljame at GMAIL.COM (Paul james) Date: Thu, 14 Apr 2005 17:43:36 -0300 Subject: Find a line(road) ... In-Reply-To: Message-ID: Thx for the help... So, I have two layers: a point layer and a line layer - citys and roads... I selected a point and did: $point = ms_newpointObj(); $point->setXY($x,$y); $layer = $map->getLayerByName('LINE'); if($layer1->queryBypoint($point,MS_SINGLE,-1) == MS_SUCCESS) echo "Success : $buffer"; but It always fail ... I have sure that the line through the point... And my layers have a Template tag... any idea? On 4/14/05, Bart van den Eijnden wrote: > Hi, > > see: > > http://mapserver.gis.umn.edu/doc44/phpmapscript-class-guide.html > > int queryByPoint(pointObj point, int mode, double buffer) > > Best regards, > Bart > > On Thu, 14 Apr 2005 16:58:07 -0300, Paul james wrote: > > > Thank you... but... > > What kind of query?? > > > > Do you have any sample? > > > > ps.: im using php mapscript > > > > On 4/14/05, Stephen Woodbridge wrote: > >> Paul james wrote: > >> > How can I find the line(road) through the point X ? > >> > >> In mapserver you would want to do a Query. You can also specify the > >> tolerance to select lines withing the bounding box about X +- tolerance. > >> > >> I think there is an example of this in the mapserver demo. > >> > >> -Steve > >> > > > > > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > From wouter.schaubroeck at GMAIL.COM Thu Apr 14 14:21:36 2005 From: wouter.schaubroeck at GMAIL.COM (Wouter Schaubroeck) Date: Thu, 14 Apr 2005 23:21:36 +0200 Subject: dynamic point generation with php-mapscript Message-ID: Hi, I was wondering if anyone would know some good examples of generating dynamic points with php mapscript? For example: just pulling the points from (in my case: a MySQL db) a database and displaying them without a shape file? And is it possible to do queries on that layer, or displaying the attribute data? I assume not, because there's no associated dbf file. Best regards, Wouter Schaubroeck From bcrocks at GMAIL.COM Thu Apr 14 14:22:18 2005 From: bcrocks at GMAIL.COM (BC Rocks) Date: Thu, 14 Apr 2005 15:22:18 -0600 Subject: Segmentation fault: PHP Mapscript related? In-Reply-To: <1f2e23be0504140952157e311@mail.gmail.com> Message-ID: Some have suggested successful compilations against PHP5 using --with-regex=system, but I can't get PHP to bite on that setting either (i.e., it always uses the built in regex regardless). I also tried a recompilation of an extremely basic PHP: ./configure --prefix=/usr --with-apxs2=/usr/sbin/apxs2 But still no luck. Others have suggested dropping back to PHP 4, but we are using some of the new functionality within 5, so a shift back to 4 is just not possible. Any more ideas? Thanks, BC On 4/14/05, BC Rocks wrote: > Thanks Rhys. I tried with GDAL 1.2.5 and tried without GDAL at > all...and still get segfaults. > > Anyone else with ideas? > > Thanks, > BC > > On 4/13/05, Rhys Ickeringill wrote: > > BC, > > > > I'm pretty new to MapServer myself, but since your not having any luck I > > thought I'd share my limited experiences. > > > > Basically I can't get MapServer with mapscript to work when I compile and > > link Mapserver against GDAL 1.2.6, but if I do the same against GDAL 1.2.5 > > everything works as it should. Since nobody else has mentioned this I'd just > > assumed it was something I was doing wrong. But perhaps it is worth a try? > > > > Rhys > > > > > > ----- Original Message ----- > > From: "BC Rocks" > > To: > > Sent: Thursday, April 14, 2005 6:28 AM > > Subject: Re: [UMN_MAPSERVER-USERS] Segmentation fault: PHP Mapscript > > related? > > > > Thanks Toomas, > > > > I tried what you suggested: PHP and Mapserver are explicitly using > > --with-gd=/usr/local > > but I still segfault. I even tried compiling PHP with no GD support, > > but no luck (segfault). FYI, I did have 2 versions of GD installed, > > but I uninstalled one and am left with gd-2.0.33. Still segfaulting > > > > BTW, here is my GDAL config (just in case there are other blatent > > conflicting libraries I am overlooking): > > ./configure --enable-shared --with-png=/usr/lib --with-jpeg=/usr/lib > > --with-pg=/var/lib/pgsql/bin/pg_config --with-geos=yes > > --with-libtiff=/usr/local/lib --with-geotiff=yes --with-ecw=yes > > (ecw did not work) > > > > Any other thoughts? > > > > Thanks, > > BC > > > > On 4/13/05, Toomas Aas wrote: > > > BC Rocks wrote: > > > > > > > PHP was configured as follows (as I am successfully using on another > > > > box): ./configure --build=i686-mandrake-linux-gnu --prefix=/usr > > > > --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin > > > > --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include > > > > --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var/lib > > > > --sharedstatedir=/usr/com --mandir=/usr/share/man > > > > --infodir=/usr/share/info --enable-discard-path > > > > --enable-force-cgi-redirect --enable-shared --disable-static > > > > --disable-debug --disable-rpath --enable-pic > > > > --enable-inline-optimization --enable-memory-limit > > > > --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php > > > > --with-pear=/usr/share/pear --enable-magic-quotes --enable-debugger > > > > --enable-track-vars --with-exec-dir=/usr/bin --with-versioning > > > > --with-mod_charset --with-regex=php --enable-track-vars > > > > --enable-trans-sid --enable-safe-mode --enable-ctype --enable-ftp > > > > --with-gettext=/usr --enable-posix --enable-session --enable-sysvsem > > > > --enable-sysvshm --enable-yp --with-openssl=/usr --without-kerberos > > > > --with-ttf --with-freetype-dir=/usr/include/freetype2 > > > > --with-zlib=/usr --with-zlib=/usr --with-zlib-dir=/usr --with-pear > > > > --with-jpeg-dir=/usr --with-png-dir=/usr --with-gd > > > > --enable-gd-native-ttf --with-pgsql=/var/lib/pgsql/ --without-iodbc > > > > --without-custom-odbc --without-unixODBC --without-dbmaker > > > > --enable-soap --with-xml=/usr/include/libxml2/libxml > > > > --with-apxs2=/usr/sbin/apxs2 --with-mcrypt=/usr/local/lib > > > > --with-curl=/usr/local/include > > > > > > > > Mapserver configure parameters are as follows: ./configure > > > > --with-php=/usr/include/php > > > > --with-php-regex-dir=/usr/src/php/php-5.0.4/regex > > > > --with-jpeg=/usr/lib --with-png=/usr/lib > > > > --with-freetype=/usr/bin/freetype-config --with-proj --with-gd > > > > --without-pdf --with-geos=/usr/local/bin/geos-config --with-gdal > > > > --with-postgis=/var/lib/pgsql/bin/pg_config --without-tiff > > > > --with-wmsclient --with-wfsclient --with-wcs > > > > --with-curl-config=/usr/bin --with-ogr --with-httpd=/usr/sbin/httpd2 > > > > > > I notice that you have used --with-gd both when compiling PHP and > > Mapserver. > > > > > > Actually, you should use something like --with-gd=/usr when compiling > > > PHP. Otherwise PHP gets compiled with it's bundled version of GD, and > > > php_mapscript.so gets compiled with whatever version of GD is found at > > > build time. If these versions don't match exactly, nasty things can > > happen. > > > > > > Substitute the real path where GD is installed instead of /usr, of course. > > > > > > To be really sure, use the same path when compiling Mapserver. If you > > > have only one version of GD installed on your system, it shouldn't > > > matter, but better safe than sorry. > > > > > > > I read some threads with regard to GDAL and JPG/TIFF issues (I did > > > > try using the internal GDAL libs), but I don't think that is the > > > > issue... especially since if I pull the php, things compile. > > > > > > This seems a likely indication of conflicting GD versions between PHP > > > and Mapserver. > > > > > > -- > > > Toomas > > > > > > From numerous at GMAIL.COM Thu Apr 14 14:57:12 2005 From: numerous at GMAIL.COM (Yar Doroshenko) Date: Thu, 14 Apr 2005 16:57:12 -0500 Subject: MrSID support in Mapserver 4.4.1 Message-ID: Hi Guys, Need some help: I'm running Mapserver 4.4.1 on a Windows machine. I am using PHP. I got the source code from http://mapserver.gis.umn.edu/win32binaries.html (ms441oci.zip) It is compiled with GDAL, but GDAL that it's compiled with doesn't support MrSID. I got LizardTech DSDK and compiled my own GDAL 1.2.5 It compiled fine, I'm able to view MrSID images with the mrsidviewer. gdalinfo works fine on my mrsid image, see output below. I want to use MrSID since my MrSIDs are only 60-70 Mb, and when I convert them to TIF - they grow to 1.7 Gb each. The question is: how do I make my Mapserver 4.4.1 from http://mapserver.gis.umn.edu/win32binaries.html work with my GDAL 1.2.5 ??? Of course, I could compile my own Mapserver - but that's a very error-prone process on a Windows machine. Does anyone know of an option to reconfigure Mapserver 4.4.1 installation without having to rebuild it? Do I simply need to point it to use frmts\mrsid drivers? Is there any way to achieve this? I will be glad to share my GDAL 1.2.5 with MrSID support. Here is how I defined my MrSID layer: LAYER NAME "14_1_1.sid" data mrsid type raster status default END Here is gdalinfo output for my mrsid image: C:\ITS\GDAL\125\bin>gdalinfo C:\ITS\Apache2 \htdocs\statewide\shape_files\mrsid\1 4_1_1.sid Driver: MrSID/Multi-resolution Seamless Image Database (MrSID) Size is 24066, 25370 Coordinate System is: PROJCS["unnamed", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.2572221010002, AUTHORITY["EPSG","7019"]], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4269"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-99], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26914"]] Origin = (653334.000000,3916062.000000) Pixel Size = (0.30000000,-0.30000000) Metadata: GEOTIFF_CHAR__GTModelTypeGeoKey=ModelTypeProjected GEOTIFF_CHAR__GTRasterTypeGeoKey=RasterPixelIsArea GEOTIFF_CHAR__ProjectedCSTypeGeoKey=PCS_NAD83_UTM_zone_14N GEOTIFF_CHAR__ProjLinearUnitsGeoKey=Linear_Meter GEOTIFF_NUM__1024__GTModelTypeGeoKey=1 GEOTIFF_NUM__1025__GTRasterTypeGeoKey=1 GEOTIFF_NUM__1026__GTCitationGeoKey=IMAGINE GeoTIFF Support Copyright 1991 - 2001 by ERDAS, Inc. All Rights Reserved @(#)$RCSfile: egtf.c $ $Revision: 1.9.2.4 $ $Date: 2002/01/24 16:43:13Z $ Projection Name = NAD_1983_UTM_Zone_14N Units = meters GeoTIFF Units = meters GEOTIFF_NUM__3072__ProjectedCSTypeGeoKey=26914 GEOTIFF_NUM__3073__PCSCitationGeoKey=IMAGINE GeoTIFF Support Copyright 1991 - 2001 by ERDAS, Inc. All Rights Reserved @(#)$RCSfile: egtf.c $ $Revision: 1.9.2.4 $ $Date: 2002/01/24 16:43:13Z $ UTM Zone 14N Ellipsoid = GRS 1980 Datum = NAD83 GEOTIFF_NUM__3076__ProjLinearUnitsGeoKey=9001 IMAGE__BITS_PER_SAMPLE=8 IMAGE__COLOR_SCHEME=0 IMAGE__COMPRESSION_BLOCK_SIZE=512 IMAGE__COMPRESSION_GAMMA=2.000000 IMAGE__COMPRESSION_NLEV=9 IMAGE__COMPRESSION_VERSION=2,0,0 IMAGE__COMPRESSION_WEIGHT=2.000000 IMAGE__CREATION_DATE=Fri Apr 16 18:34:39 2004 IMAGE__DATA_TYPE=0 IMAGE__DYNAMIC_RANGE_LEVEL=127.500000 IMAGE__DYNAMIC_RANGE_WINDOW=256.000000 IMAGE__HEIGHT=25370 IMAGE__INPUT_FILE_SIZE=1831867219.000000 IMAGE__INPUT_FORMAT=GeoTIFF IMAGE__INPUT_NAME=I:\OKC_High_Res\14_1_area01\ochipdata.tif IMAGE__TARGET_COMPRESSION_RATIO=20.000000 IMAGE__WIDTH=24066 IMAGE__XY_ORIGIN=653334.150000,3916061.850000 IMAGE__X_RESOLUTION=0.300000 IMAGE__Y_RESOLUTION=0.300000 Corner Coordinates: Upper Left ( 653334.000, 3916062.000) ( 97d18'43.12"W, 35d22'34.01"N) Lower Left ( 653334.000, 3908451.000) ( 97d18'48.26"W, 35d18'27.06"N) Upper Right ( 660553.800, 3916062.000) ( 97d13'57.11"W, 35d22'29.92"N) Lower Right ( 660553.800, 3908451.000) ( 97d14'2.49"W, 35d18'22.98"N) Center ( 656943.900, 3912256.500) ( 97d16'22.74"W, 35d20'28.52"N) Band 1 Block=24066x64 Type=Byte, ColorInterp=Red Overviews: 12033x12685, 6017x6343, 3009x3172, 1505x1586, 753x793, 377x397, 189 x199, 95x100 Band 2 Block=24066x64 Type=Byte, ColorInterp=Green Overviews: 12033x12685, 6017x6343, 3009x3172, 1505x1586, 753x793, 377x397, 189 x199, 95x100 Band 3 Block=24066x64 Type=Byte, ColorInterp=Blue Overviews: 12033x12685, 6017x6343, 3009x3172, 1505x1586, 753x793, 377x397, 189 x199, 95x100 C:\ITS\GDAL\125\bin> THANK YOU!!!! From jalfarid at GMAIL.COM Thu Apr 14 15:34:12 2005 From: jalfarid at GMAIL.COM (Farid Vakilzadeh) Date: Thu, 14 Apr 2005 18:34:12 -0400 Subject: Problem when using tile index Message-ID: Hi all, I want to use tile index files in mapserver. I have several geo referenced raster files( .tif ) and I made a shape file by using GDAL "gdaltindex" utility. Then I put some related lines in map file but I can not see my raster file. Does any one have a sample of a map file in this field to help me? Thanks Farid From ierickson at ANALYGIS.COM Thu Apr 14 18:19:12 2005 From: ierickson at ANALYGIS.COM (Ian Erickson) Date: Thu, 14 Apr 2005 18:19:12 -0700 Subject: SUM: Problems w/ C# Message-ID: I wanted to thank everyone who made suggestions for the MapScript C# questions I had. The answer was actually a combination of issues: 1) I compiled the base MapServer (and dependent libraries) on a VC.NET installation - not VC6. That was mistake #1. I have now recompiled on a VC6 installation. 2) I compiled all dependent modules with the /MT flag not /MD as is the default with the win32 makefiles. 3) I made sure to include the -DUSE_THREADS option as part OPTFLAGS when compiling MapServer. So far, the wrapper is working flawlessly (excuse me while I knock on the nearest wood surface). Thanks again to those who pointed me in the right direction! -- Ian Erickson AnalyGIS, LLC From woodbri at SWOODBRIDGE.COM Thu Apr 14 21:29:55 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Fri, 15 Apr 2005 00:29:55 -0400 Subject: Find a line(road) ... In-Reply-To: <33fad68805041413437a5794ab@mail.gmail.com> Message-ID: Probably would be a good idea to post your mapfile. Have you set a TOLERANCE for the query? What? -Steve Paul james wrote: > Thx for the help... > So, I have two layers: a point layer and a line layer - citys and roads... > I selected a point and did: > > $point = ms_newpointObj(); > $point->setXY($x,$y); > $layer = $map->getLayerByName('LINE'); > if($layer1->queryBypoint($point,MS_SINGLE,-1) == MS_SUCCESS) > echo "Success : $buffer"; > > but It always fail ... I have sure that the line through the > point... And my layers have a Template tag... > > any idea? > > > On 4/14/05, Bart van den Eijnden wrote: > >>Hi, >> >>see: >> >>http://mapserver.gis.umn.edu/doc44/phpmapscript-class-guide.html >> >>int queryByPoint(pointObj point, int mode, double buffer) >> >>Best regards, >>Bart >> >>On Thu, 14 Apr 2005 16:58:07 -0300, Paul james wrote: >> >> >>>Thank you... but... >>>What kind of query?? >>> >>>Do you have any sample? >>> >>>ps.: im using php mapscript >>> >>>On 4/14/05, Stephen Woodbridge wrote: >>> >>>>Paul james wrote: >>>> >>>>>How can I find the line(road) through the point X ? >>>> >>>>In mapserver you would want to do a Query. You can also specify the >>>>tolerance to select lines withing the bounding box about X +- tolerance. >>>> >>>>I think there is an example of this in the mapserver demo. >>>> >>>>-Steve >>>> >>> >>> >>-- >>Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ >> > > From covariance at SHAW.CA Thu Apr 14 22:52:25 2005 From: covariance at SHAW.CA (Bob Bruce) Date: Fri, 15 Apr 2005 00:52:25 -0500 Subject: Imagemaps always empty Message-ID: On Thu, 14 Apr 2005 16:24:10 +0200, =?ISO-8859-1?Q?St=E9phane_RIFF?= wrote: >Another thought on mapserver source. >In mapdraw.c, the function "msDrawShape" : >There a switch on layer type in case MS_LAYER_POINT > > there is a loop on "shape->line[j].numpoints" but if it's a point layer > i think there is only one point so shape->line[0].point[0] is the >point we want to draw. > If we agree that the shape can only have one point we can pass a >shape object to "msDrawMarkerSymbol" > instead of a point object and in mapimagemap.c in the function >"msDrawMarkerSymbolIM" we can get the point x,y > with shape->line[0].point[0] and the shape index with shape->index >so we can get the point index in datasource > like polygons > >So my question is why point layer are process like a polygon layer by >msDrawShape ? > > >St?phane RIFF wrote: > >> I found why it doesn't work. >> When looking in mapimagemap.c i found >> that only symbol "0" are process so in the mapfile >> you have to set all your symbols to "0" or nothing process >> >> Another question how can i get id of a pointObj so i can query >> (shapefile or postgis) to get data from datasource instead of the >> layer name ??? >> >> St?phane RIFF wrote: >> >>> Hi >>> >>> I tried to make imagemap support to work with no success. >>> >>> I have a mapfile create with phpmapscript. there is one point layer, >>> this mapfile draws fine so i can see my symbols in a png image. >>> >>> Now i take the same mapfile with : >>> IMAGETYPE imagemap >>> >>> OUTPUTFORMAT >>> NAME imagemap >>> DRIVER imagemap >>> FORMATOPTION "POLYHREF=#" >>> FORMATOPTION "SYMBOLHREF=#" >>> FORMATOPTION "SUPPRESS=YES" >>> FORMATOPTION "MAPNAME=map_test" >>> FORMATOPTION "POLYMOUSEOUT=alert('poly out');" >>> FORMATOPTION "POLYMOUSEOVER=alert('poly %s');" >>> FORMATOPTION "SYMBOLMOUSEOUT=alert('symbol out');" >>> FORMATOPTION "SYMBOLMOUSEOVER=alert('symbol %s');" >>> MIMETYPE "text/html" >>> END >>> >>> With phpmapscript i do that : >>> $imagemap = >>> ms_newMapObj("/var/www/html/map/imagemap.map","/var/www/html/map/"); >>> $htmlmap = $imagemap->draw(); >>> $htmlmap->saveImage("/var/tmp/test.html", $imagemap); >>> >>> Here comes the problem : there is no error and tha imagemap file is >>> write well but i always get this in "/var/tmp/test.html": >>> >>> >>> >>> I use mapserver 4.4.2 , postgis , phpmapscript on redhat box. >>> >>> Every advice are welcome >>> Thanks >>> >>> >> >> >> St?phane: I have been doing some work on this very area with some help from Frank Warmerdam and Assefa Yewondwossen. The reason that the points are being retrieved and used is that these points trace the outline of the point object. However the work that was done on the code did not provide the ID of the point objects to the mapimagemap.c module for inclusion in the image map code to the web page. So I proceeded to modify some modules to pass the IDs down to this code and actually output them to the image maps. These changes were only implemented for VECTOR type symbols. Now I am getting image maps outlining the point symbols with the point IDs included in the event calls. My changes required making changes to the mapdraw.c module which is at a high level in the code and also I only modified the PHP version of MapScript. To this date I haven't submitted my changes to the system since I don't know how to go about doing this. Currently I am having trouble with my build on my Windows system but I don't think it is caused by my changes since I have seen other people reporting these problems on the list. I will try submitting my changes to the list soon though. I would be happy to provide you with my code changes if you want to try building this on your Redhat system. Just let me know if you want me to send this to you. Bob Bruce, Winnipeg, Manitoba From sc at BYTRON.COM Fri Apr 15 02:19:39 2005 From: sc at BYTRON.COM (sc) Date: Fri, 15 Apr 2005 10:19:39 +0100 Subject: Drawing points and lines dynamically Message-ID: Hi I am trying to plot a point at logitude 0.0, latitude 54.0 (somewhere in the UK), I am using mapscript/PHP but nothing appears on my map (no circle and no label). Below is the PHP code that should be displaying the point. The map is loading ok as I have a map of the UK and various other layers in my map file that I can switch on and off with no problems. One thing that I am confused about is to whether or not the layer that I want to create the point on has to be already defined in the map file or whether the code below actually creates a 'dynamic' layer. regards Simon $layer = ms_newLayerObj($map); $layer->set("name", "Route"); $layer->set("type", MS_LAYER_POINT); $layer->set("status", MS_DEFAULT); $layer->set("transform", TRUE); $class = ms_newClassObj($layer); $class->label->set("font", "arial"); $class->label->color->setRGB(255, 0, 0); $symbol = $map->getSymbolByName("circle"); $style = ms_newStyleObj($class); $style->set("symbol", $symbol); $style->set("size", 8); $style->color->setRGB(255, 0, 0); $image = $map->draw(); $point = ms_newPointObj(); $point->setXY(0.0, 54.0); $point->draw($map, $layer, $image, 0, "test"); $image_url=$image->saveWebImage(); -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 From logicalgenetics at GMAIL.COM Fri Apr 15 03:13:54 2005 From: logicalgenetics at GMAIL.COM (Dan Taylor) Date: Fri, 15 Apr 2005 11:13:54 +0100 Subject: Symbols within a polygon area Message-ID: I'd like to be able to show woodland on my maps as an outlined area containing scattered tree images. The best way to describe it, really, is to point people at this UK OS map... http://www.ordnancesurvey.co.uk/oswebsite/media/mediakit/photos/page3photo5.html Is this possible in mapserver? Ideally the tree symbols would be vector symbols, rather than bitmaps. Cheers, Dan -- Dan Taylor Software Development Engineer, JTL Systems Ltd PhD Student, Reading University, UK http://www.logicalgenetics.com From gavin.simpson at UCL.AC.UK Fri Apr 15 04:06:19 2005 From: gavin.simpson at UCL.AC.UK (Gavin Simpson) Date: Fri, 15 Apr 2005 12:06:19 +0100 Subject: dynamic point generation with php-mapscript In-Reply-To: <425EDEE0.6080004@gmail.com> Message-ID: Wouter Schaubroeck wrote: > Hi, > > I was wondering if anyone would know some good examples of generating > dynamic points with php mapscript? For example: just pulling the points > from (in my case: a MySQL db) a database and displaying them without a > shape file? And is it possible to do queries on that layer, or > displaying the attribute data? I assume not, because there's no > associated dbf file. > > Best regards, > > Wouter Schaubroeck > > See the PHP/Mapscript WIKI - which has such an example: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptAddPoint Querying that layer is more problematic. You need to create a shapeObj and addFeature()'s to that shapeObj etc: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples42ex1 shows you how to do this with Perl which is easily translated to PHP (I did it yesterday but my code is in a mess of other trial stuff just now), with one major exception! PHP/Mapscript is broken at the moment and you can't set the index of a shapeObj added to a layer (it needs to be numeric, integer, incrementing in steps of 1 - so not a arbitrary ordering of ID's from a mysql table index, currently it returns -1 error), which you need to have queryByPoint do anything useful etc. See: http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=806 A patch has been accepted for this bug so you can download a nightly or the cvs of mapserver (or replace php_mapscript.c in the tarball of mapserver4.4.2 with the one in that bug report) and roll your own php_mapscript.so. After a few errors I have just gotten this compiling as well (a nightly), so maybe I can query that layer after all... :-) Please note - I'm a mapserver virgin so I've been bumbling through this for only a day or so - feel free to email me further about this but I can't guarantee I'll be able to help much beyond providing some very early php code. G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [T] +44 (0)20 7679 5522 ENSIS Research Fellow [F] +44 (0)20 7679 7565 ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ 26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/ London. WC1H 0AP. %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% From logicalgenetics at GMAIL.COM Fri Apr 15 04:55:01 2005 From: logicalgenetics at GMAIL.COM (Dan Taylor) Date: Fri, 15 Apr 2005 12:55:01 +0100 Subject: dynamic point generation with php-mapscript In-Reply-To: <425FA02B.4000000@ucl.ac.uk> Message-ID: This is how I do it. Very basic though... function addpoints($map, $name, $points, $r, $g, $b, $symbol, $font_face, $font_size) { // Create a layer $layer = ms_newLayerObj($map); $layer->set("type", MS_LAYER_POINT); $layer->set("name", $name); $layer->set("status", MS_ON); // Create the default class and set up label $cl = ms_newClassObj($layer); $cl->set("status", MS_ON); $cl->label->set("size", $font_size); $cl->label->set("type", "MS_TRUETYPE"); $cl->label->set("font", $font_face); $cl->label->set("position", MS_LC); $cl->label->color->setRGB($r, $g, $b); $cl->label->outlinecolor->setRGB(0, 0, 0); // Create and set up style $sty = ms_newStyleObj($cl); $sty->set("symbolname", $symbol); $sty->color->setRGB($r, $g, $b); $sty->outlinecolor->setRGB(0, 0, 0); // Add points for($i = 0; $i < sizeof($points); $i++) { $point = ms_newPointObj(); $point->setXY($points[$i]->x, $points[$i]->y); $line = ms_newLineObj(); $line->add($point); $shape = ms_newShapeObj(MS_SHAPE_POINT); $shape->add($line); $shape->set("text", $points[$i]->text); $layer->addFeature($shape); } } Dan On 4/15/05, Gavin Simpson wrote: > Wouter Schaubroeck wrote: > > Hi, > > > > I was wondering if anyone would know some good examples of generating > > dynamic points with php mapscript? For example: just pulling the points > > from (in my case: a MySQL db) a database and displaying them without a > > shape file? And is it possible to do queries on that layer, or > > displaying the attribute data? I assume not, because there's no > > associated dbf file. > > > > Best regards, > > > > Wouter Schaubroeck > > > > > > See the PHP/Mapscript WIKI - which has such an example: > > http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptAddPoint > > Querying that layer is more problematic. You need to create a shapeObj > and addFeature()'s to that shapeObj etc: > > http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples42ex1 > shows you how to do this with Perl which is easily translated to PHP (I > did it yesterday but my code is in a mess of other trial stuff just > now), with one major exception! PHP/Mapscript is broken at the moment > and you can't set the index of a shapeObj added to a layer (it needs to > be numeric, integer, incrementing in steps of 1 - so not a arbitrary > ordering of ID's from a mysql table index, currently it returns -1 > error), which you need to have queryByPoint do anything useful etc. See: > http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=806 > > A patch has been accepted for this bug so you can download a nightly or > the cvs of mapserver (or replace php_mapscript.c in the tarball of > mapserver4.4.2 with the one in that bug report) and roll your own > php_mapscript.so. > > After a few errors I have just gotten this compiling as well (a > nightly), so maybe I can query that layer after all... :-) > > Please note - I'm a mapserver virgin so I've been bumbling through this > for only a day or so - feel free to email me further about this but I > can't guarantee I'll be able to help much beyond providing some very > early php code. > > G > > -- > %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% > Gavin Simpson [T] +44 (0)20 7679 5522 > ENSIS Research Fellow [F] +44 (0)20 7679 7565 > ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk > UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ > 26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/ > London. WC1H 0AP. > %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% > -- Dan Taylor Software Development Engineer, JTL Systems Ltd PhD Student, Reading University, UK http://www.logicalgenetics.com From gavin.simpson at UCL.AC.UK Fri Apr 15 05:36:48 2005 From: gavin.simpson at UCL.AC.UK (Gavin Simpson) Date: Fri, 15 Apr 2005 13:36:48 +0100 Subject: dynamic point generation with php-mapscript In-Reply-To: <830dd37405041504556c0c9f41@mail.gmail.com> Message-ID: Dan Taylor wrote: > This is how I do it. Very basic though... > > function addpoints($map, $name, $points, $r, $g, $b, $symbol, > $font_face, $font_size) > { > // Create a layer > $layer = ms_newLayerObj($map); > $layer->set("type", MS_LAYER_POINT); > $layer->set("name", $name); > $layer->set("status", MS_ON); > > // Create the default class and set up label > $cl = ms_newClassObj($layer); > $cl->set("status", MS_ON); > $cl->label->set("size", $font_size); > $cl->label->set("type", "MS_TRUETYPE"); > $cl->label->set("font", $font_face); > $cl->label->set("position", MS_LC); > $cl->label->color->setRGB($r, $g, $b); > $cl->label->outlinecolor->setRGB(0, 0, 0); > > // Create and set up style > $sty = ms_newStyleObj($cl); > $sty->set("symbolname", $symbol); > $sty->color->setRGB($r, $g, $b); > $sty->outlinecolor->setRGB(0, 0, 0); > > // Add points > for($i = 0; $i < sizeof($points); $i++) > { > $point = ms_newPointObj(); > $point->setXY($points[$i]->x, $points[$i]->y); > > $line = ms_newLineObj(); > $line->add($point); > > $shape = ms_newShapeObj(MS_SHAPE_POINT); > $shape->add($line); > $shape->set("text", $points[$i]->text); > > $layer->addFeature($shape); > } > } > > Dan Cheers for this Dan, So how do you query the layer you created dynamically? From what I read in the archives etc, the index needs to be set to use queryByPoint() on the dynamic layer and the released code (4.4.2 - I just compiled it to confirm and it is broken, index is readonly) of mapscript. Index gets set as -1 for all shapeObj's added to the layer and queryByPoint doesn't work. I'd be interested to know how are querying the dynamic layer so that you can determine which point was clicked on and therefore, which row of data to extract from a database. All the best, Gav > On 4/15/05, Gavin Simpson wrote: > >>Wouter Schaubroeck wrote: >> >>>Hi, >>> >>>I was wondering if anyone would know some good examples of generating >>>dynamic points with php mapscript? For example: just pulling the points >>>from (in my case: a MySQL db) a database and displaying them without a >>>shape file? And is it possible to do queries on that layer, or >>>displaying the attribute data? I assume not, because there's no >>>associated dbf file. >>> >>>Best regards, >>> >>>Wouter Schaubroeck >>> >>> >> >>See the PHP/Mapscript WIKI - which has such an example: >> >>http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptAddPoint >> >>Querying that layer is more problematic. You need to create a shapeObj >>and addFeature()'s to that shapeObj etc: >> >>http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples42ex1 >>shows you how to do this with Perl which is easily translated to PHP (I >>did it yesterday but my code is in a mess of other trial stuff just >>now), with one major exception! PHP/Mapscript is broken at the moment >>and you can't set the index of a shapeObj added to a layer (it needs to >>be numeric, integer, incrementing in steps of 1 - so not a arbitrary >>ordering of ID's from a mysql table index, currently it returns -1 >>error), which you need to have queryByPoint do anything useful etc. See: >>http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=806 >> >>A patch has been accepted for this bug so you can download a nightly or >>the cvs of mapserver (or replace php_mapscript.c in the tarball of >>mapserver4.4.2 with the one in that bug report) and roll your own >>php_mapscript.so. >> >>After a few errors I have just gotten this compiling as well (a >>nightly), so maybe I can query that layer after all... :-) >> >>Please note - I'm a mapserver virgin so I've been bumbling through this >>for only a day or so - feel free to email me further about this but I >>can't guarantee I'll be able to help much beyond providing some very >>early php code. >> >>G >> >>-- >>%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% >>Gavin Simpson [T] +44 (0)20 7679 5522 >>ENSIS Research Fellow [F] +44 (0)20 7679 7565 >>ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk >>UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ >>26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/ >>London. WC1H 0AP. >>%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% >> > > > -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [T] +44 (0)20 7679 5522 ENSIS Research Fellow [F] +44 (0)20 7679 7565 ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ 26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/ London. WC1H 0AP. %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% From Dejan.Gambin at PULA.HR Fri Apr 15 05:56:36 2005 From: Dejan.Gambin at PULA.HR (Gambin Dejan) Date: Fri, 15 Apr 2005 14:56:36 +0200 Subject: Raster layer labeling Message-ID: Hello, How can I label raster layer (tif image) using some static text? For example, I would like my image to have a label "1" centered on the tif image. Thanks Dejan Gambin From gerard_b_18 at HOTMAIL.COM Fri Apr 15 06:03:44 2005 From: gerard_b_18 at HOTMAIL.COM (gerard barrington) Date: Fri, 15 Apr 2005 10:33:44 -0230 Subject: shapefile polygon opens in arcgis but not mapserver In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From BEN at SYNCERA-ITSOLUTIONS.NL Fri Apr 15 06:18:58 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Fri, 15 Apr 2005 15:18:58 +0200 Subject: shapefile polygon opens in arcgis but not mapserver Message-ID: Gerard, I would recommend trying to use filemon from http://www.sysinternals.com to determine if the qix files are actually used. I remember one of my old posts in which I had similar problems, might be informative (or confusing :) ): http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0407/msg00673.html Secondly, the OGR issue, see the 1.2.6 release notes: http://www.intevation.de/pipermail/freegis-list/2005-March/002209.html Shapefile Driver: - Added support for MapServer style spatial index (.qix). So that's fairly new. Does your gdal12.dll have version info? You can check with your right mouse button and then the version tab. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> gerard barrington 04/15/05 03:03pm >>> Bart, I was hoping I could get a little clarification just to be sure I understand what you mean. I should create a .qix file for each shapefile using shptree. Then once they all have a .qix, then I should create the tiledindexes using ogrtindex? Will the tileindexes take the .qix into consideration? Second, I'm not sure what you mean by the following: "Also, it depends on the GDAL/OGR version whether or not the qix files are actually used (that's a relatively new feature). If I recall correctly that was added in GDAL/OGR 1.2.6, but Frank knows for sure. " Thanks for all your help.... Gerard B >From: Bart van den Eijnden >Reply-To: Bart van den Eijnden >To: MAPSERVER-USERS at LISTS.UMN.EDU >Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in arcgis but not mapserver >Date: Thu, 14 Apr 2005 21:13:37 +0200 > >Hi Gerard, > >I would suggest using ogrtindex instead to build the tileindexes. >There is >a little trick that you should not run ogrtindex from the directory >which >contains the data (otherwise it does not create an absolute path to >the >data in the LOCATION item). So run it from the directory where you >installed FWTools eg: > >for %i in (d:\data\*.shp) do d:\programs\fwtools\bin\ogrtindex >mytileindex.shp %i > >About the performance, have you created shapefile qix indexes (using >shptree?). Also, it depends on the GDAL/OGR version whether or not >the qix >files are actually used (that's a relatively new feature). If I >recall >correctly that was added in GDAL/OGR 1.2.6, but Frank knows for >sure. > >I think Mapserver normally scales well with a lot of LAYERs, it may >have >to do with your data structures and not the amount of LAYERs. > >Best regards, >Bart > >On Thu, 14 Apr 2005 16:39:29 -0230, gerard barrington > wrote: > >>Bart, Thanks....your solution worked. None of the entries in the >>LOCATION field of my dbf file had the '.shp'. So I added it to the >>entries and the tiledindex displays correctly. (I didn't need to >>use the >>0, it works without it.) As a side note, do you know how I could go >>about editing all my dbf files without having to go into them >>maunally >>and add the ending to every entry. I used the tile4ms command to >>create >>the tiledindex. Also, the speed of mapserver seems to go down >>drastically when you add more layers to the map file. My map file >>currently has 46 layers in it,all of which have a tiledindex as its >>datasource. What can I do to help speed up the mapserver. Thanks >>again, >>Gerard B >>>From: Bart van den Eijnden >> >>>Reply-To: Bart van den Eijnden >> >>>To: MAPSERVER-USERS at LISTS.UMN.EDU >> >>>Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in >>>arcgis >>>but not >>mapserver >>>Date: Thu, 14 Apr 2005 20:20:00 +0200 >> >>> >> >>>Gerard, >> >>> >> >>>does your LOCATION item in your tile-index dbf have c:\shapefile >>>or >> >>>c:\shapefile.shp? Looking at your error message it looks like the >> >>>first >> >>>option which is incorrect. >> >>> >> >>>You can also try c:\shapefile.shp,0 in the LOCATION field. >> >>> >> >>>Hope this helps. >> >>> >> >>>Best regards, >> >>>Bart >> >>> >> >>>On Thu, 14 Apr 2005 14:47:48 -0230, gerard barrington >> >>> wrote: >> >>> >> >>>>hi, using the ogr worked out for a POLYGON layer that did not >>>>have >> >>>>a >> >>>>tiledindex. The following worked perfect: LAYER >> >>>>NAME "name" >> >>>>TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "C:\shapefile.shp" ... >> >>>>END >> >>>>However, this will not work for tiledindex. On the doc page for >>>>OGR >> >>>>it >> >>>>says the following should work but it does not. LAYER >> >>>>NAME "nam" >> >>>>TYPE POLYGON >> >>>>CONNECTIONTYPE OGR >> >>>>TILEINDEX "C:\tiledindex.shp" >> >>>>... END The first entry in the tiled index is for >>>>c:\shapefile.shp >> >>>>but >> >>>>it returns the following error: msDrawMap(): Image handling >>>>error. >> >>>>Failed to draw layer named 'nam'. msOGRFileOpen(): OGR error. >>>>Open >> >>>>failed for OGR connection `c:\shapefile'. File not found or >> >>>>unsupported >> >>>>format. Any ideas why the tiledindex wouldn't work? I have used >> >>>>tiledindexes for points and lines and it works fine. Thanks >>>>again! >> >>>>Gerard B. >> >>>> >> >>>>>From: Bart van den Eijnden >> >>>> >> >>>>>Reply-To: Bart van den Eijnden >> >>>> >> >>>>>To: MAPSERVER-USERS at LISTS.UMN.EDU >> >>>> >> >>>>>Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in >> >>>>>arcgis >> >>>>>but not >> >>>>mapserver >> >>>>>Date: Wed, 13 Apr 2005 21:18:12 +0200 >> >>>> >> >>>>> >> >>>> >> >>>>>Hi, >> >>>> >> >>>>> >> >>>> >> >>>>>It should work if you are using Mapserver 4.4 or later. >> >>>> >> >>>>> >> >>>> >> >>>>>Otherwise try showing it through OGR. >> >>>> >> >>>>> >> >>>> >> >>>>>CONNECTIONTYPE OGR >> >>>> >> >>>>>CONNECTION "path/my.shp" >> >>>> >> >>>>> >> >>>> >> >>>>>Best regards, >> >>>> >> >>>>>Bart >> >>>> >> >>>>> >> >>>> >> >>>>>On Wed, 13 Apr 2005 16:45:50 -0230, gerard barrington >> >>>> >> >>>>> wrote: >> >>>> >> >>>>> >> >>>> >> >>>>>>I checked with ogrinfo and the shapefile is a <3D POLYGON>. >>>>>>Other >> >>>> >> >>>>>>shape >> >>>> >> >>>>>>files I have show up simply as when checked with >> >>>>>>ogrinfo. >> >>>> >> >>>>>>Is >> >>>> >> >>>>>>there anything i can do to show this polygon in mapserver? >> >>>> >> >>>>>> >> >>>> >> >>>>>>>From: Bart van den Eijnden >> >>>> >> >>>>>> >> >>>> >> >>>>>>>Reply-To: Bart van den Eijnden >> >>>> >> >>>>>> >> >>>> >> >>>>>>>To: MAPSERVER-USERS at LISTS.UMN.EDU >> >>>> >> >>>>>> >> >>>> >> >>>>>>>Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in >> >>>> >> >>>>>>>arcgis >> >>>> >> >>>>>>>but not >> >>>> >> >>>>>>mapserver >> >>>> >> >>>>>>>Date: Wed, 13 Apr 2005 20:32:42 +0200 >> >>>> >> >>>>>> >> >>>> >> >>>>>>> >> >>>> >> >>>>>> >> >>>> >> >>>>>>>Hi, >> >>>> >> >>>>>> >> >>>> >> >>>>>>> >> >>>> >> >>>>>> >> >>>> >> >>>>>>>are you sure it is not a polyline shape? Did you try TYPE >>>>>>>LINE? >> >>>> >> >>>>>> >> >>>> >> >>>>>>> >> >>>> >> >>>>>> >> >>>> >> >>>>>>>Otherwise open it up with ogrinfo and see what it says >> >>>> >> >>>>>> >> >>>> >> >>>>>>>(http://fwtools.maptools.org). >> >>>> >> >>>>>> >> >>>> >> >>>>>>> >> >>>> >> >>>>>> >> >>>> >> >>>>>>>Best regards, >> >>>> >> >>>>>> >> >>>> >> >>>>>>>Bart >> >>>> >> >>>>>> >> >>>> >> >>>>>>> >> >>>> >> >>>>>> >> >>>> >> >>>>>>>On Wed, 13 Apr 2005 16:04:39 -0230, gerard barrington >> >>>> >> >>>>>> >> >>>> >> >>>>>>> wrote: >> >>>> >> >>>>>> >> >>>> >> >>>>>>> >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>Hi list, I have a polygon shapefile which I can open and view >> >>>>>>>>in >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>ArcExplorer and everything looks perfect. However, when I try >> >>>>>>>>to >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>use the >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>same shapefile as data for a LAYER of TYPE POLYGON, I get the >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>following >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>exception: msDrawMap(): Image handling error. Failed to draw >> >>>> >> >>>>>>>>layer >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>named >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>'aal135'. msDrawShape(): General error message. Only polygon >> >>>> >> >>>>>>>>shapes >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>can >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>be drawn using a POLYGON layer definition. So I tried >>>>>>>>switching >> >>>> >> >>>>>>>>the >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>TYPE >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>in my layer to POINT and a couple of points along the border >>>>>>>>of >> >>>> >> >>>>>>>>the >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>polygon showed up. I know the shapefile is a polygon though >> >>>> >> >>>>>>>>because >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>it >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>displays as the correct shape in arcExplorer. Can someone >>>>>>>>tell >> >>>>>>>>me >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>why >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>the polygon will show up in ArcExplorer but not in mapserver? >> >>>>>>>>Is >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>there >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>anything I can do to fix this problem?? I am at real loss >>>>>>>>here >> >>>> >> >>>>>>>>for >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>why >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>this happens and would really appreciate any help.... Thanks >> >>>> >> >>>>>>>>Gerard >> >>>> >> >>>>>> >> >>>> >> >>>>>>>>B >> >>>> >> >>>>>> >> >>>> >> >>>>>>> >> >>>> >> >>>>>> >> >>>> >> >>>>>>> >> >>>> >> >>>>>> >> >>>> >> >>>>>>> >> >>>> >> >>>>>> >> >>>> >> >>>>>>>-- >> >>>> >> >>>>>> >> >>>> >> >>>>>>>Using Opera's revolutionary e-mail client: >> >>>> >> >>>>>>>http://www.opera.com/m2/ >> >>>> >> >>>>>> >> >>>> >> >>>>> >> >>>> >> >>>>> >> >>>> >> >>>>> >> >>>> >> >>>>>-- >> >>>> >> >>>>>Using Opera's revolutionary e-mail client: >> >>>>>http://www.opera.com/m2/ >> >>>> >> >>> >> >>> >> >>> >> >>>-- >> >>>Using Opera's revolutionary e-mail client: >>>http://www.opera.com/m2/ >> > > > >-- >Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From logicalgenetics at GMAIL.COM Fri Apr 15 06:24:29 2005 From: logicalgenetics at GMAIL.COM (Dan Taylor) Date: Fri, 15 Apr 2005 14:24:29 +0100 Subject: dynamic point generation with php-mapscript In-Reply-To: <425FB560.2010706@ucl.ac.uk> Message-ID: Sad to say that I don't know. Sorry! Dan On 4/15/05, Gavin Simpson wrote: > Dan Taylor wrote: > > This is how I do it. Very basic though... > > > > function addpoints($map, $name, $points, $r, $g, $b, $symbol, > > $font_face, $font_size) > > { > > // Create a layer > > $layer = ms_newLayerObj($map); > > $layer->set("type", MS_LAYER_POINT); > > $layer->set("name", $name); > > $layer->set("status", MS_ON); > > > > // Create the default class and set up label > > $cl = ms_newClassObj($layer); > > $cl->set("status", MS_ON); > > $cl->label->set("size", $font_size); > > $cl->label->set("type", "MS_TRUETYPE"); > > $cl->label->set("font", $font_face); > > $cl->label->set("position", MS_LC); > > $cl->label->color->setRGB($r, $g, $b); > > $cl->label->outlinecolor->setRGB(0, 0, 0); > > > > // Create and set up style > > $sty = ms_newStyleObj($cl); > > $sty->set("symbolname", $symbol); > > $sty->color->setRGB($r, $g, $b); > > $sty->outlinecolor->setRGB(0, 0, 0); > > > > // Add points > > for($i = 0; $i < sizeof($points); $i++) > > { > > $point = ms_newPointObj(); > > $point->setXY($points[$i]->x, $points[$i]->y); > > > > $line = ms_newLineObj(); > > $line->add($point); > > > > $shape = ms_newShapeObj(MS_SHAPE_POINT); > > $shape->add($line); > > $shape->set("text", $points[$i]->text); > > > > $layer->addFeature($shape); > > } > > } > > > > Dan > > Cheers for this Dan, > > So how do you query the layer you created dynamically? From what I read > in the archives etc, the index needs to be set to use queryByPoint() on > the dynamic layer and the released code (4.4.2 - I just compiled it to > confirm and it is broken, index is readonly) of mapscript. Index gets > set as -1 for all shapeObj's added to the layer and queryByPoint doesn't > work. I'd be interested to know how are querying the dynamic layer so > that you can determine which point was clicked on and therefore, which > row of data to extract from a database. > > All the best, > > Gav > > On 4/15/05, Gavin Simpson wrote: > > > >>Wouter Schaubroeck wrote: > >> > >>>Hi, > >>> > >>>I was wondering if anyone would know some good examples of generating > >>>dynamic points with php mapscript? For example: just pulling the points > >>>from (in my case: a MySQL db) a database and displaying them without a > >>>shape file? And is it possible to do queries on that layer, or > >>>displaying the attribute data? I assume not, because there's no > >>>associated dbf file. > >>> > >>>Best regards, > >>> > >>>Wouter Schaubroeck > >>> > >>> > >> > >>See the PHP/Mapscript WIKI - which has such an example: > >> > >>http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptAddPoint > >> > >>Querying that layer is more problematic. You need to create a shapeObj > >>and addFeature()'s to that shapeObj etc: > >> > >>http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples42ex1 > >>shows you how to do this with Perl which is easily translated to PHP (I > >>did it yesterday but my code is in a mess of other trial stuff just > >>now), with one major exception! PHP/Mapscript is broken at the moment > >>and you can't set the index of a shapeObj added to a layer (it needs to > >>be numeric, integer, incrementing in steps of 1 - so not a arbitrary > >>ordering of ID's from a mysql table index, currently it returns -1 > >>error), which you need to have queryByPoint do anything useful etc. See: > >>http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=806 > >> > >>A patch has been accepted for this bug so you can download a nightly or > >>the cvs of mapserver (or replace php_mapscript.c in the tarball of > >>mapserver4.4.2 with the one in that bug report) and roll your own > >>php_mapscript.so. > >> > >>After a few errors I have just gotten this compiling as well (a > >>nightly), so maybe I can query that layer after all... :-) > >> > >>Please note - I'm a mapserver virgin so I've been bumbling through this > >>for only a day or so - feel free to email me further about this but I > >>can't guarantee I'll be able to help much beyond providing some very > >>early php code. > >> > >>G > >> > >>-- > >>%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% > >>Gavin Simpson [T] +44 (0)20 7679 5522 > >>ENSIS Research Fellow [F] +44 (0)20 7679 7565 > >>ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk > >>UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ > >>26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/ > >>London. WC1H 0AP. > >>%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% > >> > > > > > > > > -- > %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% > Gavin Simpson [T] +44 (0)20 7679 5522 > ENSIS Research Fellow [F] +44 (0)20 7679 7565 > ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk > UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ > 26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/ > London. WC1H 0AP. > %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% > -- Dan Taylor Software Development Engineer, JTL Systems Ltd PhD Student, Reading University, UK http://www.logicalgenetics.com From jdport at VERITIME.COM Fri Apr 15 06:27:24 2005 From: jdport at VERITIME.COM (Jeff Portwine) Date: Fri, 15 Apr 2005 09:27:24 -0400 Subject: dynamic point generation with php-mapscript Message-ID: I am doing something like this in my code, except I'm using a postgres database. My table has the longitudes and latitudes of the points. I read in the coordinates from the postgres table, project the point into the map projection and plot them. I cannot do map queries as you said, but I work around that by making the map image a client side image map and make the points clickable. This makes navigating the map trickier... I can't use the same interface that most of the mapserver apps i've looked at use... but it is working ok. I'm almost done with the application now on a funcitionality level and then I'll be working on the interface because right now it is actually pretty slow to use. -Jeff ----- Original Message ----- From: "Gavin Simpson" To: Sent: Friday, April 15, 2005 7:06 AM Subject: Re: [UMN_MAPSERVER-USERS] dynamic point generation with php-mapscript > Wouter Schaubroeck wrote: >> Hi, >> >> I was wondering if anyone would know some good examples of generating >> dynamic points with php mapscript? For example: just pulling the points >> from (in my case: a MySQL db) a database and displaying them without a >> shape file? And is it possible to do queries on that layer, or >> displaying the attribute data? I assume not, because there's no >> associated dbf file. >> >> Best regards, >> >> Wouter Schaubroeck >> >> > > See the PHP/Mapscript WIKI - which has such an example: > > http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptAddPoint > > Querying that layer is more problematic. You need to create a shapeObj > and addFeature()'s to that shapeObj etc: > > http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples42ex1 > shows you how to do this with Perl which is easily translated to PHP (I > did it yesterday but my code is in a mess of other trial stuff just > now), with one major exception! PHP/Mapscript is broken at the moment > and you can't set the index of a shapeObj added to a layer (it needs to > be numeric, integer, incrementing in steps of 1 - so not a arbitrary > ordering of ID's from a mysql table index, currently it returns -1 > error), which you need to have queryByPoint do anything useful etc. See: > http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=806 > > A patch has been accepted for this bug so you can download a nightly or > the cvs of mapserver (or replace php_mapscript.c in the tarball of > mapserver4.4.2 with the one in that bug report) and roll your own > php_mapscript.so. > > After a few errors I have just gotten this compiling as well (a > nightly), so maybe I can query that layer after all... :-) > > Please note - I'm a mapserver virgin so I've been bumbling through this > for only a day or so - feel free to email me further about this but I > can't guarantee I'll be able to help much beyond providing some very > early php code. > > G > > -- > %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% > Gavin Simpson [T] +44 (0)20 7679 5522 > ENSIS Research Fellow [F] +44 (0)20 7679 7565 > ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk > UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ > 26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/ > London. WC1H 0AP. > %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% > From cdaily at GMAIL.COM Fri Apr 15 06:53:31 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Fri, 15 Apr 2005 08:53:31 -0500 Subject: Could not find config.h or php_config.h in /usr In-Reply-To: <20050414204108.2397.qmail@web25702.mail.ukl.yahoo.com> Message-ID: Did you build PHP from source? I think you need to to compile mapscript. I may be wrong, but if you installed from RPM, I think you could just try again after installing the php-devel package (if there is one). Otherwise, make sure your --with-php= points to the directory with the PHP source code in it. -Camden On 4/14/05, jo?ffffffffffe3o Antunes wrote: > Hello everybody, > > I am trying to compile Mapserver on Linux RedHat9 > having already apache, php installed and running in my > system. > I am using the option --with-php=/usr/include in > configure command so that I can compile the module for > mapscript as well.. > > I keep getting this error message: > > !!! Could not find config.h or php_config.h in /usr. > !!! > !!! Has PHP been configured yet? > !!! > > I know this problem has been discussed earlier but > found no solution.. > > Can someone give a clue on how to solve this? > > thank you so much > > Joao Antunes > > Send instant messages to your online friends http://uk.messenger.yahoo.com > From cdaily at GMAIL.COM Fri Apr 15 07:05:42 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Fri, 15 Apr 2005 09:05:42 -0500 Subject: Drawing points and lines dynamically In-Reply-To: Message-ID: If you turn off all of the other layers, can you see the point then? It might be a matter of extents or projections. Are your extents in latitude/longitude degrees as well? > One thing that I am confused about is to whether or not the layer that I > want to create the point > on has to be already defined in the map file or whether the code below > actually creates a 'dynamic' > layer. It creates a dynamic layer. You do not need to pre-define the layer in the .map file. Althought I've not actually tried it, I believe that you could make your entire .map file definition through mapscript. I'm not sure why else the point might not show up, but I would suggest looking at the layer->addFeature() function. I think it's much more straightforward than drawing the map, and then calling point->draw() over it. Just do something like this to add a point to a layer: function add_point_to_layer($layer, $longitude, $latitude) { // create and initialize new point object $point = ms_newPointObj(); $point->setXY($longitude, $latitude); // create and initialize new line object $line = ms_newLineObj(); $line->add($point); // create and initialize new shape object $shape = ms_newShapeObj(MS_SHAPE_POINT); $shape->add($line); // add our shape $layer->addFeature($shape); } Then, once you've added the points, just call $image = $map->draw(); and everything should draw nicely. -Camden > regards > Simon > > $layer = ms_newLayerObj($map); > $layer->set("name", "Route"); > $layer->set("type", MS_LAYER_POINT); > $layer->set("status", MS_DEFAULT); > $layer->set("transform", TRUE); > > $class = ms_newClassObj($layer); > $class->label->set("font", "arial"); > $class->label->color->setRGB(255, 0, 0); > > $symbol = $map->getSymbolByName("circle"); > $style = ms_newStyleObj($class); > $style->set("symbol", $symbol); > $style->set("size", 8); > $style->color->setRGB(255, 0, 0); > > $image = $map->draw(); > > $point = ms_newPointObj(); > $point->setXY(0.0, 54.0); > $point->draw($map, $layer, $image, 0, "test"); > $image_url=$image->saveWebImage(); > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 > From sc at BYTRON.COM Fri Apr 15 07:56:24 2005 From: sc at BYTRON.COM (sc) Date: Fri, 15 Apr 2005 15:56:24 +0100 Subject: Drawing points and lines dynamically In-Reply-To: <16264e07050415070540d84e2c@mail.gmail.com> Message-ID: Hi Camden I have altered my code to use your function but I still cannot see my 'point', I have also switched off all other layers and it is still not visible. Following is an extract of the code I am using and part of the map file. My other layers are all in Lambert Conformal Conic projection, could this be where the problem lies? The EXTENTs were arrived at by using ogrinfo -so on my shapefile. regards Simon # Code Extract $layer = ms_newLayerObj($map); $layer->set("name","Route"); $layer->set("type",MS_LAYER_POINT); $layer->set("status", MS_ON); add_point_to_layer($layer, 0.0, 54.0); $image = $map->draw(); # Map file extract MAP NAME UK STATUS ON SIZE 800 600 IMAGETYPE PNG IMAGECOLOR 170 210 250 SHAPEPATH "/usr/local/apache/htdocs/map/data/conic" EXTENT -994934.821920 5173124.716504 322333.423383 6431993.097353 #UNITS MILES -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of Camden Daily Sent: 15 April 2005 14:06 To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Drawing points and lines dynamically If you turn off all of the other layers, can you see the point then? It might be a matter of extents or projections. Are your extents in latitude/longitude degrees as well? > One thing that I am confused about is to whether or not the layer that I > want to create the point > on has to be already defined in the map file or whether the code below > actually creates a 'dynamic' > layer. It creates a dynamic layer. You do not need to pre-define the layer in the .map file. Althought I've not actually tried it, I believe that you could make your entire .map file definition through mapscript. I'm not sure why else the point might not show up, but I would suggest looking at the layer->addFeature() function. I think it's much more straightforward than drawing the map, and then calling point->draw() over it. Just do something like this to add a point to a layer: function add_point_to_layer($layer, $longitude, $latitude) { // create and initialize new point object $point = ms_newPointObj(); $point->setXY($longitude, $latitude); // create and initialize new line object $line = ms_newLineObj(); $line->add($point); // create and initialize new shape object $shape = ms_newShapeObj(MS_SHAPE_POINT); $shape->add($line); // add our shape $layer->addFeature($shape); } Then, once you've added the points, just call $image = $map->draw(); and everything should draw nicely. -Camden > regards > Simon > > $layer = ms_newLayerObj($map); > $layer->set("name", "Route"); > $layer->set("type", MS_LAYER_POINT); > $layer->set("status", MS_DEFAULT); > $layer->set("transform", TRUE); > > $class = ms_newClassObj($layer); > $class->label->set("font", "arial"); > $class->label->color->setRGB(255, 0, 0); > > $symbol = $map->getSymbolByName("circle"); > $style = ms_newStyleObj($class); > $style->set("symbol", $symbol); > $style->set("size", 8); > $style->color->setRGB(255, 0, 0); > > $image = $map->draw(); > > $point = ms_newPointObj(); > $point->setXY(0.0, 54.0); > $point->draw($map, $layer, $image, 0, "test"); > $image_url=$image->saveWebImage(); > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 > -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 From wouter.schaubroeck at GMAIL.COM Fri Apr 15 08:11:04 2005 From: wouter.schaubroeck at GMAIL.COM (Wouter Schaubroeck) Date: Fri, 15 Apr 2005 17:11:04 +0200 Subject: dynamic point generation with php-mapscript In-Reply-To: <830dd37405041504556c0c9f41@mail.gmail.com> Message-ID: Actually, I have a way to get my points out of my database. I create dynamically a shape file with the coordinates i get from my db. And then, i write the attributes in the dbf file. They only thing i have to do next is to create a layer dynamically, where the shape file is being used. This goes well, but it could go faster, if the server didn't have to create the shapefile all the time. best regards Wouter Schaubroeck Dan Taylor wrote: >This is how I do it. Very basic though... > >function addpoints($map, $name, $points, $r, $g, $b, $symbol, >$font_face, $font_size) >{ > // Create a layer > $layer = ms_newLayerObj($map); > $layer->set("type", MS_LAYER_POINT); > $layer->set("name", $name); > $layer->set("status", MS_ON); > > // Create the default class and set up label > $cl = ms_newClassObj($layer); > $cl->set("status", MS_ON); > $cl->label->set("size", $font_size); > $cl->label->set("type", "MS_TRUETYPE"); > $cl->label->set("font", $font_face); > $cl->label->set("position", MS_LC); > $cl->label->color->setRGB($r, $g, $b); > $cl->label->outlinecolor->setRGB(0, 0, 0); > > // Create and set up style > $sty = ms_newStyleObj($cl); > $sty->set("symbolname", $symbol); > $sty->color->setRGB($r, $g, $b); > $sty->outlinecolor->setRGB(0, 0, 0); > > // Add points > for($i = 0; $i < sizeof($points); $i++) > { > $point = ms_newPointObj(); > $point->setXY($points[$i]->x, $points[$i]->y); > > $line = ms_newLineObj(); > $line->add($point); > > $shape = ms_newShapeObj(MS_SHAPE_POINT); > $shape->add($line); > $shape->set("text", $points[$i]->text); > > $layer->addFeature($shape); > } >} > >Dan > >On 4/15/05, Gavin Simpson wrote: > > >>Wouter Schaubroeck wrote: >> >> >>>Hi, >>> >>>I was wondering if anyone would know some good examples of generating >>>dynamic points with php mapscript? For example: just pulling the points >>>from (in my case: a MySQL db) a database and displaying them without a >>>shape file? And is it possible to do queries on that layer, or >>>displaying the attribute data? I assume not, because there's no >>>associated dbf file. >>> >>>Best regards, >>> >>>Wouter Schaubroeck >>> >>> >>> >>> >>See the PHP/Mapscript WIKI - which has such an example: >> >>http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptAddPoint >> >>Querying that layer is more problematic. You need to create a shapeObj >>and addFeature()'s to that shapeObj etc: >> >>http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples42ex1 >>shows you how to do this with Perl which is easily translated to PHP (I >>did it yesterday but my code is in a mess of other trial stuff just >>now), with one major exception! PHP/Mapscript is broken at the moment >>and you can't set the index of a shapeObj added to a layer (it needs to >>be numeric, integer, incrementing in steps of 1 - so not a arbitrary >>ordering of ID's from a mysql table index, currently it returns -1 >>error), which you need to have queryByPoint do anything useful etc. See: >>http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=806 >> >>A patch has been accepted for this bug so you can download a nightly or >>the cvs of mapserver (or replace php_mapscript.c in the tarball of >>mapserver4.4.2 with the one in that bug report) and roll your own >>php_mapscript.so. >> >>After a few errors I have just gotten this compiling as well (a >>nightly), so maybe I can query that layer after all... :-) >> >>Please note - I'm a mapserver virgin so I've been bumbling through this >>for only a day or so - feel free to email me further about this but I >>can't guarantee I'll be able to help much beyond providing some very >>early php code. >> >>G >> >>-- >>%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% >>Gavin Simpson [T] +44 (0)20 7679 5522 >>ENSIS Research Fellow [F] +44 (0)20 7679 7565 >>ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk >>UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ >>26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/ >>London. WC1H 0AP. >>%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% >> >> >> > > > > From cdaily at GMAIL.COM Fri Apr 15 08:11:13 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Fri, 15 Apr 2005 10:11:13 -0500 Subject: Drawing points and lines dynamically In-Reply-To: Message-ID: I would guess that this is a projection problem. Your layers and output are using one projection with one type of unit (feet? meters?), but then you are trying to place a point on the map using decimal degrees units. To check this, try placing a point with an x value between -994934.821920 and 322333.423383 and a y value between 5173124.716504 and 6431993.097353. I'd image it would show up just fine. What you'll need to do is define a projection block in your layer definitions. Mapserver has no trouble mixing different layers of different projections, but it can be difficult at first to figure out what projections are and how you need to set them up. I would suggest doing some looking through mapserver examples and listserv archives regarding projections and then asking specific questions you may have to the group. -Camden Daily On 4/15/05, sc wrote: > Hi Camden > > I have altered my code to use your function but I still cannot see my > 'point', I have also switched > off all other layers and it is still not visible. Following is an extract > of the code I am using and > part of the map file. > > My other layers are all in Lambert Conformal Conic projection, could this be > where the problem lies? > > The EXTENTs were arrived at by using ogrinfo -so on my shapefile. > > regards > > Simon > > # Code Extract > > $layer = ms_newLayerObj($map); > $layer->set("name","Route"); > $layer->set("type",MS_LAYER_POINT); > $layer->set("status", MS_ON); > add_point_to_layer($layer, 0.0, 54.0); > $image = $map->draw(); > > # Map file extract > > MAP > NAME UK > STATUS ON > SIZE 800 600 > IMAGETYPE PNG > IMAGECOLOR 170 210 250 > SHAPEPATH "/usr/local/apache/htdocs/map/data/conic" > EXTENT -994934.821920 5173124.716504 322333.423383 6431993.097353 > #UNITS MILES > > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On > Behalf Of Camden Daily > Sent: 15 April 2005 14:06 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Drawing points and lines dynamically > > If you turn off all of the other layers, can you see the point then? > It might be a matter of extents or projections. Are your extents in > latitude/longitude degrees as well? > > > One thing that I am confused about is to whether or not the layer that I > > want to create the point > > on has to be already defined in the map file or whether the code below > > actually creates a 'dynamic' > > layer. > > It creates a dynamic layer. You do not need to pre-define the layer > in the .map file. Althought I've not actually tried it, I believe > that you could make your entire .map file definition through > mapscript. > > I'm not sure why else the point might not show up, but I would suggest > looking at the layer->addFeature() function. I think it's much more > straightforward than drawing the map, and then calling point->draw() > over it. Just do something like this to add a point to a layer: > > function add_point_to_layer($layer, $longitude, $latitude) { > // create and initialize new point object > $point = ms_newPointObj(); > $point->setXY($longitude, $latitude); > // create and initialize new line object > $line = ms_newLineObj(); > $line->add($point); > // create and initialize new shape object > $shape = ms_newShapeObj(MS_SHAPE_POINT); > $shape->add($line); > // add our shape > $layer->addFeature($shape); > } > > Then, once you've added the points, just call $image = $map->draw(); > and everything should draw nicely. > > -Camden > > > regards > > Simon > > > > $layer = ms_newLayerObj($map); > > $layer->set("name", "Route"); > > $layer->set("type", MS_LAYER_POINT); > > $layer->set("status", MS_DEFAULT); > > $layer->set("transform", TRUE); > > > > $class = ms_newClassObj($layer); > > $class->label->set("font", "arial"); > > $class->label->color->setRGB(255, 0, 0); > > > > $symbol = $map->getSymbolByName("circle"); > > $style = ms_newStyleObj($class); > > $style->set("symbol", $symbol); > > $style->set("size", 8); > > $style->color->setRGB(255, 0, 0); > > > > $image = $map->draw(); > > > > $point = ms_newPointObj(); > > $point->setXY(0.0, 54.0); > > $point->draw($map, $layer, $image, 0, "test"); > > $image_url=$image->saveWebImage(); > > -- > > No virus found in this outgoing message. > > Checked by AVG Anti-Virus. > > Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 > > > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 > > From sc at BYTRON.COM Fri Apr 15 08:30:32 2005 From: sc at BYTRON.COM (sc) Date: Fri, 15 Apr 2005 16:30:32 +0100 Subject: Drawing points and lines dynamically In-Reply-To: <16264e0705041508116db63ce8@mail.gmail.com> Message-ID: Thanks Camden at least I've got a symbol on screen now. Thanks for that. I will look at the examples/list for examples on projects as you suggest thanks again regards Simon -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of Camden Daily Sent: 15 April 2005 15:11 To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Drawing points and lines dynamically I would guess that this is a projection problem. Your layers and output are using one projection with one type of unit (feet? meters?), but then you are trying to place a point on the map using decimal degrees units. To check this, try placing a point with an x value between -994934.821920 and 322333.423383 and a y value between 5173124.716504 and 6431993.097353. I'd image it would show up just fine. What you'll need to do is define a projection block in your layer definitions. Mapserver has no trouble mixing different layers of different projections, but it can be difficult at first to figure out what projections are and how you need to set them up. I would suggest doing some looking through mapserver examples and listserv archives regarding projections and then asking specific questions you may have to the group. -Camden Daily On 4/15/05, sc wrote: > Hi Camden > > I have altered my code to use your function but I still cannot see my > 'point', I have also switched > off all other layers and it is still not visible. Following is an extract > of the code I am using and > part of the map file. > > My other layers are all in Lambert Conformal Conic projection, could this be > where the problem lies? > > The EXTENTs were arrived at by using ogrinfo -so on my shapefile. > > regards > > Simon > > # Code Extract > > $layer = ms_newLayerObj($map); > $layer->set("name","Route"); > $layer->set("type",MS_LAYER_POINT); > $layer->set("status", MS_ON); > add_point_to_layer($layer, 0.0, 54.0); > $image = $map->draw(); > > # Map file extract > > MAP > NAME UK > STATUS ON > SIZE 800 600 > IMAGETYPE PNG > IMAGECOLOR 170 210 250 > SHAPEPATH "/usr/local/apache/htdocs/map/data/conic" > EXTENT -994934.821920 5173124.716504 322333.423383 6431993.097353 > #UNITS MILES > > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On > Behalf Of Camden Daily > Sent: 15 April 2005 14:06 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Drawing points and lines dynamically > > If you turn off all of the other layers, can you see the point then? > It might be a matter of extents or projections. Are your extents in > latitude/longitude degrees as well? > > > One thing that I am confused about is to whether or not the layer that I > > want to create the point > > on has to be already defined in the map file or whether the code below > > actually creates a 'dynamic' > > layer. > > It creates a dynamic layer. You do not need to pre-define the layer > in the .map file. Althought I've not actually tried it, I believe > that you could make your entire .map file definition through > mapscript. > > I'm not sure why else the point might not show up, but I would suggest > looking at the layer->addFeature() function. I think it's much more > straightforward than drawing the map, and then calling point->draw() > over it. Just do something like this to add a point to a layer: > > function add_point_to_layer($layer, $longitude, $latitude) { > // create and initialize new point object > $point = ms_newPointObj(); > $point->setXY($longitude, $latitude); > // create and initialize new line object > $line = ms_newLineObj(); > $line->add($point); > // create and initialize new shape object > $shape = ms_newShapeObj(MS_SHAPE_POINT); > $shape->add($line); > // add our shape > $layer->addFeature($shape); > } > > Then, once you've added the points, just call $image = $map->draw(); > and everything should draw nicely. > > -Camden > > > regards > > Simon > > > > $layer = ms_newLayerObj($map); > > $layer->set("name", "Route"); > > $layer->set("type", MS_LAYER_POINT); > > $layer->set("status", MS_DEFAULT); > > $layer->set("transform", TRUE); > > > > $class = ms_newClassObj($layer); > > $class->label->set("font", "arial"); > > $class->label->color->setRGB(255, 0, 0); > > > > $symbol = $map->getSymbolByName("circle"); > > $style = ms_newStyleObj($class); > > $style->set("symbol", $symbol); > > $style->set("size", 8); > > $style->color->setRGB(255, 0, 0); > > > > $image = $map->draw(); > > > > $point = ms_newPointObj(); > > $point->setXY(0.0, 54.0); > > $point->draw($map, $layer, $image, 0, "test"); > > $image_url=$image->saveWebImage(); > > -- > > No virus found in this outgoing message. > > Checked by AVG Anti-Virus. > > Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 > > > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 > > -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 From fwarmerdam at GMAIL.COM Fri Apr 15 08:50:17 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri, 15 Apr 2005 11:50:17 -0400 Subject: GDAL virtual raster file In-Reply-To: Message-ID: On 4/14/05, Nuno Gil wrote: > Frank, > Ok, so if I understand you correctly one layer calls the original > full-res tiles and then another one call the overviews. > My overview files have an "ovr" extension and when creating the index > file for them I get Nuno, The mapserver "overview" layer wouldn't be using the overviews built for the full res files. Those are automatically used by GDAL. The objective of using a separate layer in MapServer is so that you can have an overview that is "all-in-one" file. What is killing you with showing overviews of 300 files worth of data is all the per-file overhead. This is modest for 1 or 5 files, but open 300 GeoTIFF files, and parsing all the headers ends up being quite a bit of work. So, the overview layer should refer to a single big overview at a much reduced resolution from the original files. The tricky part is building this overview, as I mentioned before. There are a variety of approaches, but for my money the easiest is to use Mapserver itself. Do you need details on this process? I have never *actually* done it myself. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From brendwal2004 at YAHOO.CA Fri Apr 15 09:06:53 2005 From: brendwal2004 at YAHOO.CA (Brendan Walashek) Date: Fri, 15 Apr 2005 11:06:53 -0500 Subject: MrSID support in Mapserver 4.4.1 Message-ID: It was my understanding that Mr.SID was not supported because Lizardtech never wanted it to work with MapServer because of licensing issues. ie. they didn't want it to serve SID images in an Open Source environment over the web for free without licensing it....just rings a bell from something I read somehwere on this list awhile back... Anyone else? From geoffrey.rowland at NOAA.GOV Fri Apr 15 09:25:43 2005 From: geoffrey.rowland at NOAA.GOV (Geoff Rowland) Date: Fri, 15 Apr 2005 12:25:43 -0400 Subject: Symbols in mapserver In-Reply-To: Message-ID: Hi, Can someone explain to me how symbols work in MapServer? I am looking at the code here that I see on the Wiki. What is 'phone' in the code below? can this just be a .gif image? I saw some code on creating symbols (in this case, a star) but I would like to use premade images if possible. LAYER NAME "INLINE" TYPE POINT STATUS ON CLASS NAME "0" STYLE COLOR 255 0 0 # red MAXSIZE 300 # default 50 SYMBOL 'phone' #In my case was a nice phone image symbol SIZE 16 END #style END #class END #layer Thanks, Geoff -- Geoffrey Rowland Technical Officer Climate Information Project NOAA Research Office of Global Programs http://www.cip.ogp.noaa.gov Contractor, RGII Technologies, Inc., a Computer Horizons Company http://www.rg2.com Phone: 301-427-2344 Fax : 301-427-2082 geoffrey.rowland at noaa.gov From kenlord at GMAIL.COM Fri Apr 15 09:40:35 2005 From: kenlord at GMAIL.COM (Ken Lord) Date: Fri, 15 Apr 2005 09:40:35 -0700 Subject: Raster layer labeling In-Reply-To: Message-ID: Hi Dejan, How about making a point shapefile layer, with points at the center of your rasters, with the labels. Place the point layer under the raster layer so you don't see the point itself, the labels will appear on top. Set your system to turn the point layer on and off with your raster layer. Cheers, Ken Lord Vancouver BC On 4/15/05, Gambin Dejan wrote: > Hello, > > How can I label raster layer (tif image) using some static text? For > example, I would like my image to have a label "1" centered on the tif > image. > > Thanks > > Dejan Gambin From hobu at IASTATE.EDU Fri Apr 15 09:46:04 2005 From: hobu at IASTATE.EDU (Howard Butler) Date: Fri, 15 Apr 2005 11:46:04 -0500 Subject: MrSID support in Mapserver 4.4.1 In-Reply-To: Message-ID: Brendan, MrSID is supported very well in GDAL (and therefore MapServer). At one time, you had to pay $500 to purchase the decompression SDK (which could be used with GDAL), but this restriction was lifted last fall (a quick google will find a screed by yours truly railing against this). The situation is *much* better now that the decompression SDK is freely available for personal use. The problem right now, in my opinion, is that neither ECW nor MrSID decompression support are really redistributable because of the effort required to enforce their licensing restrictions. For a distribution builder, this presents a problem. At one time, in my "Kitchen sink" binaries, I had ECW and MrSID support, but now that I know more about the licensing stuff, I am refraining from doing that anymore. It isn't worth the hot water I could potentially get in. It's unfortunate, because building up a MapServer+GDAL+xyz libraries on windows is a pretty formidable challenge for most users, especially those who just want to be able to use publicly available data like the NAIP imagery (which only comes in MrSID form). Another thing to note is that the consensus is that the current ECW license pretty much prevents its use with MapServer. The next revision of the license is supposed to allow its use with MapServer and others. Even so, it is probably unlikely that you'll see a MapServer binary distribution that you can download and use with support for ECW (or MrSID) without compiling everything yourself. Howard At 11:06 AM 4/15/2005, Brendan Walashek wrote: >It was my understanding that Mr.SID was not supported because Lizardtech >never wanted it to work with MapServer because of licensing issues. ie. >they didn't want it to serve SID images in an Open Source environment over >the web for free without licensing it....just rings a bell from something I >read somehwere on this list awhile back... >Anyone else? From gerard_b_18 at HOTMAIL.COM Fri Apr 15 10:00:03 2005 From: gerard_b_18 at HOTMAIL.COM (gerard barrington) Date: Fri, 15 Apr 2005 14:30:03 -0230 Subject: shapefile polygon opens in arcgisbut not mapserver In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From kevin at PEOPLEGIS.COM Fri Apr 15 09:53:53 2005 From: kevin at PEOPLEGIS.COM (Kevin Flanders) Date: Fri, 15 Apr 2005 12:53:53 -0400 Subject: server Message-ID: Are there current server specs available for the "perfect" server for MapServer? Does the multi-threading capability affect the server specs? Kevin -------------- next part -------------- An HTML attachment was scrubbed... URL: From woklist at CHARTER.NET Fri Apr 15 10:15:42 2005 From: woklist at CHARTER.NET (William K) Date: Fri, 15 Apr 2005 12:15:42 -0500 Subject: MrSID support in Mapserver 4.4.1 In-Reply-To: Message-ID: Hm, is the MrSID DSDK license really that bad? I thought it looked OK to build it into open source software for binary distribution (ie GDAL). I hadn't heard about their close-minded view of Mapserver though. Maybe I should remove it from my GIS Libs package (which is used by my separate MapServer package) for Mac OS X? I don't like to stir up possible trouble, so I never actually asked LizardTech about it. Good thing to hear about the ECW license - I'm waiting for the next version in development to be supported for Mac OS X (it's supposed to), but haven't looked at the license yet. On Apr 15, 2005, at 11:46 AM, Howard Butler wrote: > Brendan, > > MrSID is supported very well in GDAL (and therefore MapServer). At one > time, you had to pay $500 to purchase the decompression SDK (which > could be > used with GDAL), but this restriction was lifted last fall (a quick > google > will find a screed by yours truly railing against this). The > situation is > *much* better now that the decompression SDK is freely available for > personal use. > > The problem right now, in my opinion, is that neither ECW nor MrSID > decompression support are really redistributable because of the effort > required to enforce their licensing restrictions. For a distribution > builder, this presents a problem. At one time, in my "Kitchen sink" > binaries, I had ECW and MrSID support, but now that I know more about > the > licensing stuff, I am refraining from doing that anymore. It isn't > worth > the hot water I could potentially get in. It's unfortunate, because > building up a MapServer+GDAL+xyz libraries on windows is a pretty > formidable challenge for most users, especially those who just want to > be > able to use publicly available data like the NAIP imagery (which only > comes > in MrSID form). > > Another thing to note is that the consensus is that the current ECW > license > pretty much prevents its use with MapServer. The next revision of the > license is supposed to allow its use with MapServer and others. Even > so, > it is probably unlikely that you'll see a MapServer binary distribution > that you can download and use with support for ECW (or MrSID) without > compiling everything yourself. > > Howard > > > > At 11:06 AM 4/15/2005, Brendan Walashek wrote: >> It was my understanding that Mr.SID was not supported because >> Lizardtech >> never wanted it to work with MapServer because of licensing issues. >> ie. >> they didn't want it to serve SID images in an Open Source environment >> over >> the web for free without licensing it....just rings a bell from >> something I >> read somehwere on this list awhile back... >> Anyone else? > > ----- William Kyngesburye http://webpages.charter.net/kyngchaos/ "Those people who most want to rule people are, ipso-facto, those least suited to do it." - A rule of the universe, from the HitchHiker's Guide to the Galaxy -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2923 bytes Desc: not available URL: From gavin.simpson at UCL.AC.UK Fri Apr 15 10:50:38 2005 From: gavin.simpson at UCL.AC.UK (Gavin Simpson) Date: Fri, 15 Apr 2005 18:50:38 +0100 Subject: queryByPoint() php/mapscript help? Message-ID: Dear list, I'm finally admitting defeat one this one and am asking for some help or a pointer or two. I compiled mapscript 4.4.2 on my Fedora Core 3 box, but replaced php_mapscript.c with the one Camden Daily submitted to bugzilla to fix the bug that won't allow you to set the index of a shapeObj. Note that I have also compiled the latest nightly and I get the same behaviour as I describe below but reverted to 4.4.2 because the nightly was doing some strange things when drawing polygons. I am adding points to a layer dynamically from a MySQL database and the lat/lon stored therein. As well, I am adding point features (lines with one point) to the same layer and am setting the index for the point so I can query this layer later. This works fine and I have a zoomable, map of Europe with the points of my lakes displayed. When I come to query the layer using queryByPoint(), no matter what I do, I always end up with the last shape point I added to the layer I'm trying to query. So I always get 1 back from getNumResults() no matter where I click on the map - over a point or not, and the returned shape from getShape() is always the last shape I added. I can't see how to make this work properly - what am I doing wrong? If you want to see what I mean, go to http://ecrc3.geog.ucl.ac.uk/maps/test/europe.phpms select the query radio button and click on a point - or anything. The debug code will be displayed next to the map illustrating the problem nicely. I've posted my PHP code on my webserver as it looks horrible wrapped in my mailer: http://ecrc3.geog.ucl.ac.uk/maps/test/query_problem.txt Here is my map file: NAME "eurolimpacs" SIZE 600 600 STATUS ON SYMBOLSET "/var/www/html/maps/symbols/symbols.sym" EXTENT -31.290 27.637 50.375 80.765 UNITS DD SHAPEPATH "/var/www/html/maps/data" WEB IMAGEPATH "/var/www/html/maps/tmp/" IMAGEURL "/maps/tmp/" END LAYER NAME "Europe" TYPE POLYGON STATUS ON DATA "Europe" CLASS STYLE COLOR 255 255 255 OUTLINECOLOR 0 0 0 SYMBOL 0 END END END LAYER NAME "Lakes" TYPE POINT STATUS ON TOLERANCE 0.1 # Need fake template for querys to work TEMPLATE "bogus.html" CLASS NAME "0" STYLE COLOR 255 0 0 MAXSIZE 300 SYMBOL 'circle' SIZE 5 END END END END Thanks in advance, Gav -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson ENSIS Research Fellow [F] +44 (0)20 7679 7565 ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ 26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/ London. WC1H 0AP. %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% From fwarmerdam at GMAIL.COM Fri Apr 15 11:23:26 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri, 15 Apr 2005 14:23:26 -0400 Subject: MrSID support in Mapserver 4.4.1 In-Reply-To: Message-ID: On 4/15/05, William K wrote: > Hm, is the MrSID DSDK license really that bad? William, From cdaily at GMAIL.COM Fri Apr 15 11:27:31 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Fri, 15 Apr 2005 13:27:31 -0500 Subject: queryByPoint() php/mapscript help? In-Reply-To: <425FFEEE.8040601@ucl.ac.uk> Message-ID: Gavin, The only thing I can immediately notice is that it does not appear that you are creating your point layer correctly. You create a point, create a line, and then add the point to the line. Then you create a shape and add it to the layer, but it does not appear that you ever add the line to the shape. Try adding this code after you create your shape and line: $shape->add($line); If things still don't work, you might try testing out queryByPoint() against a point layer defined in a shapefile. That way, you could at least determine whether the issue is with how your create the point layer or how you query it. -Camden Daily From gavin.simpson at UCL.AC.UK Fri Apr 15 11:37:49 2005 From: gavin.simpson at UCL.AC.UK (Gavin Simpson) Date: Fri, 15 Apr 2005 19:37:49 +0100 Subject: queryByPoint() php/mapscript help? In-Reply-To: <16264e07050415112745fa760c@mail.gmail.com> Message-ID: Camden Daily wrote: > Gavin, > > The only thing I can immediately notice is that it does not appear > that you are creating your point layer correctly. You create a point, > create a line, and then add the point to the line. Then you create a > shape and add it to the layer, but it does not appear that you ever > add the line to the shape. Try adding this code after you create your > shape and line: > $shape->add($line); > > If things still don't work, you might try testing out queryByPoint() > against a point layer defined in a shapefile. That way, you could at > least determine whether the issue is with how your create the point > layer or how you query it. > > -Camden Daily > > Arrrrrggggghhhhhh!!!! I can't believe I missed that. I've even been taking my colleague through the code and explaining in plain english what each statement did (to see if we could find the error) and it never occurred to me I'd forgotten to add the line to the shape. I can't even blame too little coffee... Thanks for looking through the code and the fix, and thanks also for the fixed php_mapscript.c you submitted. All the best Gav -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [T] +44 (0)20 7679 5522 ENSIS Research Fellow [F] +44 (0)20 7679 7565 ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ 26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/ London. WC1H 0AP. %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% From cdaily at GMAIL.COM Fri Apr 15 11:56:49 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Fri, 15 Apr 2005 13:56:49 -0500 Subject: queryByPoint() php/mapscript help? In-Reply-To: <426009FD.5090908@ucl.ac.uk> Message-ID: > Thanks for looking through the code and the fix, and thanks also for the > fixed php_mapscript.c you submitted. No problem. Hopefully that'll ease your mind a bit for the weekend :> -Camden From bartvde at XS4ALL.NL Fri Apr 15 11:53:01 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Fri, 15 Apr 2005 20:53:01 +0200 Subject: shapefile polygon opens in arcgisbut not mapserver In-Reply-To: Message-ID: Hi Gerard, Mapserver also needs to be compiled against GDAL 1.2.6, you cannot simply use another gdal12.dll, or at least it is not a very wise idea. Version info in the dll was only introduced with GDAL version 1.2.6. If you don't need Oracle, download Mapserver 4.4.2 binaries from: http://maptools.org/php_mapscript/index.phtml?page=downloads.html I am sure they are compiled with GDAL 1.2.6. If you need Oracle, you will have to wait for the regular mapserver.gis.umn.edu binaries to get updated to 4.4.2. Best regards, Bart On Fri, 15 Apr 2005 14:30:03 -0230, gerard barrington wrote: > Bart/list, I understand what you mean now....I couldn't get the version > of gdal12.dll with a right mouse button click. However, I downloaded > ms441oci.zip which is the windows binary and inside this there was a > gdal-1.2.5.zip which contained the gdal12.dll file. I understand that I > have to use gdal12.dll version 1.2.6 instead of the one I'm using now. > My question is this: is there a single zip file i candownload that > contains the gdal12.dll similar to the one that comes in the > ms441oci.zip or must I build the http://www.gdal.org/dl/gdal126.zip > file?? thanks, Gerard B > > >> From: "Bart van den Eijnden" > >> To: , > >> Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in arcgisbut >> not > mapserver >> Date: Fri, 15 Apr 2005 15:18:58 +0200 > >> > >> Gerard, > >> > >> I would recommend trying to use filemon from >> http://www.sysinternals.com to > determine if the qix files are actually used. >> > >> I remember one of my old posts in which I had similar problems, might be > informative (or confusing :) ): >> > >> http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0407/msg00673.html > >> > >> Secondly, the OGR issue, see the 1.2.6 release notes: > >> > >> http://www.intevation.de/pipermail/freegis-list/2005-March/002209.html > >> > >> Shapefile Driver: > >> - Added support for MapServer style spatial index (.qix). > >> > >> So that's fairly new. > >> > >> Does your gdal12.dll have version info? You can check with your right >> mouse > button and then the version tab. >> > >> Best regards, > >> Bart > >> > >> Bart van den Eijnden > >> Syncera-ITSolutions > >> Postbus 270 > >> 2600 AG DELFT > >> > >> tel.nr.: 015-7512436 > >> email: BEN at Syncera-ITSolutions.nl > >> > >> >>> gerard barrington 04/15/05 03:03pm >>> > >> > >> Bart, > >> I was hoping I could get a little clarification just to be sure I >> understand > what you mean. I should create a .qix file for each shapefile using > shptree. Then once they all have a .qix, then I should create the > tiledindexes using ogrtindex? Will the tileindexes take the .qix into > consideration? >> Second, I'm not sure what you mean by the following: > >> "Also, it depends on the GDAL/OGR version whether or not the qix files >> are > actually used (that's a relatively new feature). If I recall correctly > that was added in GDAL/OGR 1.2.6, but Frank knows for sure. " >> Thanks for all your help.... > >> Gerard B > >> > >> > >> >From: Bart van den Eijnden > >> >Reply-To: Bart van den Eijnden > >> >To: MAPSERVER-USERS at LISTS.UMN.EDU > >> >Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in arcgis >> but not > mapserver >> >Date: Thu, 14 Apr 2005 21:13:37 +0200 > >> > > >> >Hi Gerard, > >> > > >> >I would suggest using ogrtindex instead to build the tileindexes. > >> >There is > >> >a little trick that you should not run ogrtindex from the directory > >> >which > >> >contains the data (otherwise it does not create an absolute path to > >> >the > >> >data in the LOCATION item). So run it from the directory where you > >> >installed FWTools eg: > >> > > >> >for %i in (d:\data\*.shp) do d:\programs\fwtools\bin\ogrtindex > >> >mytileindex.shp %i > >> > > >> >About the performance, have you created shapefile qix indexes (using > >> >shptree?). Also, it depends on the GDAL/OGR version whether or not > >> >the qix > >> >files are actually used (that's a relatively new feature). If I > >> >recall > >> >correctly that was added in GDAL/OGR 1.2.6, but Frank knows for > >> >sure. > >> > > >> >I think Mapserver normally scales well with a lot of LAYERs, it may > >> >have > >> >to do with your data structures and not the amount of LAYERs. > >> > > >> >Best regards, > >> >Bart > >> > > >> >On Thu, 14 Apr 2005 16:39:29 -0230, gerard barrington > >> > wrote: > >> > > >> >>Bart, Thanks....your solution worked. None of the entries in the > >> >>LOCATION field of my dbf file had the '.shp'. So I added it to the > >> >>entries and the tiledindex displays correctly. (I didn't need to > >> >>use the > >> >>0, it works without it.) As a side note, do you know how I could go > >> >>about editing all my dbf files without having to go into them > >> >>maunally > >> >>and add the ending to every entry. I used the tile4ms command to > >> >>create > >> >>the tiledindex. Also, the speed of mapserver seems to go down > >> >>drastically when you add more layers to the map file. My map file > >> >>currently has 46 layers in it,all of which have a tiledindex as its > >> >>datasource. What can I do to help speed up the mapserver. Thanks > >> >>again, > >> >>Gerard B > >> >>>From: Bart van den Eijnden > >> >> > >> >>>Reply-To: Bart van den Eijnden > >> >> > >> >>>To: MAPSERVER-USERS at LISTS.UMN.EDU > >> >> > >> >>>Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in > >> >>>arcgis > >> >>>but not > >> >>mapserver > >> >>>Date: Thu, 14 Apr 2005 20:20:00 +0200 > >> >> > >> >>> > >> >> > >> >>>Gerard, > >> >> > >> >>> > >> >> > >> >>>does your LOCATION item in your tile-index dbf have c:\shapefile > >> >>>or > >> >> > >> >>>c:\shapefile.shp? Looking at your error message it looks like the > >> >> > >> >>>first > >> >> > >> >>>option which is incorrect. > >> >> > >> >>> > >> >> > >> >>>You can also try c:\shapefile.shp,0 in the LOCATION field. > >> >> > >> >>> > >> >> > >> >>>Hope this helps. > >> >> > >> >>> > >> >> > >> >>>Best regards, > >> >> > >> >>>Bart > >> >> > >> >>> > >> >> > >> >>>On Thu, 14 Apr 2005 14:47:48 -0230, gerard barrington > >> >> > >> >>> wrote: > >> >> > >> >>> > >> >> > >> >>>>hi, using the ogr worked out for a POLYGON layer that did not > >> >>>>have > >> >> > >> >>>>a > >> >> > >> >>>>tiledindex. The following worked perfect: LAYER > >> >> > >> >>>>NAME "name" > >> >> > >> >>>>TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "C:\shapefile.shp" ... > >> >> > >> >>>>END > >> >> > >> >>>>However, this will not work for tiledindex. On the doc page for > >> >>>>OGR > >> >> > >> >>>>it > >> >> > >> >>>>says the following should work but it does not. LAYER > >> >> > >> >>>>NAME "nam" > >> >> > >> >>>>TYPE POLYGON > >> >> > >> >>>>CONNECTIONTYPE OGR > >> >> > >> >>>>TILEINDEX "C:\tiledindex.shp" > >> >> > >> >>>>... END The first entry in the tiled index is for > >> >>>>c:\shapefile.shp > >> >> > >> >>>>but > >> >> > >> >>>>it returns the following error: msDrawMap(): Image handling > >> >>>>error. > >> >> > >> >>>>Failed to draw layer named 'nam'. msOGRFileOpen(): OGR error. > >> >>>>Open > >> >> > >> >>>>failed for OGR connection `c:\shapefile'. File not found or > >> >> > >> >>>>unsupported > >> >> > >> >>>>format. Any ideas why the tiledindex wouldn't work? I have used > >> >> > >> >>>>tiledindexes for points and lines and it works fine. Thanks > >> >>>>again! > >> >> > >> >>>>Gerard B. > >> >> > >> >>>> > >> >> > >> >>>>>From: Bart van den Eijnden > >> >> > >> >>>> > >> >> > >> >>>>>Reply-To: Bart van den Eijnden > >> >> > >> >>>> > >> >> > >> >>>>>To: MAPSERVER-USERS at LISTS.UMN.EDU > >> >> > >> >>>> > >> >> > >> >>>>>Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in > >> >> > >> >>>>>arcgis > >> >> > >> >>>>>but not > >> >> > >> >>>>mapserver > >> >> > >> >>>>>Date: Wed, 13 Apr 2005 21:18:12 +0200 > >> >> > >> >>>> > >> >> > >> >>>>> > >> >> > >> >>>> > >> >> > >> >>>>>Hi, > >> >> > >> >>>> > >> >> > >> >>>>> > >> >> > >> >>>> > >> >> > >> >>>>>It should work if you are using Mapserver 4.4 or later. > >> >> > >> >>>> > >> >> > >> >>>>> > >> >> > >> >>>> > >> >> > >> >>>>>Otherwise try showing it through OGR. > >> >> > >> >>>> > >> >> > >> >>>>> > >> >> > >> >>>> > >> >> > >> >>>>>CONNECTIONTYPE OGR > >> >> > >> >>>> > >> >> > >> >>>>>CONNECTION "path/my.shp" > >> >> > >> >>>> > >> >> > >> >>>>> > >> >> > >> >>>> > >> >> > >> >>>>>Best regards, > >> >> > >> >>>> > >> >> > >> >>>>>Bart > >> >> > >> >>>> > >> >> > >> >>>>> > >> >> > >> >>>> > >> >> > >> >>>>>On Wed, 13 Apr 2005 16:45:50 -0230, gerard barrington > >> >> > >> >>>> > >> >> > >> >>>>> wrote: > >> >> > >> >>>> > >> >> > >> >>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>I checked with ogrinfo and the shapefile is a <3D POLYGON>. > >> >>>>>>Other > >> >> > >> >>>> > >> >> > >> >>>>>>shape > >> >> > >> >>>> > >> >> > >> >>>>>>files I have show up simply as when checked with > >> >> > >> >>>>>>ogrinfo. > >> >> > >> >>>> > >> >> > >> >>>>>>Is > >> >> > >> >>>> > >> >> > >> >>>>>>there anything i can do to show this polygon in mapserver? > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>From: Bart van den Eijnden > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>Reply-To: Bart van den Eijnden > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>To: MAPSERVER-USERS at LISTS.UMN.EDU > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in > >> >> > >> >>>> > >> >> > >> >>>>>>>arcgis > >> >> > >> >>>> > >> >> > >> >>>>>>>but not > >> >> > >> >>>> > >> >> > >> >>>>>>mapserver > >> >> > >> >>>> > >> >> > >> >>>>>>>Date: Wed, 13 Apr 2005 20:32:42 +0200 > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>Hi, > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>are you sure it is not a polyline shape? Did you try TYPE > >> >>>>>>>LINE? > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>Otherwise open it up with ogrinfo and see what it says > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>(http://fwtools.maptools.org). > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>Best regards, > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>Bart > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>On Wed, 13 Apr 2005 16:04:39 -0230, gerard barrington > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>> wrote: > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>Hi list, I have a polygon shapefile which I can open and view > >> >> > >> >>>>>>>>in > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>ArcExplorer and everything looks perfect. However, when I try > >> >> > >> >>>>>>>>to > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>use the > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>same shapefile as data for a LAYER of TYPE POLYGON, I get the > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>following > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>exception: msDrawMap(): Image handling error. Failed to draw > >> >> > >> >>>> > >> >> > >> >>>>>>>>layer > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>named > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>'aal135'. msDrawShape(): General error message. Only polygon > >> >> > >> >>>> > >> >> > >> >>>>>>>>shapes > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>can > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>be drawn using a POLYGON layer definition. So I tried > >> >>>>>>>>switching > >> >> > >> >>>> > >> >> > >> >>>>>>>>the > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>TYPE > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>in my layer to POINT and a couple of points along the border > >> >>>>>>>>of > >> >> > >> >>>> > >> >> > >> >>>>>>>>the > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>polygon showed up. I know the shapefile is a polygon though > >> >> > >> >>>> > >> >> > >> >>>>>>>>because > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>it > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>displays as the correct shape in arcExplorer. Can someone > >> >>>>>>>>tell > >> >> > >> >>>>>>>>me > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>why > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>the polygon will show up in ArcExplorer but not in mapserver? > >> >> > >> >>>>>>>>Is > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>there > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>anything I can do to fix this problem?? I am at real loss > >> >>>>>>>>here > >> >> > >> >>>> > >> >> > >> >>>>>>>>for > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>why > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>this happens and would really appreciate any help.... Thanks > >> >> > >> >>>> > >> >> > >> >>>>>>>>Gerard > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>>B > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>-- > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>>>>Using Opera's revolutionary e-mail client: > >> >> > >> >>>> > >> >> > >> >>>>>>>http://www.opera.com/m2/ > >> >> > >> >>>> > >> >> > >> >>>>>> > >> >> > >> >>>> > >> >> > >> >>>>> > >> >> > >> >>>> > >> >> > >> >>>>> > >> >> > >> >>>> > >> >> > >> >>>>> > >> >> > >> >>>> > >> >> > >> >>>>>-- > >> >> > >> >>>> > >> >> > >> >>>>>Using Opera's revolutionary e-mail client: > >> >> > >> >>>>>http://www.opera.com/m2/ > >> >> > >> >>>> > >> >> > >> >>> > >> >> > >> >>> > >> >> > >> >>> > >> >> > >> >>>-- > >> >> > >> >>>Using Opera's revolutionary e-mail client: > >> >>>http://www.opera.com/m2/ > >> >> > >> > > >> > > >> > > >> >-- > >> >Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > >> > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From lfilak at MEDINACO.ORG Fri Apr 15 12:53:53 2005 From: lfilak at MEDINACO.ORG (Lowell Filak) Date: Fri, 15 Apr 2005 15:53:53 -0400 Subject: glibc error in queryByPoint call Message-ID: The following message was sent by Aaron Craig on Thu, 14 Apr 2005 11:45:03 +0200. > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Here's some code: > > #!/usr/bin/perl > > use warnings; > use strict; > > use mapscript; > > $| = 1; > > my $map = new > mapscript::mapObj("/home/aaron/dev/OpenPortal/app/PortalData/confartigianato/Tag/MapServer/Sardegna.map") > ~ || die("Couldn't make a mapscript::mapObj: "._GetMapscriptError()); > my $lyr = $map->getLayerByName("musei") > ~ || die("Can't get layer: "._GetMapscriptError()); > my $pnt = mapscript::pointObj->new(); > > # map extent as defined in Sardegna.map: 1426638 4301755 1570229 4573136 > $pnt->{x} = 1513869.5325; > $pnt->{y} = 4517136.74603175; > $lyr->{template} = "DummyTemplateOrQueriesWontWork" > ~ if(!$lyr->{template}); > > my $rst = $lyr->queryByPoint($map, $pnt, $mapscript::MS_SINGLE, 10); > > sub _GetMapscriptError > { > my $sReturn = "\n================================\n"; > my $err = mapscript::errorObj->new(); > while($err && $err->{code} != $mapscript::MS_NOERR) > { > $sReturn .= "\tError in '$err->{routine}': code $err->{code} (see > documentation for error code meanings.)\n"; > $sReturn .= "\tError message: $err->{message}\n"; > $err = $err->next(); > } > > return "$sReturn\n================================\n"; > } > > =pod > Mapfile > > MAP # [minx] [miny] [maxx] [maxy] > ~ EXTENT 1426638 4301755 1570229 4573136 > STATUS ON > SIZE 400 756 > IMAGETYPE PNG > UNITS METERS > > SYMBOLSET "../../../Common/MapServer/Symbols/default.sym" > FONTSET "../../../Common/MapServer/fonts.list" > > DEBUG ON > > WEB > TEMPLATE 'index.html' > HEADER 'Templates/header.html' > FOOTER 'Templates/footer.html' > IMAGEPATH 'var/www/OpenPortal/htdocs/confartigianato/Images/' > IMAGEURL '/' > LOG '/var/www/OpenPortal' > END > > # Layers for displaying clicks > > LAYER > NAME "musei" > TYPE POINT > STATUS OFF > > CONNECTION 'user=tsc2 password=tsc2 dbname=geo_sardegna' > CONNECTIONTYPE POSTGIS > DATA 'the_point from musei' > > CLASS > NAME "musei" > STYLE > SYMBOL > "/var/www/OpenPortal/htdocs/confartigianato/Images/icona_small.gif" > SIZE 10 > COLOR 0 0 0 > END > LABEL > TYPE BITMAP > SIZE TINY > COLOR 0 0 0 > POSITION AUTO > PARTIALS FALSE > BUFFER 1 > END > END > END > > > END > > =cut > > Here's the error message: > > [aaron at Zaphod Utilities]$ ./TestMapServerQuery.pl > *** glibc detected *** double free or corruption (!prev): 0x083654c0 *** > Aborted > > > Any ideas? I've tried Google but come up with nothing helpful. > > Thanks! > > - -- Aaron, I don't have direct experience with this, but can you do something like: dbg perl core > bt and obtain some more information? Lowell From akrherz at IASTATE.EDU Fri Apr 15 14:30:12 2005 From: akrherz at IASTATE.EDU (Daryl Herzmann) Date: Fri, 15 Apr 2005 16:30:12 -0500 Subject: server In-Reply-To: Message-ID: On Fri, 15 Apr 2005, Kevin Flanders wrote: > Are there current server specs available for the "perfect" server for > MapServer? Does the multi-threading capability affect the server specs? This is a very difficult question to answer. Please describe the tasks you will be using Mapserver for. Where will the data layers for Mapserver reside? - External WMS ? - PostGIS ? - Shapefiles ? - Raster ? What is your budget? In general, spend your money on fast RAID disk solutions. IO is almost always the bottleneck. Get a SCSI 15K U320 RAID solution and you should be very happy. But even with such a hardware solution, there are software tuning tasks to do with Mapserver data sources / layers / etc... (This could be a very long email.) Please try to be a bit more specific and I am sure folks will chime in on the list with what works for them. HTH, daryl From panchuri at MSA-OXFORD.ARS.USDA.GOV Fri Apr 15 14:54:42 2005 From: panchuri at MSA-OXFORD.ARS.USDA.GOV (Pratap Anchuri) Date: Fri, 15 Apr 2005 16:54:42 -0500 Subject: curl error Message-ID: we are using Java mapscripting program to access terraserver's images through WMS service. We r getting following error msg when the program is run. with debug on in Map file for the wms layer. java.lang.UnknownError: WMS GetMap request failed for layer 'aerial' (Status -6: ). at edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw(Native Method) at edu.umn.gis.mapscript.mapObj.draw(mapObj.java:397) at serv.DrawMap.main(DrawMap.java:41) HTTP: Starting to prepare HTTP requests. HTTP request: id=0, http://terraservice.net/ogcmap.ashx? LAYERS=DRG&REQUEST=GetMap&SERVICE=WMS&FORMAT=image% 2Fjpeg&STYLES=&HEIGHT=500&VERSION=1.1.1&SRS=EPSG:26910&WIDTH=600&BBOX=54720 0%2C4181733%2E3333333335%2C553600%2C4187066% 2E6666666665&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage HTTP: Before download loop HTTP: After download loop msHTTPExecuteRequests() timing summary per layer (connect_time + time_to_first_packet + download_time = total_time in seconds) HTTP: request failed with curl error code 6 () for http://terraservice.net/ogcmap.ashx? LAYERS=DRG&REQUEST=GetMap&SERVICE=WMS&FORMAT=image% 2Fjpeg&STYLES=&HEIGHT=500&VERSION=1.1.1&SRS=EPSG:26910&WIDTH=600&BBOX=54720 0%2C4181733%2E3333333335%2C553600%2C4187066% 2E6666666665&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage Layer 0: 0.000 + 0.000 + 0.000 = 0.000s Exception in thread "main" And the map file used is : MAP NAME STATES STATUS ON SIZE 600 500 EXTENT 547200.00 4182400.00 553600.00 4186400.00 #UNITS METERS #SHAPEPATH "gisdata" #TEMPLATEPATTERN "itasca" IMAGETYPE PNG PROJECTION # "proj=utm" # "ellps=GRS80" # "zone=15" # "north" # "no_defs" # # OR: # "init=epsg:26910" END WEB IMAGEPATH 'C:\eclipse\workspace\MapSeverProj\Output\tmp\' IMAGEURL '/tmp/' END LAYER NAME "aerial" TYPE RASTER DEBUG ON STATUS ON CONNECTIONTYPE WMS CONNECTION "http://terraservice.net/ogcmap.ashx?" METADATA #VERSION=1.1.1&SERVICE=wms&LAYERS=DRG&FORMAT=image/jpeg&STYLES=&req uest=GetMap "wms_name" "DRG" "wms_request" "GetMap" "wms_srs" "EPSG:26910" "wms_format" "image/jpeg" "wms_bbox" "547,200.00 4,182,400.00 553,600.00 4,186,400.00" "wms_width" "800" "wms_height" "500" "wms_server_version" "1.1.1" "wms_Exceptions" "application/vnd.ogc.se_xml" END END END we have placed libcurl.dll in windows system directory. Any suggest for the possible cause of error. Thanks in advance. pratap From sgillies at FRII.COM Fri Apr 15 15:17:32 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Fri, 15 Apr 2005 16:17:32 -0600 Subject: curl error In-Reply-To: Message-ID: On Apr 15, 2005, at 3:54 PM, Pratap Anchuri wrote: > we are using Java mapscripting program to access terraserver's images > through WMS service. We r getting following error msg when the program > is > run. with debug on in Map file for the wms layer. > > java.lang.UnknownError: WMS GetMap request failed for layer 'aerial' > (Status -6: ). > at edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw(Native Method) > at edu.umn.gis.mapscript.mapObj.draw(mapObj.java:397) > at serv.DrawMap.main(DrawMap.java:41) > HTTP: Starting to prepare HTTP requests. > > HTTP request: id=0, http://terraservice.net/ogcmap.ashx? > LAYERS=DRG&REQUEST=GetMap&SERVICE=WMS&FORMAT=image% > 2Fjpeg&STYLES=&HEIGHT=500&VERSION=1.1.1&SRS=EPSG: > 26910&WIDTH=600&BBOX=54720 > 0%2C4181733%2E3333333335%2C553600%2C4187066% > 2E6666666665&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage > > HTTP: Before download loop > > HTTP: After download loop > > msHTTPExecuteRequests() timing summary per layer (connect_time + > time_to_first_packet + download_time = total_time in seconds) > > HTTP: request failed with curl error code 6 () for > http://terraservice.net/ogcmap.ashx? > LAYERS=DRG&REQUEST=GetMap&SERVICE=WMS&FORMAT=image% > 2Fjpeg&STYLES=&HEIGHT=500&VERSION=1.1.1&SRS=EPSG: > 26910&WIDTH=600&BBOX=54720 > 0%2C4181733%2E3333333335%2C553600%2C4187066% > 2E6666666665&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage > > Layer 0: 0.000 + 0.000 + 0.000 = 0.000s > Exception in thread "main" > http://www.google.com/search?q=curl+error+code Error code 6 is "host not resolved". cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From sgillies at FRII.COM Fri Apr 15 15:38:34 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Fri, 15 Apr 2005 16:38:34 -0600 Subject: curl error In-Reply-To: Message-ID: On Apr 15, 2005, at 4:28 PM, PRATAP ANCHURI wrote: > sean, > > when i give the url to curl command as: > > curl " > http://terraservice.net/ogcmap.ashx? > LAYERS=DRG&REQUEST=GetMap&SERVICE=WMS&FORMAT=image%2Fjpeg&STYLES=&HEIGH > T=500&VERSION=1.1.1&SRS=EPSG: > 26910&WIDTH=600&BBOX=547200%2C4181733%2E3333333335%2C553600%2C4187066%2 > E6666666665&TRANSPARENT=TRUE&EXCEPTIONS=application/ > vnd.ogc.se_inimage" > > > i am getting the image from terraserver. so i dont think host url has > any error. > > is there a way to check whether mapserver is configured with curl > support > > Try "mapserv -v". What is the source of your mapscript module? Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From bill at BINKO.NET Sat Apr 16 02:59:09 2005 From: bill at BINKO.NET (Bill Binko) Date: Sat, 16 Apr 2005 05:59:09 -0400 Subject: Aggregation in Maps Message-ID: Hi everyone, So I was playing around with various projects and I came across a problem: I had data that was only meaningful up close, but that I wanted summary access to. For example, parcel attributes (like sale_price) are naturally associated directly with a parcel shape column: however, you often want to aggregate them (average over an area or the like). So I created a PL/PGSQL function that took a table, column, number of rows and number of columns and generated a new table with just a grid of box shapes that cover the same area. I call it makeBlocks(): # select makeBlocks('parcels', 'parcel_shape', 'parcel_boxes', 'parcel_box', 10, 10 ); Then, I added columns for attributes I wanted to aggregate: # alter table parcel_boxes add column avg_sale_price double precision; And ran a NASTY SLOW query like this: # update parcel_boxes set avg_sale_price = (select avg(sale_price) from handyViewWithSalePrice where parcel_shape && parcel_box); (Obviously, handyView is nastier and better named :) It takes FOREVER, but when it's done, it works! It took about 5 minutes for that 10x10 grid, and I'm about to start a 100x100 that might take all day :) I just thought I'd share the idea (and the PL/PGSQL) with the group. Please forgive the code: it's my first forray into PL/PGSQL. If anyone has any ideas on ways to make it faster (or better) please let me know. Here's an example of the output (and yes, it uses the gradient support patch). http://www.binko.net/blocks.png Bill ----Start PL/PGSQL code CREATE OR REPLACE FUNCTION makeBlocks(text, text, text, text, integer, integer) returns text AS ' DECLARE source_table ALIAS FOR $1; source_col ALIAS for $2; dest_table ALIAS for $3; dest_col ALIAS for $4; num_cols ALIAS for $5; num_rows ALIAS for $6; thesrid integer; block_width double precision := 0; block_height double precision := 0; border box3d; tmpString text; result text; therow record; BEGIN thesrid := srid from geometry_columns where f_table_name ilike source_table and f_geometry_column ilike source_col; EXECUTE \'CREATE TABLE \' || dest_table || \' ( gid serial )\'; -- RAISE NOTICE ''SRID = %'', thesrid; tmpString := \'SELECT AddGeometryColumn(''''\' || dest_table || \''''',''''\' || dest_col ||\''''',\' || thesrid::text || \', ''''POLYGON'''', 2 )\'; EXECUTE tmpString; tmpString = \'SELECT box3d(extent(\'|| source_col || \')) as boundary from \' || source_table || \' LIMIT 1\'; -- RAISE NOTICE ''borderq = %'', tmpString; for therow in EXECUTE tmpString LOOP border := therow.boundary; end loop; -- RAISE NOTICE ''borderReult = %'', border; DECLARE blx double precision; bly double precision; urx double precision; ury double precision; insertStmt text; BEGIN block_width := (xmax(border) - xmin(border)) / num_cols; block_height := (ymax(border) - ymin(border))/ num_rows; for r in 1 .. num_rows LOOP -- RAISE NOTICE ''r = %'', r; for c in 1 .. num_cols LOOP -- RAISE NOTICE ''c = %'', c; blx := xmin(border) + (c-1)*block_width; bly := ymin(border) + (r-1)*block_height; urx := xmin(border) + (c)*block_width; ury := ymin(border) + (r)*block_height; tmpString := \'SETSRID(BOX3D(''''BOX3D(\' || blx || \' \' || bly || \' 0, \' || urx || \' \' || ury || \' 0)''''), \' || thesrid || \')\'; -- RAISE NOTICE ''box = %'', tmpString; insertStmt := ''insert into '' || dest_table || ''( '' || dest_col || '') values ( ''|| tmpString || '' ) ''; -- RAISE NOTICE ''insert = %'', insertStmt; EXECUTE insertStmt; END LOOP; END LOOP; END; tmpString = \'create index \'|| dest_table || \'_gist on \' || dest_table || \' using GIST ( \' || dest_col || \')\'; EXECUTE tmpString; return ''SUCCESS''; end; ' LANGUAGE plpgsql; From constantin.a.cristian at GMAIL.COM Sat Apr 16 06:57:03 2005 From: constantin.a.cristian at GMAIL.COM (Constantin Cristian) Date: Sat, 16 Apr 2005 16:57:03 +0300 Subject: C# question Message-ID: Hello Does any one any idea how to implement i_obj.write method instead of i_obj.save, for example if I want to use the stream with "System.Drawing.Bitmap.FromStream" method. Here is some code: mapObj m_obj = new mapObj("C:\\ms4w\\apps\\work\\test.map"); Console.WriteLine ("# Map layers " + m_obj.numlayers + "; Map name = " + m_obj.name); for (int i=0; i From sgillies at FRII.COM Sat Apr 16 07:48:08 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Sat, 16 Apr 2005 08:48:08 -0600 Subject: C# question In-Reply-To: Message-ID: On Apr 16, 2005, at 7:57 AM, Constantin Cristian wrote: > This is a multi-part message in MIME format. > > ------=_NextPart_000_0355_01C542A5.509D2480 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > Hello > > Does any one any idea how to implement i_obj.write method instead of = > i_obj.save, for example if I want to use the stream with = > "System.Drawing.Bitmap.FromStream" method. > > Here is some code: > > mapObj m_obj =3D new mapObj("C:\\ms4w\\apps\\work\\test.map");=20 > > Console.WriteLine ("# Map layers " + m_obj.numlayers + "; Map name =3D > " = > + m_obj.name);=20 > > for (int i=3D0; i > { > > Console.WriteLine("Layer [" + i + "] name: " + m_obj.getLayer(i).name); > > } > > > imageObj i_obj =3D m_obj.draw(); > > Console.WriteLine("Image URL =3D " + i_obj.imageurl + "; Image path > =3D = > " + i_obj.imagepath);=20 > > Console.WriteLine("Image height =3D " + i_obj.height + "; width =3D " > + = > i_obj.width);=20 > > > i_obj.save("test.png",m_obj); > > Any sample code will be greatly appreciated....:) > For versions before 4.5, the Python mapscript module has a imageObj.write method. You could look at that for an example. Beginning with version 4.6 we have a standard imageObj.getBytes method that is shared by all mapscripts (except PHP). However, it requires a small bit of extra code that is language specific and converts getByte's output structure into a string or array type for the target language. So far we only have these typemaps for Java and Python. The C# module is in need of someone(s) who will study the details of SWIG/C# and implement the proper typemap. Not being a C# user myself, I can not justify spending my personal resources on this, but I can provide some general assistance and coaching on how to write SWIG typemaps. cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From ortelius at GMAIL.COM Sun Apr 17 06:36:09 2005 From: ortelius at GMAIL.COM (Jeffrey Johnson) Date: Sun, 17 Apr 2005 06:36:09 -0700 Subject: Search returned no results Message-ID: I'm having trouble getting query mode to work in my first mapserver application. The standard "msQueryByPoint(): Search returned no results. No matching record(s) found. " is returned. The map file and template seem pretty simple and straightforward. I checked that img.x and img.y are being passed. Not sure whats up. Any ideas? Jeff ----Map File----- MAP NAME SDNHMPaleo STATUS ON SIZE 800 600 EXTENT 6150763 1775304 6613436 2129759 UNITS METERS SHAPEPATH "/home/www/sdnhmpaleo/data" IMAGECOLOR 230 230 230 SYMBOLSET 'symbols.sym' FONTSET "fonts/fonts.list" DEBUG ON IMAGETYPE PNG WEB HEADER 'header.html' FOOTER 'footer.html' TEMPLATE 'map.htm' IMAGEPATH '/home/www/sdnhmpaleo/temp/' IMAGEURL '/sdnhmpaleo/temp/' MINSCALE 50000 MAXSCALE 5000000 LOG '/home/www/sdnhmpaleo/sdnhmpaleo.log' END SCALEBAR IMAGECOLOR 255 255 255 LABEL COLOR 0 0 0 SIZE TINY END STYLE 1 SIZE 300 10 COLOR 0 0 0 UNITS MILES INTERVALS 2 TRANSPARENT FALSE STATUS EMBED POSITION LR END LAYER NAME geology DATA cal-geol2 STATUS OFF TYPE POLYGON CLASSITEM 'ptype' LABELITEM 'ptype' CLASS EXPRESSION 'water' COLOR 190 232 255 OUTLINECOLOR 0 0 0 END CLASS EXPRESSION 'Q' COLOR 255 255 179 OUTLINECOLOR 0 0 0 END *** More classes here *** END LAYER NAME roads DATA SD-Freeways2 STATUS OFF TYPE LINE CLASS COLOR 0 0 0 END END LAYER NAME localities DATA localities STATUS OFF TYPE POINT CLASS SYMBOL 'circle' COLOR 255 0 0 MINSIZE 5 END END END ----End Map File----- ----HTML Template----- SDNHM Paleo Collection WebGIS - Sample Map
>

MapServer Tutorial:
> Example 1.8

>
> src="http://localhost/cgi-bin/mapserv40?map=C:/ms4w/Apache/htdocs/tutorial/ >example1-9.map&mode=map" /> >
>

The map above was created in > "map" mode. It is > a static map.

> > >
action="http://localhost/cgi-bin/mapserv40"> > > > > > > >
> > >
> > width="400" height="300"> >
>
>
> ...etc...etc...etc... > > Thanks a lot in advance, > > Andreas. > > > > __________________________________ > Do you Yahoo!? > Yahoo! Small Business - Try our new resources site! > http://smallbusiness.yahoo.com/resources/ -- Pericles S. Nacionales Dept. of Ecology, Evolution, and Behavior University of Minnesota work: 612 624 6713 e-mail: nacional at cbs.umn.edu From raghu at KU.EDU Wed Apr 13 14:23:30 2005 From: raghu at KU.EDU (Shantha, Raghavendra Vasanth) Date: Wed, 13 Apr 2005 16:23:30 -0500 Subject: use of LOG directive in MapScript Message-ID: Hi, I wanted to know if the use of LOG directive in MapScript works. I have the following in my mapscript, but logging does not seem to work # WebObj mapObj.debug = mapscript.MS_ON webObj = mapscript.webObj() webObj.log = 'mapserver.log' webObj.map = mapObj Thanks, Raghu -------------- next part -------------- An HTML attachment was scrubbed... URL: From rhysi at OMNILINK.COM.AU Wed Apr 13 16:59:07 2005 From: rhysi at OMNILINK.COM.AU (Rhys Ickeringill) Date: Thu, 14 Apr 2005 09:59:07 +1000 Subject: Segmentation fault: PHP Mapscript related? Message-ID: BC, I'm pretty new to MapServer myself, but since your not having any luck I thought I'd share my limited experiences. Basically I can't get MapServer with mapscript to work when I compile and link Mapserver against GDAL 1.2.6, but if I do the same against GDAL 1.2.5 everything works as it should. Since nobody else has mentioned this I'd just assumed it was something I was doing wrong. But perhaps it is worth a try? Rhys ----- Original Message ----- From: "BC Rocks" To: Sent: Thursday, April 14, 2005 6:28 AM Subject: Re: [UMN_MAPSERVER-USERS] Segmentation fault: PHP Mapscript related? Thanks Toomas, I tried what you suggested: PHP and Mapserver are explicitly using --with-gd=/usr/local but I still segfault. I even tried compiling PHP with no GD support, but no luck (segfault). FYI, I did have 2 versions of GD installed, but I uninstalled one and am left with gd-2.0.33. Still segfaulting BTW, here is my GDAL config (just in case there are other blatent conflicting libraries I am overlooking): ./configure --enable-shared --with-png=/usr/lib --with-jpeg=/usr/lib --with-pg=/var/lib/pgsql/bin/pg_config --with-geos=yes --with-libtiff=/usr/local/lib --with-geotiff=yes --with-ecw=yes (ecw did not work) Any other thoughts? Thanks, BC On 4/13/05, Toomas Aas wrote: > BC Rocks wrote: > > > PHP was configured as follows (as I am successfully using on another > > box): ./configure --build=i686-mandrake-linux-gnu --prefix=/usr > > --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin > > --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include > > --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var/lib > > --sharedstatedir=/usr/com --mandir=/usr/share/man > > --infodir=/usr/share/info --enable-discard-path > > --enable-force-cgi-redirect --enable-shared --disable-static > > --disable-debug --disable-rpath --enable-pic > > --enable-inline-optimization --enable-memory-limit > > --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php > > --with-pear=/usr/share/pear --enable-magic-quotes --enable-debugger > > --enable-track-vars --with-exec-dir=/usr/bin --with-versioning > > --with-mod_charset --with-regex=php --enable-track-vars > > --enable-trans-sid --enable-safe-mode --enable-ctype --enable-ftp > > --with-gettext=/usr --enable-posix --enable-session --enable-sysvsem > > --enable-sysvshm --enable-yp --with-openssl=/usr --without-kerberos > > --with-ttf --with-freetype-dir=/usr/include/freetype2 > > --with-zlib=/usr --with-zlib=/usr --with-zlib-dir=/usr --with-pear > > --with-jpeg-dir=/usr --with-png-dir=/usr --with-gd > > --enable-gd-native-ttf --with-pgsql=/var/lib/pgsql/ --without-iodbc > > --without-custom-odbc --without-unixODBC --without-dbmaker > > --enable-soap --with-xml=/usr/include/libxml2/libxml > > --with-apxs2=/usr/sbin/apxs2 --with-mcrypt=/usr/local/lib > > --with-curl=/usr/local/include > > > > Mapserver configure parameters are as follows: ./configure > > --with-php=/usr/include/php > > --with-php-regex-dir=/usr/src/php/php-5.0.4/regex > > --with-jpeg=/usr/lib --with-png=/usr/lib > > --with-freetype=/usr/bin/freetype-config --with-proj --with-gd > > --without-pdf --with-geos=/usr/local/bin/geos-config --with-gdal > > --with-postgis=/var/lib/pgsql/bin/pg_config --without-tiff > > --with-wmsclient --with-wfsclient --with-wcs > > --with-curl-config=/usr/bin --with-ogr --with-httpd=/usr/sbin/httpd2 > > I notice that you have used --with-gd both when compiling PHP and Mapserver. > > Actually, you should use something like --with-gd=/usr when compiling > PHP. Otherwise PHP gets compiled with it's bundled version of GD, and > php_mapscript.so gets compiled with whatever version of GD is found at > build time. If these versions don't match exactly, nasty things can happen. > > Substitute the real path where GD is installed instead of /usr, of course. > > To be really sure, use the same path when compiling Mapserver. If you > have only one version of GD installed on your system, it shouldn't > matter, but better safe than sorry. > > > I read some threads with regard to GDAL and JPG/TIFF issues (I did > > try using the internal GDAL libs), but I don't think that is the > > issue... especially since if I pull the php, things compile. > > This seems a likely indication of conflicting GD versions between PHP > and Mapserver. > > -- > Toomas > From arunoday_chatterjee at REDIFFMAIL.COM Wed Apr 13 18:37:07 2005 From: arunoday_chatterjee at REDIFFMAIL.COM (Arunoday Chatterjee) Date: Wed, 13 Apr 2005 20:37:07 -0500 Subject: Map object not intialized by ms_newMapObj in windows xp Message-ID: I'm facing a problem with running php mapscript in my new notebook with windows xp sp2, apache 1.3.23 and php 4.3.8 and mapscript from mapserver-4.2.3-win32- php4.3.7. My machine has got only one user account i.e. me as an administrator. It has dialup networking enabled and has broadband and wireless networking but they are not used. I've not configured any home office network etc. as when i tried to do so my apache started giving problem and i was not able to access localhost or run php. But they are running fine all php scripts execute properly except for this mapscript. I've enabled full drive for all users. But still no improvement. Whenever i execute it is giving me an error stating "call to Fatal error: Call to a member function on a non-object in c:\softwares\apache group\apache\ htdocs\rnd\test2.php on line 15" where line 15 has the following code: $image=$map->draw(); and the previous lines have dl("php_mapscript_42.dll"); $map_path="c:/softwares/Apache Group/Apache/htdocs/rnd/"; $map = ms_newMapObj($map_path."example1-1.map"); I've tested using phpinfo() that the mapscript dll is loading absolutely perfectly. The same code with the same map file the first one from the mapserver tutorial runs absolutely fine on my desktop with win xp sp2 and all other similar softwares. This is probably a permission issue but i tested reading a file from php script and it works perfectly. I even copied the map and data files into the shared documents folder but still it won't work. What is the cause? Any help would be highly appreciated. Thanks & Regards, Arunoday Chatterjee From wlx at MYGIS.ORG Wed Apr 13 19:01:29 2005 From: wlx at MYGIS.ORG (Liangxu Wang) Date: Thu, 14 Apr 2005 10:01:29 +0800 Subject: Map object not intialized by ms_newMapObj in windows xp In-Reply-To: Message-ID: try load phpmapscript in php.ini. then test if php_info()'s result include mapscript information. > I'm facing a problem with running php mapscript in my new notebook with > windows xp sp2, > apache 1.3.23 and php 4.3.8 and mapscript from mapserver-4.2.3-win32- > php4.3.7. > > My machine has got only one user account i.e. me as an administrator. It > has dialup networking > enabled and has broadband and wireless networking but they are not used. > I've not configured > any home office network etc. as when i tried to do so my apache started > giving problem and > i was not able to access localhost or run php. But they are running fine > all php scripts > execute properly except for this mapscript. > I've enabled full drive for all users. But still no improvement. > > Whenever i execute it is giving me an error stating > "call to Fatal error: Call to a member function on a non-object in > c:\softwares\apache group\apache\ > htdocs\rnd\test2.php on line 15" > > where line 15 has the following code: > > $image=$map->draw(); > > and the previous lines have > dl("php_mapscript_42.dll"); > $map_path="c:/softwares/Apache Group/Apache/htdocs/rnd/"; > > $map = ms_newMapObj($map_path."example1-1.map"); > > I've tested using phpinfo() that the mapscript dll is loading absolutely > perfectly. > > The same code with the same map file the first one from the mapserver > tutorial runs absolutely > fine on my desktop with win xp sp2 and all other similar softwares. > > This is probably a permission issue but i tested reading a file from php > script and it works > perfectly. I even copied the map and data files into the shared documents > folder but still > it won't work. What is the cause? > > Any help would be highly appreciated. > > Thanks & Regards, > Arunoday Chatterjee > From Tom.Kralidis at EC.GC.CA Wed Apr 13 21:28:57 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Thu, 14 Apr 2005 00:28:57 -0400 Subject: Unexpected WFS GetFeature results Message-ID: Close out on this thread: It seems that, before the changes to mapogcfilter.c, the like filter evaluated directives like: like 'benthic' To: Like '%benthic%' ...whereas this was tightened up in the changes. So my original test case with the GetFeature filter was getting results back when it shouldn't have, i.e. now MapServer only applies wildcards around the search term if put forth by the client. Thanks Assefa! ..Tom > -----Original Message----- > From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of > Yewondwossen Assefa > Sent: Wednesday, 06 April, 2005 13:16 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS GetFeature results > > > I will look today into it and provide you with the exact SQL > statment created if I do not see any thing obvious. > > Later, > > > Kralidis,Tom [Burlington] wrote: > > Assefa, > > > > I tested this scenario with CVS 20050328 (the day before > you committed > > to mapogcfilter.c and mapogcfilter.h), and everything works fine. > > > > So the problem is somewhere in those changes. > > > > Here's the actual OGC filter: > > > > > > > > > > NAME > > > > -141.84,21.599999999999994 > -56.16,74.16 > > > > > > > > > > > > title > > benthic > > > > > > abstract > > benthic > > > > > > > > keywords > > benthic > > > > > > > > > > > > ..Tom > > > > > > > >>-----Original Message----- > >>From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] > >>On Behalf Of Yewondwossen Assefa > >>Sent: Wednesday, 06 April, 2005 13:03 > >>To: MAPSERVER-USERS at LISTS.UMN.EDU > >>Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS GetFeature results > >> > >> > >>Tom, > >> > >> I did make some changes recently to the way filters were > handled for > >>postgis layers (Bug > >>http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1292). > >> > >> It's probably related to thoses changes. Is it easy for > you to test > >>it against 4.4.x releases ? If you can test and It works I > will start > >>looking into the code to see what the problem is. > >> > >>Later, > >> > >> > >>Kralidis,Tom [Burlington] wrote: > >> > >>>Hi, > >>> > >>>(MapServer CVS, FC2, latest stable supporting libs). > >>> > >>>I have a WFS instance running against a PostGIS table, and when I > >>>invoke a Filter'd GetFeature operation (bbox AND a nested OR), I > >>>expect one result to be returned (only one record in the DB > >> > >>satisfies > >> > >>>this request). > >>> > >>>I've attached a sample HTML form page to correctly invoke > >> > >>the request. > >> > >>>However, I receive all records back in the DB. > >>> > >>>Any idea what's going on here? FYI, here's my DATA string in the > >>>LAYER > >>>object: > >>> > >>> DATA "the_geom from (select service_endpoints.organization as > >>>organization,service_endpoints.endpoint_getresource as > >>>endpoint_getresource,service_endpoints.service_type as > >>>service_type,service_endpoints.service_version as > >>>service_version,service_resources.the_geom as > >>>the_geom,service_resources.resource_id as > >>>resource_id,service_resources.service_id as > >>>service_id,service_resources.name as > >> > >>name,service_resources.title as > >> > >>>title,service_resources.abstract as > >>>abstract,service_resources.keywords > >>>as keywords,service_resources.dataurl as > >>>dataurl,service_resources.metadataurl as > >>>metadataurl,service_resources.legendurl as > >>>legendurl,service_resources.scale_min as > >>>scale_min,service_resources.scale_max > >>> as scale_max,service_resources.srs as > >> > >>srs,service_endpoints.format_list > >> > >>>as format_list,service_resources.style_list as > >>>style_list,service_resources.time_extent as > >>>time_extent,service_resources.queryable as queryable from > >>>service_resources inner join service_endpoints on > >>>service_endpoints.service_id = > >> > >>service_resources.service_id) as t using > >> > >>>unique resource_id" > >>> > >>>Thanks > >>> > >>>..Tom > >>> > >>> > >>> > >> > >>------------------------------------------------------------ > ---------- > >> > >>>-- > >>> > >>> > >>> > >>> > >>> > >>> > >> > >>-- > >>---------------------------------------------------------------- > >>Assefa Yewondwossen > >>Software Analyst > >> > >>Email: assefa at dmsolutions.ca > >>http://www.dmsolutions.ca/ > >> > >>Phone: (613) 565-5056 (ext 14) > >>Fax: (613) 565-0925 > >>---------------------------------------------------------------- > >> > > > > > > > > -- > ---------------------------------------------------------------- > Assefa Yewondwossen > Software Analyst > > Email: assefa at dmsolutions.ca > http://www.dmsolutions.ca/ > > Phone: (613) 565-5056 (ext 14) > Fax: (613) 565-0925 > ---------------------------------------------------------------- > From bob.basques at CI.STPAUL.MN.US Wed Apr 13 21:50:47 2005 From: bob.basques at CI.STPAUL.MN.US (Blammo) Date: Wed, 13 Apr 2005 23:50:47 -0500 Subject: Layer stacking Message-ID: All, I'm looking for a way to control which layers display over which others. Is there a way to apply a hierarchy to the MAP file other than the order of the layer as it's read by MapServer? Thanks bobb From fabrice.thevenon at CG64.FR Thu Apr 14 00:50:34 2005 From: fabrice.thevenon at CG64.FR (Thevenon Fabrice) Date: Thu, 14 Apr 2005 09:50:34 +0200 Subject: Installation - phpmapscript and postgis Message-ID: Hi all, We are preparing a migration from phpmapscript 3.6 to phpmapscript 4.4. I also would like to use PostGis soon (I am waiting for PostGis 1.0). I work under WinXP and use the binaries from maptools.org and don't know very much about compiling source code. My question is : I download the phpmapscript_44.dll from maptools this morning (mapserver-4.4.2-win32-php4.3.11.zip). In a near future, the PostGis 1.0 version will be released (today, it is 1.0 RC6). Will the phpmapscript_44.dll still work with postgis 1.0 or will I need to download a new version of phpmapscript_44.dll, compiled with postgis 1.0? Thanks ! Fabrice -------------- next part -------------- An HTML attachment was scrubbed... URL: From ferencik.ioan at PERSONAL.RO Thu Apr 14 01:43:50 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Thu, 14 Apr 2005 11:43:50 +0300 Subject: legend problems Message-ID: I am a little bit confused i have folowing map file MAP NAME "rosia" STATUS ON SHAPEPATH "date" SIZE 800 600 IMAGETYPE PNG24 IMAGECOLOR 255 255 255 EXTENT 319780 522564 385192 575568 PROJECTION "init=epsg:31700" END FONTSET "fonts/fonts.list" SYMBOLSET "simbol/simbol.sym" REFERENCE EXTENT 319780 522564 385192 575568 IMAGE "date/raster/dem.png" SIZE 100 100 STATUS ON COLOR -1 -1 -1 END LAYER NAME "DEM" DATA 'raster/demback.tif' TYPE RASTER PROJECTION "init=epsg:31700" END STATUS ON GROUP "Base" END LAYER NAME "Cadmium " DATA xysediment04 TYPE POINT PROJECTION "init=epsg:31700" END STATUS ON CLASS NAME "Cadmium normal" COLOR 32 79 240 #albastru SYMBOL "star" EXPRESSION ([CD_114] < 1) SIZE 10 END CLASS NAME "Cadmium plus" COLOR 240 11 16 #rosu SYMBOL "star" EXPRESSION ([CD_114] > 1) SIZE 10 END METADATA END END LAYER NAME "rivers" DATA retea TYPE LINE LABELITEM "DENUMIRE" PROJECTION "init=epsg:31700" END STATUS ON GROUP "Base" CLASS COLOR 35 57 214 NAME "riv" STYLE SIZE 50 SYMBOL "line1" END LABEL ANGLE AUTO BUFFER 10 COLOR 35 57 214 FONT "times-italic" TYPE TRUETYPE SIZE 8 OFFSET 5 5 END END METADATA order 1 END END LAYER NAME "aries" DATA aries TYPE LINE PROJECTION "init=epsg:31700" END STATUS ON CLASS COLOR 35 57 214 NAME "ARIES" STYLE SIZE 50 SYMBOL "line1" END END END SCALEBAR COLOR -1 -1 -1 SIZE 100 3 STYLE 1 STATUS ON IMAGECOLOR 255 255 255 INTERVALS 4 UNITS KILOMETERS END LEGEND IMAGECOLOR 255 255 255 OUTLINECOLOR 0 0 0 KEYSIZE 15 15 STATUS ON LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END TEMPLATE "legenda.html" END WEB TEMPLATE "rosia.html" IMAGEPATH "/ms4w/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" END END and my legend.html looks like this: [leg_group_html]
[leg_group_name]
[leg_layer_name]
[leg_group_name]
[leg_layer_name]
[leg_group_name]
> value=1 [if name=layer_status oper=eq value=1]CHECKED[/if]> > > [leg_layer_name] >
LEGEND

Paleo Localities
Geology
Roads
Hydrology
24K Quad Index
Topo Sheets
Landsat

Browse
Query





Back to Project Homepage
-----End HTML Template----- From ferencik.ioan at PERSONAL.RO Sun Apr 17 07:35:39 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Sun, 17 Apr 2005 17:35:39 +0300 Subject: browser question Message-ID: I have installed yesterday Suse Linux on my computer and I am running in paralel WIN XP and Suse 9.1 Professional. I have Installed FGS package from maptools.org and started succesfully my aplication builded in Xp with ms4w. The problem is that I can acces my local server with http://127.0.0.1:8080/ only with Mozilla but not with konqueror. Can someone tell me why? Thanks Iano Ferencik _____________________________________________ Cinefil?Castiga o excursie la Venetia http://www.cineplus.ro/concurs From Tom.Kralidis at EC.GC.CA Sun Apr 17 07:52:57 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Sun, 17 Apr 2005 10:52:57 -0400 Subject: Search returned no results Message-ID: Try setting tolerance in the LAYER object (i.e. TOLERANCE 10). ..Tom > -----Original Message----- > From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jeffrey Johnson > Sent: Sunday, 17 April, 2005 09:36 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: [UMN_MAPSERVER-USERS] Search returned no results > > > I'm having trouble getting query mode to work in my first > mapserver application. The standard "msQueryByPoint(): Search > returned no results. No matching record(s) found. " is > returned. The map file and template seem pretty simple and > straightforward. I checked that img.x and img.y are being > passed. Not sure whats up. Any ideas? > > Jeff > > ----Map File----- > > MAP > NAME SDNHMPaleo > STATUS ON > SIZE 800 600 > EXTENT 6150763 1775304 6613436 2129759 > UNITS METERS > SHAPEPATH "/home/www/sdnhmpaleo/data" > IMAGECOLOR 230 230 230 > SYMBOLSET 'symbols.sym' > FONTSET "fonts/fonts.list" > DEBUG ON > IMAGETYPE PNG > > WEB > HEADER 'header.html' > FOOTER 'footer.html' > TEMPLATE 'map.htm' > IMAGEPATH '/home/www/sdnhmpaleo/temp/' > IMAGEURL '/sdnhmpaleo/temp/' > MINSCALE 50000 > MAXSCALE 5000000 > LOG '/home/www/sdnhmpaleo/sdnhmpaleo.log' > END > > SCALEBAR > IMAGECOLOR 255 255 255 > LABEL > COLOR 0 0 0 > SIZE TINY > END > STYLE 1 > SIZE 300 10 > COLOR 0 0 0 > UNITS MILES > INTERVALS 2 > TRANSPARENT FALSE > STATUS EMBED > POSITION LR > END > > LAYER > NAME geology > DATA cal-geol2 > STATUS OFF > TYPE POLYGON > CLASSITEM 'ptype' > LABELITEM 'ptype' > CLASS > EXPRESSION 'water' > COLOR 190 232 255 > OUTLINECOLOR 0 0 0 > END > CLASS > EXPRESSION 'Q' > COLOR 255 255 179 > OUTLINECOLOR 0 0 0 > END > *** More classes here *** > END > > LAYER > NAME roads > DATA SD-Freeways2 > STATUS OFF > TYPE LINE > CLASS > COLOR 0 0 0 > END > END > > LAYER > NAME localities > DATA localities > STATUS OFF > TYPE POINT > CLASS > SYMBOL 'circle' > COLOR 255 0 0 > MINSIZE 5 > END > END > END > > ----End Map File----- > > ----HTML Template----- > > > SDNHM Paleo Collection WebGIS - Sample Map > face="arial, helvetica">
action="/cgi-bin/mapserv"> value="[map]"> value="[mapext]">
valign = top>
LEGEND

> [localities_check]>Paleo Localities
type="checkbox" name="layer" value="geology" > [geology_check]>Geology
name="layer" value="roads" [roads_check]>Roads
type="checkbox" name="layer" value="hydro" > [hydro_check]>Hydrology
name="layer" value="quads" [quads_check]>24K Quad Index
> [drg_check]>Topo Sheets
name="layer" value="landsat" [landsat_check]>Landsat
> type="hidden" name="savequery" value="true">
type="radio" name="mode" value="browse" checked>Browse
> Query

>

>

>
Back to Project > Homepage
name="img" src="[img]" width=800 height=600 border=1> >
-----End HTML Template----- > From ortelius at GMAIL.COM Sun Apr 17 08:02:42 2005 From: ortelius at GMAIL.COM (Jeffrey Johnson) Date: Sun, 17 Apr 2005 08:02:42 -0700 Subject: Search returned no results In-Reply-To: <2576812186CDD411BF1500508B6DCE950972F996@ecnwri1.ontario.int.ec.gc.ca> Message-ID: Nope. I tried values up to 100 and no luck. The polygon layer covers nearly all of the map area, so this shouldn't a problem. I am also having trouble getting the legend to work. An image seems to be generated, but its empty. Is there something wrong with my mapfile that allows the map to be generated, but other modules not to work? Thanks, Jeff On 4/17/05, Kralidis,Tom [Burlington] wrote: > > Try setting tolerance in the LAYER object (i.e. TOLERANCE 10). > > ..Tom > > > > -----Original Message----- > > From: UMN MapServer Users List > > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jeffrey Johnson > > Sent: Sunday, 17 April, 2005 09:36 > > To: MAPSERVER-USERS at LISTS.UMN.EDU > > Subject: [UMN_MAPSERVER-USERS] Search returned no results > > > > > > I'm having trouble getting query mode to work in my first > > mapserver application. The standard "msQueryByPoint(): Search > > returned no results. No matching record(s) found. " is > > returned. The map file and template seem pretty simple and > > straightforward. I checked that img.x and img.y are being > > passed. Not sure whats up. Any ideas? > > > > Jeff > > > > ----Map File----- > > > > MAP > > NAME SDNHMPaleo > > STATUS ON > > SIZE 800 600 > > EXTENT 6150763 1775304 6613436 2129759 > > UNITS METERS > > SHAPEPATH "/home/www/sdnhmpaleo/data" > > IMAGECOLOR 230 230 230 > > SYMBOLSET 'symbols.sym' > > FONTSET "fonts/fonts.list" > > DEBUG ON > > IMAGETYPE PNG > > > > WEB > > HEADER 'header.html' > > FOOTER 'footer.html' > > TEMPLATE 'map.htm' > > IMAGEPATH '/home/www/sdnhmpaleo/temp/' > > IMAGEURL '/sdnhmpaleo/temp/' > > MINSCALE 50000 > > MAXSCALE 5000000 > > LOG '/home/www/sdnhmpaleo/sdnhmpaleo.log' > > END > > > > SCALEBAR > > IMAGECOLOR 255 255 255 > > LABEL > > COLOR 0 0 0 > > SIZE TINY > > END > > STYLE 1 > > SIZE 300 10 > > COLOR 0 0 0 > > UNITS MILES > > INTERVALS 2 > > TRANSPARENT FALSE > > STATUS EMBED > > POSITION LR > > END > > > > LAYER > > NAME geology > > DATA cal-geol2 > > STATUS OFF > > TYPE POLYGON > > CLASSITEM 'ptype' > > LABELITEM 'ptype' > > CLASS > > EXPRESSION 'water' > > COLOR 190 232 255 > > OUTLINECOLOR 0 0 0 > > END > > CLASS > > EXPRESSION 'Q' > > COLOR 255 255 179 > > OUTLINECOLOR 0 0 0 > > END > > *** More classes here *** > > END > > > > LAYER > > NAME roads > > DATA SD-Freeways2 > > STATUS OFF > > TYPE LINE > > CLASS > > COLOR 0 0 0 > > END > > END > > > > LAYER > > NAME localities > > DATA localities > > STATUS OFF > > TYPE POINT > > CLASS > > SYMBOL 'circle' > > COLOR 255 0 0 > > MINSIZE 5 > > END > > END > > END > > > > ----End Map File----- > > > > ----HTML Template----- > > > > > > SDNHM Paleo Collection WebGIS - Sample Map > > > face="arial, helvetica">
> action="/cgi-bin/mapserv"> > value="[map]"> > value="[mapext]">
> valign = top>
LEGEND

> > > [localities_check]>Paleo Localities
> type="checkbox" name="layer" value="geology" > > [geology_check]>Geology
> name="layer" value="roads" [roads_check]>Roads
> type="checkbox" name="layer" value="hydro" > > [hydro_check]>Hydrology
> name="layer" value="quads" [quads_check]>24K Quad Index
> > > [drg_check]>Topo Sheets
> name="layer" value="landsat" [landsat_check]>Landsat
> > > type="hidden" name="savequery" value="true">
> type="radio" name="mode" value="browse" checked>Browse
> > Query

> >

> >

> >
Back to Project > > Homepage
> name="img" src="[img]" width=800 height=600 border=1> > >
-----End HTML Template----- > > > From bartvde at XS4ALL.NL Sun Apr 17 08:01:06 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Sun, 17 Apr 2005 17:01:06 +0200 Subject: Search returned no results In-Reply-To: Message-ID: Hi, can you look up the exact mode=query request from your webserver access log? With respect to the legend, only CLASSes that have a NAME show up in the legend. Best regards, Bart On Sun, 17 Apr 2005 08:02:42 -0700, Jeffrey Johnson wrote: > Nope. I tried values up to 100 and no luck. The polygon layer covers > nearly all of the map area, so this shouldn't a problem. I am also > having trouble getting the legend to work. An image seems to be > generated, but its empty. Is there something wrong with my mapfile > that allows the map to be generated, but other modules not to work? > > Thanks, > > Jeff > > On 4/17/05, Kralidis,Tom [Burlington] wrote: >> >> Try setting tolerance in the LAYER object (i.e. TOLERANCE 10). >> >> ..Tom >> >> >> > -----Original Message----- >> > From: UMN MapServer Users List >> > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jeffrey Johnson >> > Sent: Sunday, 17 April, 2005 09:36 >> > To: MAPSERVER-USERS at LISTS.UMN.EDU >> > Subject: [UMN_MAPSERVER-USERS] Search returned no results >> > >> > >> > I'm having trouble getting query mode to work in my first >> > mapserver application. The standard "msQueryByPoint(): Search >> > returned no results. No matching record(s) found. " is >> > returned. The map file and template seem pretty simple and >> > straightforward. I checked that img.x and img.y are being >> > passed. Not sure whats up. Any ideas? >> > >> > Jeff >> > >> > ----Map File----- >> > >> > MAP >> > NAME SDNHMPaleo >> > STATUS ON >> > SIZE 800 600 >> > EXTENT 6150763 1775304 6613436 2129759 >> > UNITS METERS >> > SHAPEPATH "/home/www/sdnhmpaleo/data" >> > IMAGECOLOR 230 230 230 >> > SYMBOLSET 'symbols.sym' >> > FONTSET "fonts/fonts.list" >> > DEBUG ON >> > IMAGETYPE PNG >> > >> > WEB >> > HEADER 'header.html' >> > FOOTER 'footer.html' >> > TEMPLATE 'map.htm' >> > IMAGEPATH '/home/www/sdnhmpaleo/temp/' >> > IMAGEURL '/sdnhmpaleo/temp/' >> > MINSCALE 50000 >> > MAXSCALE 5000000 >> > LOG '/home/www/sdnhmpaleo/sdnhmpaleo.log' >> > END >> > >> > SCALEBAR >> > IMAGECOLOR 255 255 255 >> > LABEL >> > COLOR 0 0 0 >> > SIZE TINY >> > END >> > STYLE 1 >> > SIZE 300 10 >> > COLOR 0 0 0 >> > UNITS MILES >> > INTERVALS 2 >> > TRANSPARENT FALSE >> > STATUS EMBED >> > POSITION LR >> > END >> > >> > LAYER >> > NAME geology >> > DATA cal-geol2 >> > STATUS OFF >> > TYPE POLYGON >> > CLASSITEM 'ptype' >> > LABELITEM 'ptype' >> > CLASS >> > EXPRESSION 'water' >> > COLOR 190 232 255 >> > OUTLINECOLOR 0 0 0 >> > END >> > CLASS >> > EXPRESSION 'Q' >> > COLOR 255 255 179 >> > OUTLINECOLOR 0 0 0 >> > END >> > *** More classes here *** >> > END >> > >> > LAYER >> > NAME roads >> > DATA SD-Freeways2 >> > STATUS OFF >> > TYPE LINE >> > CLASS >> > COLOR 0 0 0 >> > END >> > END >> > >> > LAYER >> > NAME localities >> > DATA localities >> > STATUS OFF >> > TYPE POINT >> > CLASS >> > SYMBOL 'circle' >> > COLOR 255 0 0 >> > MINSIZE 5 >> > END >> > END >> > END >> > >> > ----End Map File----- >> > >> > ----HTML Template----- >> > >> > >> > SDNHM Paleo Collection WebGIS - Sample Map >> > > > face="arial, helvetica">
> > action="/cgi-bin/mapserv"> > > value="[map]"> > > value="[mapext]">
> > valign = top>
LEGEND

>> > > > [localities_check]>Paleo Localities
> > type="checkbox" name="layer" value="geology" >> > [geology_check]>Geology
> > name="layer" value="roads" [roads_check]>Roads
> > type="checkbox" name="layer" value="hydro" >> > [hydro_check]>Hydrology
> > name="layer" value="quads" [quads_check]>24K Quad Index
>> > > > [drg_check]>Topo Sheets
> > name="layer" value="landsat" [landsat_check]>Landsat
>> > > > type="hidden" name="savequery" value="true">
> > type="radio" name="mode" value="browse" checked>Browse
>> > Query

>> >

>> >

>> >
Back to Project >> > Homepage
> > name="img" src="[img]" width=800 height=600 border=1> >> >
-----End HTML Template----- >> > >> > > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From jack.gibb at MOHAWKCOLLEGE.CA Sun Apr 17 08:01:55 2005 From: jack.gibb at MOHAWKCOLLEGE.CA (Jack Gibb) Date: Sun, 17 Apr 2005 11:01:55 -0400 Subject: =?windows-1252?Q?don=92t_get_is_the_image_showing_in?= =?windows-1252?Q?_the_browser?= Message-ID: First part of map file MAP NAME CANADA1 STATUS ON SIZE 800 500 IMAGETYPE PNG IMAGECOLOR 240 240 240 SHAPEPATH "/var/www/html/data" EXTENT -8000000 300000 5000000 1500000 UNITS METERS PROJECTION "proj=lcc" "lat_1=32" "lat_2=44" "lat_0=38" "lon_0=-100" "x_0=0" "y_0=0" "ellps=GRS80" "datum=NAD83" END WEB IMAGEPATH "e:/var/www/html/tmp/" IMAGEURL "e:/var/www/html/tmp/" END ????????? The PHP file draw(); $image_url=$image->saveWebImage(); ?> Canadian Provinces $image_url=

?. When I run the PHP file I get the following line back. e:/var/www/html/tmp/111374926537881.png I get a small box at the top left with the same link location I get an image with the correct name in the correct location What I don?t get is the image showing in the browser. (even though it?s there and linked to it) What am I missing? Running Windows XP Pro with IIS5, latest version of MS4W From sgillies at FRII.COM Sun Apr 17 09:00:32 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Sun, 17 Apr 2005 10:00:32 -0600 Subject: Search returned no results In-Reply-To: Message-ID: You need to define query templates for your layers. Any value will do. I like to do something like this: LAYER ... TEMPLATE "MapServers developers are a bit sadistic and insist on hazing new users with this poorly documented control over query-ability. How many user hours have been lost to this gotcha? I'll bet it's many thousands." ... END cheers, Sean On Apr 17, 2005, at 9:02 AM, Jeffrey Johnson wrote: > Nope. I tried values up to 100 and no luck. The polygon layer covers > nearly all of the map area, so this shouldn't a problem. I am also > having trouble getting the legend to work. An image seems to be > generated, but its empty. Is there something wrong with my mapfile > that allows the map to be generated, but other modules not to work? > > Thanks, > > Jeff=20 > > On 4/17/05, Kralidis,Tom [Burlington] wrote: >> =20 >> Try setting tolerance in the LAYER object (i.e. TOLERANCE 10). >> =20 >> ..Tom >> =20 >> =20 >>> -----Original Message----- >>> From: UMN MapServer Users List >>> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jeffrey Johnson >>> Sent: Sunday, 17 April, 2005 09:36 >>> To: MAPSERVER-USERS at LISTS.UMN.EDU >>> Subject: [UMN_MAPSERVER-USERS] Search returned no results >>> >>> >>> I'm having trouble getting query mode to work in my first >>> mapserver application. The standard "msQueryByPoint(): Search >>> returned no results. No matching record(s) found. " is >>> returned. The map file and template seem pretty simple and >>> straightforward. I checked that img.x and img.y are being >>> passed. Not sure whats up. Any ideas? >>> >>> Jeff >>> >>> ----Map File----- >>> >>> MAP >>> NAME SDNHMPaleo >>> STATUS ON >>> SIZE 800 600 >>> EXTENT 6150763 1775304 6613436 2129759 >>> UNITS METERS >>> SHAPEPATH "/home/www/sdnhmpaleo/data" >>> IMAGECOLOR 230 230 230 >>> SYMBOLSET 'symbols.sym' >>> FONTSET "fonts/fonts.list" >>> DEBUG ON >>> IMAGETYPE PNG >>> >>> WEB >>> HEADER 'header.html' >>> FOOTER 'footer.html' >>> TEMPLATE 'map.htm' >>> IMAGEPATH '/home/www/sdnhmpaleo/temp/' >>> IMAGEURL '/sdnhmpaleo/temp/' >>> MINSCALE 50000 >>> MAXSCALE 5000000 >>> LOG '/home/www/sdnhmpaleo/sdnhmpaleo.log' >>> END >>> >>> SCALEBAR >>> IMAGECOLOR 255 255 255 >>> LABEL >>> COLOR 0 0 0 >>> SIZE TINY >>> END >>> STYLE 1 >>> SIZE 300 10 >>> COLOR 0 0 0 >>> UNITS MILES >>> INTERVALS 2 >>> TRANSPARENT FALSE >>> STATUS EMBED >>> POSITION LR >>> END >>> >>> LAYER >>> NAME geology >>> DATA cal-geol2 >>> STATUS OFF >>> TYPE POLYGON >>> CLASSITEM 'ptype' >>> LABELITEM 'ptype' >>> CLASS >>> EXPRESSION 'water' >>> COLOR 190 232 255 >>> OUTLINECOLOR 0 0 0 >>> END >>> CLASS >>> EXPRESSION 'Q' >>> COLOR 255 255 179 >>> OUTLINECOLOR 0 0 0 >>> END >>> *** More classes here *** >>> END >>> >>> LAYER >>> NAME roads >>> DATA SD-Freeways2 >>> STATUS OFF >>> TYPE LINE >>> CLASS >>> COLOR 0 0 0 >>> END >>> END >>> >>> LAYER >>> NAME localities >>> DATA localities >>> STATUS OFF >>> TYPE POINT >>> CLASS >>> SYMBOL 'circle' >>> COLOR 255 0 0 >>> MINSIZE 5 >>> END >>> END >>> END >>> >>> ----End Map File----- >>> >>> -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From ortelius at GMAIL.COM Sun Apr 17 09:29:43 2005 From: ortelius at GMAIL.COM (Jeffrey Johnson) Date: Sun, 17 Apr 2005 09:29:43 -0700 Subject: Search returned no results In-Reply-To: Message-ID: Problem solved. Thanks! Im off to the template reference which doesn't seem to offer any examples of templates for query results. Have you any better links for something like this. Thanks a bunch, Jeff On 4/17/05, Sean Gillies wrote: > You need to define query templates for your layers. Any value will do. > I like to do something like this: > > LAYER > ... > TEMPLATE "MapServers developers are a bit sadistic and insist on > hazing new users with this poorly documented control over > query-ability. How many user hours have been lost to this gotcha? > I'll bet it's many thousands." > ... > END > > cheers, > Sean > > On Apr 17, 2005, at 9:02 AM, Jeffrey Johnson wrote: > > > Nope. I tried values up to 100 and no luck. The polygon layer covers > > nearly all of the map area, so this shouldn't a problem. I am also > > having trouble getting the legend to work. An image seems to be > > generated, but its empty. Is there something wrong with my mapfile > > that allows the map to be generated, but other modules not to work? > > > > Thanks, > > > > Jeff=20 > > > > On 4/17/05, Kralidis,Tom [Burlington] wrote: > >> =20 > >> Try setting tolerance in the LAYER object (i.e. TOLERANCE 10). > >> =20 > >> ..Tom > >> =20 > >> =20 > >>> -----Original Message----- > >>> From: UMN MapServer Users List > >>> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jeffrey Johnson > >>> Sent: Sunday, 17 April, 2005 09:36 > >>> To: MAPSERVER-USERS at LISTS.UMN.EDU > >>> Subject: [UMN_MAPSERVER-USERS] Search returned no results > >>> > >>> > >>> I'm having trouble getting query mode to work in my first > >>> mapserver application. The standard "msQueryByPoint(): Search > >>> returned no results. No matching record(s) found. " is > >>> returned. The map file and template seem pretty simple and > >>> straightforward. I checked that img.x and img.y are being > >>> passed. Not sure whats up. Any ideas? > >>> > >>> Jeff > >>> > >>> ----Map File----- > >>> > >>> MAP > >>> NAME SDNHMPaleo > >>> STATUS ON > >>> SIZE 800 600 > >>> EXTENT 6150763 1775304 6613436 2129759 > >>> UNITS METERS > >>> SHAPEPATH "/home/www/sdnhmpaleo/data" > >>> IMAGECOLOR 230 230 230 > >>> SYMBOLSET 'symbols.sym' > >>> FONTSET "fonts/fonts.list" > >>> DEBUG ON > >>> IMAGETYPE PNG > >>> > >>> WEB > >>> HEADER 'header.html' > >>> FOOTER 'footer.html' > >>> TEMPLATE 'map.htm' > >>> IMAGEPATH '/home/www/sdnhmpaleo/temp/' > >>> IMAGEURL '/sdnhmpaleo/temp/' > >>> MINSCALE 50000 > >>> MAXSCALE 5000000 > >>> LOG '/home/www/sdnhmpaleo/sdnhmpaleo.log' > >>> END > >>> > >>> SCALEBAR > >>> IMAGECOLOR 255 255 255 > >>> LABEL > >>> COLOR 0 0 0 > >>> SIZE TINY > >>> END > >>> STYLE 1 > >>> SIZE 300 10 > >>> COLOR 0 0 0 > >>> UNITS MILES > >>> INTERVALS 2 > >>> TRANSPARENT FALSE > >>> STATUS EMBED > >>> POSITION LR > >>> END > >>> > >>> LAYER > >>> NAME geology > >>> DATA cal-geol2 > >>> STATUS OFF > >>> TYPE POLYGON > >>> CLASSITEM 'ptype' > >>> LABELITEM 'ptype' > >>> CLASS > >>> EXPRESSION 'water' > >>> COLOR 190 232 255 > >>> OUTLINECOLOR 0 0 0 > >>> END > >>> CLASS > >>> EXPRESSION 'Q' > >>> COLOR 255 255 179 > >>> OUTLINECOLOR 0 0 0 > >>> END > >>> *** More classes here *** > >>> END > >>> > >>> LAYER > >>> NAME roads > >>> DATA SD-Freeways2 > >>> STATUS OFF > >>> TYPE LINE > >>> CLASS > >>> COLOR 0 0 0 > >>> END > >>> END > >>> > >>> LAYER > >>> NAME localities > >>> DATA localities > >>> STATUS OFF > >>> TYPE POINT > >>> CLASS > >>> SYMBOL 'circle' > >>> COLOR 255 0 0 > >>> MINSIZE 5 > >>> END > >>> END > >>> END > >>> > >>> ----End Map File----- > >>> > >>> > -- > Sean Gillies > sgillies at frii dot com > http://users.frii.com/sgillies > > From nacional at CBS.UMN.EDU Sun Apr 17 10:49:29 2005 From: nacional at CBS.UMN.EDU (Pericles S. Nacionales) Date: Sun, 17 Apr 2005 12:49:29 -0500 Subject: =?windows-1252?q?don=92t_get_is_the_image_showing_in_the?= browser In-Reply-To: Message-ID: The answer has to do with protocols. When MapServer processes your mapfile, it works locally--your SHAPEPATH, IMAGEPATH, etc., all point to local paths within your OS. However, when MapServer finishes processing the mapfile, the rest of the work is handled by the HTTP protocol. So everything has to be referenced via HTTP URLs--that's where the IMAGEURL comes in. Let's say you have MapServer output images in e:\var\www\html\tmp\ (both Unix and DOS slashes are valid in MapServer except those pointing to URL's). Also, you have your web server (Apache or IIS) point to this directory as "/tmp/". "/tmp/" is called an Alias by Apache or a virtual directory by IIS and is referenced relative to the web root URL (say, http://localhost/"). So, in this case "/tmp/" is really pointing to "http://localhost/tmp/". In MapServer, the parameter IMAGEURL references the IMAGEPATH directory but in HTTP URL terms. In this case you'll define the paths: IMAGEPATH "e:/var/www/html/tmp/" IMAGEURL "/tmp/" I hope that clear things up. -Perry PS: Not to confuse you or anything but you can probably define non-HTTP urls (as in you original mapfile) but you have to append "file://" instead of "http://" when referencing the imageurl. ) Things that make you go, hmm... On Sunday 17 April 2005 10:01 am, Jack Gibb wrote: > First part of map file > > > > MAP > WEB > > IMAGEPATH "e:/var/www/html/tmp/" > > IMAGEURL "e:/var/www/html/tmp/" > > END > > ????????? > ?. > > When I run the PHP file I get the following line back. > e:/var/www/html/tmp/111374926537881.png > > I get a small box at the top left with the same link location > > I get an image with the correct name in the correct location > > What I don?t get is the image showing in the browser. (even though it?s > there and linked to it) > > What am I missing? > > Running Windows XP Pro with IIS5, latest version of MS4W -- Pericles S. Nacionales Dept. of Ecology, Evolution, and Behavior University of Minnesota work: 612 624 6713 e-mail: nacional at cbs.umn.edu From nacional at CBS.UMN.EDU Sun Apr 17 10:51:51 2005 From: nacional at CBS.UMN.EDU (Pericles S. Nacionales) Date: Sun, 17 Apr 2005 12:51:51 -0500 Subject: Search returned no results In-Reply-To: Message-ID: For an incomplete set of examples ;), see http://terrasip.gis.umn.edu/projects/tutorial/section3.html -Perry On Sunday 17 April 2005 11:29 am, Jeffrey Johnson wrote: > Problem solved. Thanks! Im off to the template reference which doesn't > seem to offer any examples of templates for query results. Have you > any better links for something like this. > > Thanks a bunch, > > Jeff > > On 4/17/05, Sean Gillies wrote: > > You need to define query templates for your layers. Any value will do. > > I like to do something like this: > > > > LAYER > > ... > > TEMPLATE "MapServers developers are a bit sadistic and insist on > > hazing new users with this poorly documented control over > > query-ability. How many user hours have been lost to this gotcha? > > I'll bet it's many thousands." > > ... > > END > > > > cheers, > > Sean > > > > On Apr 17, 2005, at 9:02 AM, Jeffrey Johnson wrote: > > > Nope. I tried values up to 100 and no luck. The polygon layer covers > > > nearly all of the map area, so this shouldn't a problem. I am also > > > having trouble getting the legend to work. An image seems to be > > > generated, but its empty. Is there something wrong with my mapfile > > > that allows the map to be generated, but other modules not to work? > > > > > > Thanks, > > > > > > Jeff=20 > > > > > > On 4/17/05, Kralidis,Tom [Burlington] wrote: > > >> =20 > > >> Try setting tolerance in the LAYER object (i.e. TOLERANCE 10). > > >> =20 > > >> ..Tom > > >> =20 > > >> =20 > > >> > > >>> -----Original Message----- > > >>> From: UMN MapServer Users List > > >>> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jeffrey Johnson > > >>> Sent: Sunday, 17 April, 2005 09:36 > > >>> To: MAPSERVER-USERS at LISTS.UMN.EDU > > >>> Subject: [UMN_MAPSERVER-USERS] Search returned no results > > >>> > > >>> > > >>> I'm having trouble getting query mode to work in my first > > >>> mapserver application. The standard "msQueryByPoint(): Search > > >>> returned no results. No matching record(s) found. " is > > >>> returned. The map file and template seem pretty simple and > > >>> straightforward. I checked that img.x and img.y are being > > >>> passed. Not sure whats up. Any ideas? > > >>> > > >>> Jeff > > >>> > > >>> ----Map File----- > > >>> > > >>> MAP > > >>> NAME SDNHMPaleo > > >>> STATUS ON > > >>> SIZE 800 600 > > >>> EXTENT 6150763 1775304 6613436 2129759 > > >>> UNITS METERS > > >>> SHAPEPATH "/home/www/sdnhmpaleo/data" > > >>> IMAGECOLOR 230 230 230 > > >>> SYMBOLSET 'symbols.sym' > > >>> FONTSET "fonts/fonts.list" > > >>> DEBUG ON > > >>> IMAGETYPE PNG > > >>> > > >>> WEB > > >>> HEADER 'header.html' > > >>> FOOTER 'footer.html' > > >>> TEMPLATE 'map.htm' > > >>> IMAGEPATH '/home/www/sdnhmpaleo/temp/' > > >>> IMAGEURL '/sdnhmpaleo/temp/' > > >>> MINSCALE 50000 > > >>> MAXSCALE 5000000 > > >>> LOG '/home/www/sdnhmpaleo/sdnhmpaleo.log' > > >>> END > > >>> > > >>> SCALEBAR > > >>> IMAGECOLOR 255 255 255 > > >>> LABEL > > >>> COLOR 0 0 0 > > >>> SIZE TINY > > >>> END > > >>> STYLE 1 > > >>> SIZE 300 10 > > >>> COLOR 0 0 0 > > >>> UNITS MILES > > >>> INTERVALS 2 > > >>> TRANSPARENT FALSE > > >>> STATUS EMBED > > >>> POSITION LR > > >>> END > > >>> > > >>> LAYER > > >>> NAME geology > > >>> DATA cal-geol2 > > >>> STATUS OFF > > >>> TYPE POLYGON > > >>> CLASSITEM 'ptype' > > >>> LABELITEM 'ptype' > > >>> CLASS > > >>> EXPRESSION 'water' > > >>> COLOR 190 232 255 > > >>> OUTLINECOLOR 0 0 0 > > >>> END > > >>> CLASS > > >>> EXPRESSION 'Q' > > >>> COLOR 255 255 179 > > >>> OUTLINECOLOR 0 0 0 > > >>> END > > >>> *** More classes here *** > > >>> END > > >>> > > >>> LAYER > > >>> NAME roads > > >>> DATA SD-Freeways2 > > >>> STATUS OFF > > >>> TYPE LINE > > >>> CLASS > > >>> COLOR 0 0 0 > > >>> END > > >>> END > > >>> > > >>> LAYER > > >>> NAME localities > > >>> DATA localities > > >>> STATUS OFF > > >>> TYPE POINT > > >>> CLASS > > >>> SYMBOL 'circle' > > >>> COLOR 255 0 0 > > >>> MINSIZE 5 > > >>> END > > >>> END > > >>> END > > >>> > > >>> ----End Map File----- > > > > -- > > Sean Gillies > > sgillies at frii dot com > > http://users.frii.com/sgillies -- Pericles S. Nacionales Dept. of Ecology, Evolution, and Behavior University of Minnesota work: 612 624 6713 e-mail: nacional at cbs.umn.edu From nunoragil at GMAIL.COM Sun Apr 17 11:31:16 2005 From: nunoragil at GMAIL.COM (Nuno Gil) Date: Sun, 17 Apr 2005 19:31:16 +0100 Subject: WCS map file Message-ID: Dear listers, I am trying to give WCS access to a Landsat5 layer. The original image tiles are available in GDAL virtual files and each one of the virtual files is calling 3 different ArcInfo grids (one for each tile visual band - RGB). Part of my map file is as follows: ... wcs_formats 'GEOTIFF' wcs_nativeformat'"8-bit GeoTIFF' wcs_rangeset_axes 'bands' wcs_rangeset_name 'bands' wcs_rangeset_description 'Enter some clever description of each TM band here...' wcs_rangeset_label 'Band Number' wcs_rangeset_values '1,2,3' wcs_rangeset_rangeitem '_bands' ... When I issue a DecribeCoverage request: http://iceds.ge.ucl.ac.uk/cgi-bin/wcs?REQUEST=DescribeCoverage&COVERAGE=landsat_europe&SERVICE=WCS&map=wcs.map the returned info inside the "Axis_Description" element is as follows: Enter some clever description of each TM band here... bands bands 1 Shouldn't I have 3 values inside the "values" element (one for each band)? How can I describe each band number? I would like to add some info relating to the wavelengths. Even with this describe coverage result I can request all the bands from the server (with the below request for instance): http://iceds.ge.ucl.ac.uk/cgi-bin/wcs?REQUEST=GetCoverage&COVERAGE=landsat_europe&SERVICE=WCS&map=wcs.map&FORMAT=geotiff&CRS=EPSG:4326&BBOX=-9,38.5,-8.5,39&RESX=0.0027778&RESY=0.0027778&bands=1,2,3 Regards, Nuno From nunoragil at GMAIL.COM Sun Apr 17 11:40:49 2005 From: nunoragil at GMAIL.COM (Nuno Gil) Date: Sun, 17 Apr 2005 19:40:49 +0100 Subject: encoding parameters when acting as WMS client Message-ID: Dear listers, When Mapserver acts as a WMS client, the request that it sends to the cascaded WMS server has some encoded parameters (like the "layer" parameter). I am trying to get a layer named "test/test1" - yes, with the forward slash included. Mapserver translates the forward slash and the cascaded server cannot find the requested layer. Is there a way (perhaps with a script) to edit on-the-fly all the requests MapServer sends to the server being cascaded? In this way I would try to unencode the forward slash before sending the request. Regards, Nuno From gmanepal at GMAIL.COM Sun Apr 17 12:54:15 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Sun, 17 Apr 2005 15:54:15 -0400 Subject: levels in Shapefiles Message-ID: Hello All, I am currently trying few options with php/mapscript to embed in my application later on. Say that I have a shapefile for a state with the geometry being polygon. The polygons inside this shapefile each represent a city (say). I have also got the shapefiles for each of the city. Now, if I click on any part of the region inside a city on the main shapefile, how can I load the shapefile corresponding to the city on which I clicked. Is there any standard way to achieve this? Did anyone have an idea which they think is the standard way? I appreciate any help in this regard. Thanks and Regards, Giridhar p.s Currenly I am using ESRI shapefiles. Is any other geometrical data( for eg Tiger Dataset) more appropriate to do this. What is google doing for this?(Just curious) From tof2p at NETSCAPE.NET Sun Apr 17 15:47:35 2005 From: tof2p at NETSCAPE.NET (tof2p at NETSCAPE.NET) Date: Sun, 17 Apr 2005 18:47:35 -0400 Subject: OT: City boundries with Tiger dataset Message-ID: Does anyone know how to draw city boundries and names using the tiger dataset. I've converted the tiger set using ogr2ogr into a postgresql database... but I don't know how/if I can draw the city boundries and the names. Thank you -Bob __________________________________________________________________ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp From calde at GMX.NET Sun Apr 17 16:32:37 2005 From: calde at GMX.NET (Daniel Caldeweyher) Date: Sun, 17 Apr 2005 18:32:37 -0500 Subject: Threadsafety/Exceptions for Java Mapscript? Message-ID: Sean, Umberto, thank you for your prompt replies and help. For the past couple of days I've been testing using synchronized blocks and methods: mapObj mapobj = null; synchronized(mapobj) { mapobj = new mapObj(path); } ...... synchronized(map) { mapURL = mapbean.renderImage(map.draw(), "_mainmap"); } ...... public synchronized String renderImage(imageObj img, String suffix) { long rnd = Math.abs(new java.util.Random().nextLong()); String imgfile = rnd + suffix + '.' + img.getFormat().getExtension(); img.save(img.getImagepath() + imgfile, map); return img.getImageurl() + imgfile; } Using synchronized has certainly improved stability. However I haven't yet compiled Java Mascript using the latest CVS because I am developing on Windows XP and and there exists no java mapscript make file for Win32. Once we put the first version of my project up for public testing it will be on a Linux machine, I will then be able to test the latest CVS. Until then I will hope that a pre-compiled Java mapscript will be uploaded to http://hobu.stat.iastate.edu/mapserver/build_output; Thanks, Daniel On Mon, 11 Apr 2005 10:01:38 -0600, Sean Gillies wrote: >On Apr 11, 2005, at 3:49 AM, Umberto Nicoletti wrote: > >> On Mon, 2005-04-11 at 03:33 -0500, Daniel Caldeweyher wrote: >>> Hi everyone, >>> >>> first of all I would like to thank all the developers for this great >>> piece >>> of software. >>> >>> I am working on a GIS project for my University using JavaMascript on >>> Tomcat 5.5.7. My supervisor would to like to go online with my >>> solution in >>> a month or two for public testing. In the beginning 'public' means >>> open to >>> all University members, other Stakeholders and for presentations. >>> However >>> in the (near) future it is very likely that my project will be made >>> available to the general public, initially targetted at South East- >>> Queensland only, but the whole of the state and an Australian-wide >>> installation are likely to follow. That is why I gave scalablity and >>> maintainability a high priority and chose Java Servlet/JSP/struts as >>> the >>> development basis. >>> >>> When I started Umberto Nicoletti's website indicated that "A patch >>> that >>> enables exceptions in mapscript, so that mapscript errors don't crash >>> your >>> JVM (and Tomcat) anymore." will come soon. Well its two-three months >>> later >>> now and I was wondering when it will be released? It is very >>> important to >>> me as I would not be very happy if i had to port my entire site to >>> php or >>> python. >>> >> >> The patch is in mainstream mapserver, I'll update my web site asap. >> There has been some discussion on thread safety lately so make sure you >> check out the archives: search the subject for 'Java MapScript issues >> Servlet'. >> >> You could find this link interesting (or search bugzilla for threads) >> >> http://mapserver.gis.umn.edu/bugs/buglist.cgi? >> bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=RE >> OPENED&field0-0-0=product&type0-0-0=substring&value0-0 >> -0=thread&field0-0-1=component&type0-0-1=substring&value0-0 >> -1=thread&field0-0-2=short_desc&type0-0-2=substring&value0-0 >> -2=thread&field0-0-3=status_whiteboard&type0-0-3=substring&value0-0 >> -3=thread >> >> Regards, >> Umberto >> > >Daniel, Umberto, > >I just committed a change to CVS related to bug 1203 > > http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1203 > >I'd appreciate it very much if you would read the discussion there, and >if possible, update your CVS mapserver and help me test. > >cheers, >Sean > >-- >Sean Gillies >sgillies at frii dot com >http://users.frii.com/sgillies From kyle at PBX.ORG Sun Apr 17 16:41:47 2005 From: kyle at PBX.ORG (Kyle Cronan) Date: Sun, 17 Apr 2005 19:41:47 -0400 Subject: OT: City boundries with Tiger dataset In-Reply-To: <6727A0AB.4B1AE7F0.00015CC7@netscape.net> Message-ID: On Sun, 2005-04-17 at 18:47, tof2p at NETSCAPE.NET wrote: > Does anyone know how to draw city boundries and names using the tiger dataset. > I've converted the tiger set using ogr2ogr into a postgresql database... but I > don't know how/if I can draw the city boundries and the names. > > Thank you > -Bob In my opinion, the easiest way is to download the designated places data directly from ESRI's website: http://www.esri.com/data/download/census2000_tigerline/index.html They will let you download that layer a single state at a time, as a collection of shapefiles, one for each county. The TIGER/line source data has to be processed to identify these polygons. I don't believe any software that does this is freely available (anyone know otherwise?). However, the data available on ESRI's site appears to be distributed under the same terms as the TIGER/line files. Kyle Cronan From nunoragil at GMAIL.COM Sun Apr 17 18:48:39 2005 From: nunoragil at GMAIL.COM (Nuno Gil) Date: Mon, 18 Apr 2005 02:48:39 +0100 Subject: WMS client and reprojections Message-ID: Dear listers, I am trying to use a cascaded dataset available in a specific projection (lets say projection A). The server that is serving that dataset is unable of reprojecting data on -the-fly and I need that data in projection B to be server through MapServer. Is it possible for Mapserver to reproject cascaded layers? How can I do this? I have already tried to specify the original projection (A) in the map file (inside the layers definition) and requesting the data in my output coordinate system (B) but I receive an exception saying that the SRS is not supported. Regards, Nuno From BEN at SYNCERA-ITSOLUTIONS.NL Mon Apr 18 00:14:37 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Mon, 18 Apr 2005 09:14:37 +0200 Subject: WMS client and reprojections Message-ID: Nuno, this is possible, and is actually done the way you described. Make sure that for the METADATA of your LAYER you include both SRS-s (wms_srs), otherwise you get the exception you mentioned. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Nuno Gil 04/18/05 03:48am >>> Dear listers, I am trying to use a cascaded dataset available in a specific projection (lets say projection A). The server that is serving that dataset is unable of reprojecting data on -the-fly and I need that data in projection B to be server through MapServer. Is it possible for Mapserver to reproject cascaded layers? How can I do this? I have already tried to specify the original projection (A) in the map file (inside the layers definition) and requesting the data in my output coordinate system (B) but I receive an exception saying that the SRS is not supported. Regards, Nuno From arnulf.christl at CCGIS.DE Mon Apr 18 01:10:05 2005 From: arnulf.christl at CCGIS.DE (Arnulf Christl) Date: Mon, 18 Apr 2005 10:10:05 +0200 Subject: line symbol with endpoints In-Reply-To: Message-ID: Gerard B wrote: > Hi list, > > I am trying to configure my map data to follow a certain symbology, and > there are some symbol definitions that call for line symbols that I cannot > seem to duplicate. > > First, there is a symbol for a bridge, which should be a black solid line, > and each end should end with a tick. So it should look something like this: > > >>-----------------------------------------< > > > It isn't a point, but a line. So no matter how long the line is, I want the > endpoints to have a tick, and the rest of the line to be simple black solid > line. Does anyone have any advice on how I can do this?? > > I have similar symbols, such as a line with circle endpoints: > > 0---------------------------------0 > > > Any advice would be much appreciated!!!! > Thanks in advance, > > Gerard B > Hi, seems like nobody answered your question (or i missed it). Peter Freimuth wrote a doc about cartographic stuff using MapServer, this could probably help you. The original i slinked here, but its in German: http://www.mapmedia.de/dokumente/umn_signaturen_howto/index.html It was translated and should have been added to docs, but i lost track of where you can find it now. Before i repost the link to my mediocre translation maybe someone (Jeff?) could point us to the link of the final version. Best, Arnulf. -- -------------------------- Arnulf B. Christl -------------------------- Mapbender User Conference: http://wms1.ccgis.de/ewiki -------------------------- http://www.ccgis.org http://www.mapbender.org -------------------------- From BEN at SYNCERA-ITSOLUTIONS.NL Mon Apr 18 01:15:04 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Mon, 18 Apr 2005 10:15:04 +0200 Subject: line symbol with endpoints Message-ID: Arnulf, the link you are looking for is probably: http://mapserver.gis.umn.edu/doc/cartographic-symbols.html Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Arnulf Christl 04/18/05 10:10am >>> Gerard B wrote: > Hi list, > > I am trying to configure my map data to follow a certain symbology, and > there are some symbol definitions that call for line symbols that I cannot > seem to duplicate. > > First, there is a symbol for a bridge, which should be a black solid line, > and each end should end with a tick. So it should look something like this: > > >>-----------------------------------------< > > > It isn't a point, but a line. So no matter how long the line is, I want the > endpoints to have a tick, and the rest of the line to be simple black solid > line. Does anyone have any advice on how I can do this?? > > I have similar symbols, such as a line with circle endpoints: > > 0---------------------------------0 > > > Any advice would be much appreciated!!!! > Thanks in advance, > > Gerard B > Hi, seems like nobody answered your question (or i missed it). Peter Freimuth wrote a doc about cartographic stuff using MapServer, this could probably help you. The original i slinked here, but its in German: http://www.mapmedia.de/dokumente/umn_signaturen_howto/index.html It was translated and should have been added to docs, but i lost track of where you can find it now. Before i repost the link to my mediocre translation maybe someone (Jeff?) could point us to the link of the final version. Best, Arnulf. -- -------------------------- Arnulf B. Christl -------------------------- Mapbender User Conference: http://wms1.ccgis.de/ewiki -------------------------- http://www.ccgis.org http://www.mapbender.org -------------------------- From nuri at NUSVIRTUAL.COM Mon Apr 18 01:24:36 2005 From: nuri at NUSVIRTUAL.COM (Nuri) Date: Mon, 18 Apr 2005 03:24:36 -0500 Subject: Create my own shapes Message-ID: Hi, I'm trying to create my own shapes. I have several programs to view shapes and to modify them like: Shape Viewer, OpenEV,... I modify an existing shape and an existing data base and it runs perfectly, but when I try to create a new simple one it doesn't run. I don't know if my .map file isn't correct or new shape and data base aren't correct. Someone could help me? The code in my .map file is: MAP IMAGETYPE PNG EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514 I obtained Extent coordinates with shpinfo.exe SIZE 400 300 SHAPEPATH "data" IMAGECOLOR 255 255 255 PROJECTION "proj=laea" "ellps=clrk66" "lat_0=45" "lon_0=-100" # # Alternatively, you can specify an EPSG code. # "init=epsg:2163" # END # Start of LAYER DEFINITIONS -------------------------------------------- - LAYER # Prova NAME prova DATA rectangles STATUS DEFAULT TYPE POLYGON PROJECTION "init=epsg:4326" END CLASS COLOR 232 232 232 END END # Prova LAYER # Linies prova NAME linies_prova DATA rectangles STATUS DEFAULT TYPE LINE PROJECTION "init=epsg:4326" END CLASS COLOR 32 32 32 END END # Linies prova # End of LAYER DEFINITIONS ------------------------------- END # end of map file/object Thank you From nuri at NUSVIRTUAL.COM Mon Apr 18 02:36:48 2005 From: nuri at NUSVIRTUAL.COM (Nuri) Date: Mon, 18 Apr 2005 04:36:48 -0500 Subject: Calculate extent Message-ID: I'm trying to use my own shapes and nothing occurs when I use mapserver in the browser. I think that EXTENT coordinates aren't correct. I used shpinfo.exe to find them. When I create EXTENT of an existing shape that runs perfecly with the example EXTENT I don't have the same result and it doesn't run. Does someone knows another programme to calculate EXTENT? Thank you. Nuri From BEN at SYNCERA-ITSOLUTIONS.NL Mon Apr 18 02:39:12 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Mon, 18 Apr 2005 11:39:12 +0200 Subject: Calculate extent Message-ID: Ogrinfo. http://gdal.maptools.org/ogr/ogr_utilities.html ogrinfo -all myshape.shp You can download by downloading fwtools (http://fwtools.maptools.org). Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Nuri 04/18/05 11:36am >>> I'm trying to use my own shapes and nothing occurs when I use mapserver in the browser. I think that EXTENT coordinates aren't correct. I used shpinfo.exe to find them. When I create EXTENT of an existing shape that runs perfecly with the example EXTENT I don't have the same result and it doesn't run. Does someone knows another programme to calculate EXTENT? Thank you. Nuri From nuri at NUSVIRTUAL.COM Mon Apr 18 05:54:57 2005 From: nuri at NUSVIRTUAL.COM (Nuri) Date: Mon, 18 Apr 2005 07:54:57 -0500 Subject: Help with EXTENT Message-ID: How could I find EXTENT coordinates? I have an example which have next EXTENT: EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514 I use shpinfo.exe to try to obtain the same result with the same .shp file, but it returns: Xmin: -97.238976 Ymin: 41.619778 Xmax: -82.122902 Ymax: 49.385620 I try it with may .map file and they don't run when with first coordinates did. How could I find the right coordinates? Thank you. Nuri Maso From temiz at DEPREM.GOV.TR Mon Apr 18 06:32:59 2005 From: temiz at DEPREM.GOV.TR (orkun) Date: Mon, 18 Apr 2005 16:32:59 +0300 Subject: compilation error Message-ID: hello ../configure \ --with-proj \ --with-ogr \ --with-gd=/usr/local/gd-2.0.33 \ --with-gdal=/usr/local/gdal-1.2.6 \ --with-png \ --with-php=/usr/local/php-5.0.4/ it gives an error about gdal like this: checking if GDAL support requested... configure: error: '/usr/local/gdal-1.2.6/' is not an executable. Make sure you use --with-gdal=/path/to/gdal-config how can I solve this problem ? ragards ______________________________________ XamimeLT - installed on mailserver for domain @deprem.gov.tr Queries to: postmaster at deprem.gov.tr ______________________________________ The views and opinions expressed in this e-mail message are the sender's own and do not necessarily represent the views and the opinions of Earthquake Research Dept. of General Directorate of Disaster Affairs. Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup, yasal olarak T.C. B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma Dairesi'ni baglayici nitelikte degildir. From Tom.Kralidis at EC.GC.CA Mon Apr 18 06:36:40 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Mon, 18 Apr 2005 09:36:40 -0400 Subject: compilation error Message-ID: > ../configure \ > --with-proj \ > --with-ogr \ > --with-gd=/usr/local/gd-2.0.33 \ > --with-gdal=/usr/local/gdal-1.2.6 \ --with-png \ > --with-php=/usr/local/php-5.0.4/ > > it gives an error about gdal like this: > > checking if GDAL support requested... configure: error: > '/usr/local/gdal-1.2.6/' is not an executable. Make sure you > use --with-gdal=/path/to/gdal-config > > how can I solve this problem ? You have to set --with-gdal to the path of where the gdal-config is located. For example, I installed my gdal in /usr/local, hence: --with-gdal=/usr/local/bin/gdal-config ..Tom From nhv at CAPE.COM Mon Apr 18 06:45:08 2005 From: nhv at CAPE.COM (Norman Vine) Date: Mon, 18 Apr 2005 09:45:08 -0400 Subject: compilation error In-Reply-To: <1113831179.2048.16.camel@landslide.deprem.gov.tr> Message-ID: orkun writes: > > hello > > ../configure \ > --with-proj \ > --with-ogr \ > --with-gd=/usr/local/gd-2.0.33 \ > --with-gdal=/usr/local/gdal-1.2.6 \ > --with-png \ > --with-php=/usr/local/php-5.0.4/ > > it gives an error about gdal like this: > > checking if GDAL support requested... configure: error: > '/usr/local/gdal-1.2.6/' is not an executable. Make sure you use > --with-gdal=/path/to/gdal-config > > how can I solve this problem ? maybe --with-gdal=/usr/local/bin/gdal-config \ HTH Norman From nunoragil at GMAIL.COM Mon Apr 18 06:50:16 2005 From: nunoragil at GMAIL.COM (Nuno Gil) Date: Mon, 18 Apr 2005 14:50:16 +0100 Subject: ArcInfo GRID performance vs TIFF files Message-ID: Dear listers, I would like to ask if using GRID files or TIFF files as an input in MapServer is the same in what concerns performance? I have typically tiles of 5?x5? degrees with 1 arcsec resolution (approx 900 MB)... If I request a smaller part of that tile I suppose MapServer does not need to read the entire tile, am I correct? Regards, Nuno From nhv at CAPE.COM Mon Apr 18 06:59:21 2005 From: nhv at CAPE.COM (Norman Vine) Date: Mon, 18 Apr 2005 09:59:21 -0400 Subject: ArcInfo GRID performance vs TIFF files In-Reply-To: Message-ID: Nuno Gil writes: > > I would like to ask if using GRID files or TIFF files as an input in > MapServer is the same in what concerns performance? > I have typically tiles of 5?x5? degrees with 1 arcsec resolution > (approx 900 MB)... If I request a smaller part of that tile I suppose > MapServer does not need to read the entire tile, am I correct? You should find this interesting reading http://mapserver.gis.umn.edu/doc44/raster-howto.html HTH Norman From lluisgm at GMAIL.COM Mon Apr 18 07:04:09 2005 From: lluisgm at GMAIL.COM (=?ISO-8859-1?Q?Llu=EDs_Garcia_i_Mestres?=) Date: Mon, 18 Apr 2005 16:04:09 +0200 Subject: Image resolution Message-ID: Hi I'm working with a tif file of 0,5 meter per pixel. I don't know why, when I check this tif out of mapserver the quality is greater than when I display it in my mapserver application. I?ve try with different resolution in the map file but the quality is still the same. Thanks Llu?s From temiz at DEPREM.GOV.TR Mon Apr 18 07:06:20 2005 From: temiz at DEPREM.GOV.TR (orkun) Date: Mon, 18 Apr 2005 17:06:20 +0300 Subject: a problem in make Message-ID: hello in make: /usr/local/gdal-1.2.6/libgdal.la: file not recognized: File format not recognized collect2: ld returned 1 exit status make: *** [shp2img] Error 1 what can I do to solve this problem regards Ahmet Temiz ______________________________________ XamimeLT - installed on mailserver for domain @deprem.gov.tr Queries to: postmaster at deprem.gov.tr ______________________________________ The views and opinions expressed in this e-mail message are the sender's own and do not necessarily represent the views and the opinions of Earthquake Research Dept. of General Directorate of Disaster Affairs. Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup, yasal olarak T.C. B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma Dairesi'ni baglayici nitelikte degildir. From fwarmerdam at GMAIL.COM Mon Apr 18 07:11:50 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Mon, 18 Apr 2005 10:11:50 -0400 Subject: a problem in make In-Reply-To: <1113833180.2048.22.camel@landslide.deprem.gov.tr> Message-ID: On 4/18/05, orkun wrote: > hello > > in make: > > /usr/local/gdal-1.2.6/libgdal.la: file not recognized: File format not > recognized > collect2: ld returned 1 exit status > make: *** [shp2img] Error 1 > > what can I do to solve this problem Ahmet, It would appear the libtool library is being picked up for some reason. I would be interested to see what your "gdal-config --libs" returns. In the meantime, you can likely hand edit your Makefile for MapServer and change the GDAL_LIB= line to read: GDAL_LIB=-L/usr/local/lib -lgdal Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From fwarmerdam at GMAIL.COM Mon Apr 18 07:19:25 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Mon, 18 Apr 2005 10:19:25 -0400 Subject: ArcInfo GRID performance vs TIFF files In-Reply-To: Message-ID: On 4/18/05, Nuno Gil wrote: > Dear listers, > I would like to ask if using GRID files or TIFF files as an input in > MapServer is the same in what concerns performance? > I have typically tiles of 5?x5? degrees with 1 arcsec resolution > (approx 900 MB)... If I request a smaller part of that tile I suppose > MapServer does not need to read the entire tile, am I correct? Nuno, The Arc/Info binary grid form is internally tiled in 256x4 bricks, so access from MapServer (via GDAL) to binary grids will generally not have to read much extra data. This does not apply to ascii grids which are of course dead slow to use at any reasonable size. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From dldeskins at GMAIL.COM Mon Apr 18 07:20:23 2005 From: dldeskins at GMAIL.COM (Don Deskins) Date: Mon, 18 Apr 2005 10:20:23 -0400 Subject: shp2tile question In-Reply-To: <425AE595.10908@swoodbridge.com> Message-ID: Steve, Thank you for your reply. I have experimented with different numbers and after reading a bit more, I have discovered that it make no difference (in my case) how I divide it up. As a matter of fact, my application performs SLOWER the more files that I have. What I am trying to do is to display an area with parcels of land. I have two identical layers... one to display all of the parcels and the other to only display the selected parcel. It is extremely slow when querying for by parcel id. Because of this, I need to put the second layer (at least) in a database so that the parcelid field can be indexed. Thanks, Don On 4/11/05, Stephen Woodbridge wrote: > Don, > > Like I said there is no magic number. If you are most showing all your > parcels most of the time then there is not value in having it tiled. One > of the MOST important performance issues is to make sure all your *.shp > files have a *.qix file. > > Try a different set of tiling parameters and test it again. > > Did you have *.qix on you original shapefile? If not go back to that and > add one (shptree file.shp) and see how it performs untiled. > > -Steve > > Don Deskins wrote: > > Bart and Steve, > > > > My shapefiles are showing up now... thanks! > > > > Now I have a time problem... It seems to take more time to generate > > the image than it did before. I am checking for errors now. > > > > Thanks again. > > > > Don > > > > > > On Apr 11, 2005 3:28 PM, Bart van den Eijnden wrote: > > > >>Hi Don, > >> > >>check the dbf of your generated tileindex (the LOCATION field). I usually > >>use absolute paths in there. Are there absolute or relative paths to the > >>files in there? > >> > >>Also use TYPE POLYGON. Are you zoomed in enough to have your layer showing > >>up, since you are using a MAXSCALE setting? > >> > >>Best regards, > >>Bart > >> > >>On Mon, 11 Apr 2005 15:24:45 -0400, Don Deskins > >>wrote: > >> > >> > >>>Bart (and Steve), > >>> > >>>Thanks. > >>> > >>>I have my files created and tried to reference this index in my map file: > >>> > >>> #################################### > >>> # parcels > >>> LAYER > >>> NAME 'tileindex' > >>> TYPE TILEINDEX > >>> DATA '/path/to/tileindex' > >>> MAXSCALE 40000 > >>> END > >>> > >>> LAYER > >>> NAME 'SCAP_Cert2004_ParcelsUTM16M' > >>> STATUS ON > >>> TYPE POLYGON > >>> TILEINDEX '/path/to/tileindex' > >>> #TILEITEM 'LOCATION' > >>> MAXSCALE 40000 > >>> END > >>> #################################### > >>> > >>>I get no error but my shapes are not showing up... do you see a > >>>problem with the above map? > >>> > >>>Don > >>> > >>>On Apr 11, 2005 2:58 PM, Bart van den Eijnden wrote: > >>> > >>>>Hi, > >>>> > >>>>It is tile4ms, not tile2ms, probably a typo by Steve. > >>>> > >>>>It is a Mapserver utility to make a tileindex. Alternatively, you can > >>>>also > >>>>use ogrtindex for vector layers and gdaltindex for raster layers. > >>>> > >>>>Best regards, > >>>>Bart > >>>> > >>> > >>-- > >>Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > >> > > > > > > > > -- > > Don Deskins > > > > -- Don Deskins From logicalgenetics at GMAIL.COM Mon Apr 18 07:35:35 2005 From: logicalgenetics at GMAIL.COM (Dan Taylor) Date: Mon, 18 Apr 2005 15:35:35 +0100 Subject: Symbols within an area Message-ID: Hi, I want to show an area of woodland on my map. Instead of filling the areas, however, I'd like to fill it with small tree symbols. These need to be spread round the area in a random-looking way. The style I'm looking to create is similar to that used by UK OS maps. Does anyone know how I can do this? I asked this question a week ago and it was ignored. I guess it's not possible? A reply telling me it can't be done would be just as helpful as the solution right now! Dan -- Dan Taylor Software Development Engineer, JTL Systems Ltd PhD Student, Reading University, UK http://www.logicalgenetics.com From dldeskins at GMAIL.COM Mon Apr 18 07:42:39 2005 From: dldeskins at GMAIL.COM (Don Deskins) Date: Mon, 18 Apr 2005 10:42:39 -0400 Subject: MyGIS, Mapfile, and MapScript Message-ID: Hey all, I have questions about MyGIS and mapfile. I have an area that I would like to display parcels of land and search for a parcel by parcelid. I use two layers for the parcels: one layer to display all of the parcels at a certain level and the second to highlight the selected parcel. I have gotten my application to work using shp/dbf/shx/qix files, but it is extremely slow when searching for a parcelid (e.g., 25 seconds). The major time delay is searching for a particular parcel id. Using shp2mysql.pl, we have gotten the data into the mysql db. I indexed on the parcel id. I am having trouble now filtering for the parcelid. After getting several errors, I decided to see if I could display the first layer using the db. It showed up nicely, but I am still getting errors on my queried layer. Here is what I have in the mapfile: #layer to display all of the parcels LAYER NAME "Parcels" STATUS ON TYPE POLYGON CONNECTIONTYPE mygis CONNECTION "host:dbname:user:pass:bin:" DATA "geo from Parcels feature, Parcels_bin geometry" CLASS OUTLINECOLOR 0 255 0 TEMPLATE "template.html" END MAXSCALE 40000 TOLERANCE 0 TOLERANCEUNITS PIXELS END # layer to display selected parcel LAYER NAME "Parcels2" STATUS OFF TYPE POLYGON CONNECTIONTYPE mygis CONNECTION "host:dbname:user:pass:bin::" DATA "geo,PARCELID from Parcels2 feature, Parcels2_bin geometry" FILTER "feature.PARCELID='C0244R F00005'" CLASS Name "MAP" OUTLINECOLOR 0 255 0 TEMPLATE "template.html" END MAXSCALE 40000 TOLERANCE 0 TOLERANCEUNITS PIXELS END Here is the code that I use to query for the parcel id: getLayerByName("Parcels2"); if($my_layer->queryByAttributes('PARCELID', $_REQUEST['parcelid'], MS_SINGLE)==MS_SUCCESS) { $my_layer->open(); $my_layer->set("status",MS_ON); for($k=0; $k < $my_layer->getNumResults(); $k++) { $my_resultcache=$my_layer->getResult($k); $my_shape=$my_layer->getShape($my_resultcache->tileindex, $my_resultcache->shapeindex); $my_array=$my_shape->values; $map->setextent($my_shape->bounds->minx-100, $my_shape->bounds->miny-100, $my_shape->bounds->maxx+100, $my_shape->bounds->maxy+100); //print_r($my_array); } $my_layer->close(); } } else { print "Parcel ID " . $_REQUEST['parcelid'] . " not found.
"; $_REQUEST['parcelid'] = ""; } break; ?> I get the following warnings and therefore errors: Warning: [MapServer Error]: msMYGISLayerGetShapeRandom(): GetShape called on MYGIS layer with invalid DB query results. in on line 153 Warning: [MapServer Error]: SELECT feature.id, feature.vertices, geometry.WKB_GEOMETRY , fea mysql query failed : mysql query failed in on line 153 Line 153 is this line: if($my_layer->queryByAttributes('PARCELID', $_REQUEST['parcelid'], MS_SINGLE)==MS_SUCCESS) This script works using the shp files. Thanks, Don From woodbri at SWOODBRIDGE.COM Mon Apr 18 08:09:34 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Mon, 18 Apr 2005 11:09:34 -0400 Subject: Symbols within an area In-Reply-To: <830dd3740504180735c06294b@mail.gmail.com> Message-ID: Dan, You can fill an area with symbols instead of solid fill, but the symbols are tiled to fill the area. It is not currently possible to get a random looking fill, but you might try something like creating two symbols the are rather large like: +-----------+ + * + + *** + crude tree randomly positioned in the symbol + # + + + + + +-----------+ And another, but don't make it with the same height and width and make it with different tree shape in different random position. Make the background of symbols transparent. Then fill your polygon area with both symbols. The pattern will be regular but the different sizes with cause an interference pattern so it will be harder to detect that it is regular. Play with the symbol sizes until you get a result you like. You will even get the two images overlapping in some cases. I haven't tried this, but it seems like it might work and I think it would look pretty good. I would be very interested to see the results. -Steve W. Dan Taylor wrote: > Hi, > > I want to show an area of woodland on my map. Instead of filling the > areas, however, I'd like to fill it with small tree symbols. These > need to be spread round the area in a random-looking way. The style > I'm looking to create is similar to that used by UK OS maps. > > Does anyone know how I can do this? > > I asked this question a week ago and it was ignored. I guess it's not > possible? A reply telling me it can't be done would be just as > helpful as the solution right now! > > Dan > From jms4 at PO.CWRU.EDU Mon Apr 18 08:17:50 2005 From: jms4 at PO.CWRU.EDU (James Sohr) Date: Mon, 18 Apr 2005 10:17:50 -0500 Subject: Symbols within an area Message-ID: Well, as far as I know it's not possible directly within MapServer. You have three options: 1) Generate a large raster image with randomly placed trees, and use this as your symbol. This is what MSN Maps use, and it's rather easy to implement in MapServer. Here's a sample using MapServer: http://img95.echo.cx/img95/4484/a14mm.gif 2) Use MapScript to randomly select a bunch of points. Then, check each point to see if it is withing a woodlands shape. If so, use MapScript to draw your tree symbol there. 3) Similar to the solution above, but doesn't need MapScript. Choose a bunch of random points , and draw your tree symbols there using a new layer. These points can even be the same from map to map, so you can hardcode these values into a new shapefile or right into your map file. Finally, overlay this with a layer that only fills in color where your woodlands AREN'T-- in other words, you'll need a shapefile that can identify areas that are not woodlands. From jms4 at PO.CWRU.EDU Mon Apr 18 08:41:01 2005 From: jms4 at PO.CWRU.EDU (James Sohr) Date: Mon, 18 Apr 2005 10:41:01 -0500 Subject: Symbols in mapserver Message-ID: Yes, your symbols can be a pre-made GIF image if you so desire. Just add a symbol defintion to your mapfile or your symbols file like so: SYMBOL Name 'park' Type PIXMAP Image 'symbols/images/park.gif' END You can even specify a color in the image to be transparent by using the TRANSPARENT option along with the index number of the color to be made transparent: SYMBOL Name 'park' Type PIXMAP Image 'symbols/images/park.gif' Transparent 7 END HTH, James On Fri, 15 Apr 2005 12:25:43 -0400, Geoff Rowland wrote: >Hi, > >Can someone explain to me how symbols work in MapServer? I am looking at the code here that I see on the Wiki. What is 'phone' in the code below? can this just be a .gif image? I saw some code on creating symbols (in this case, a star) but I would like to use premade images if possible. > >LAYER > NAME "INLINE" > TYPE POINT > STATUS ON > CLASS > NAME "0" > STYLE > COLOR 255 0 0 # red > MAXSIZE 300 # default 50 > SYMBOL 'phone' #In my case was a nice phone image symbol > SIZE 16 > END #style > END #class > END #layer > > > >Thanks, >Geoff > >-- >Geoffrey Rowland >Technical Officer >Climate Information Project >NOAA Research >Office of Global Programs >http://www.cip.ogp.noaa.gov >Contractor, >RGII Technologies, Inc., a Computer Horizons Company >http://www.rg2.com >Phone: 301-427-2344 >Fax : 301-427-2082 >geoffrey.rowland at noaa.gov From gireddy at GMAIL.COM Mon Apr 18 08:51:31 2005 From: gireddy at GMAIL.COM (Shashi Gireddy) Date: Mon, 18 Apr 2005 10:51:31 -0500 Subject: dymanic extent in php-mapscript (returning -1,-1,-1,-1) Message-ID: Hi all, I have a problem with dymaic extent from php-mapscript, its not accepting the change of extent from my php code, here is the code snippet. list( $cnty, $cntyname, $minx, $miny, $maxx, $maxy)= split ('[/_]',$cnty1); $ext = ms_newRectObj(); $ext->{minx} = -86.91;//$minx; $ext->{miny} = 32.28;//$miny; $ext->{maxx} = -86.38;//$maxx; $ext->{maxy} = 32.84;//$maxy; $map->{extent} = $ext; echo $minx; echo " "; echo $miny; echo " "; echo $maxx; echo " "; echo $maxy; here is the generated map file.. MAP EXTENT -1 -1 -1 -1 IMAGECOLOR 255 255 255 IMAGETYPE gif SYMBOLSET "c:/maps/symbols/symbols35.sym" SHAPEPATH "c:/maps/alabama_maps/tracts/" SIZE 500 500 STATUS ON UNITS MILES NAME "FIRSTMAP" ... can anybody help me please.. thank you, shashi. -- Shashi Kiran Reddy. Gireddy, Graduate Assistant, CBER, University of Alabama. http://www.cs.ua.edu/shashi Home: 205-752-5137 Cell: 205-657-1438 From panchuri at MSA-OXFORD.ARS.USDA.GOV Mon Apr 18 09:17:04 2005 From: panchuri at MSA-OXFORD.ARS.USDA.GOV (PRATAP ANCHURI) Date: Mon, 18 Apr 2005 11:17:04 -0500 Subject: Java Mapscript makefile for windows Message-ID: do any one has windows Makefile for generating java mapscript.dll regards, pratap From sgillies at FRII.COM Mon Apr 18 09:34:46 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Mon, 18 Apr 2005 10:34:46 -0600 Subject: Threadsafety/Exceptions for Java Mapscript? In-Reply-To: Message-ID: BTW, Last week I surveyed of MapServer's thread safety issues and published the results at http://zcologia.com/news/24 There may be issues that I did not find, but these are the majors. cheers, Sean On Apr 17, 2005, at 5:32 PM, Daniel Caldeweyher wrote: > Sean, Umberto, > > thank you for your prompt replies and help. > > For the past couple of days I've been testing using synchronized > blocks and > methods: > > mapObj mapobj = null; > synchronized(mapobj) { > mapobj = new mapObj(path); > } > ...... > synchronized(map) { > mapURL = mapbean.renderImage(map.draw(), "_mainmap"); > } > ...... > public synchronized String renderImage(imageObj img, String suffix) { > long rnd = Math.abs(new java.util.Random().nextLong()); > String imgfile = rnd + suffix + '.' + img.getFormat().getExtension(); > img.save(img.getImagepath() + imgfile, map); > return img.getImageurl() + imgfile; > } > > Using synchronized has certainly improved stability. However I haven't > yet > compiled Java Mascript using the latest CVS because I am developing on > Windows XP and and there exists no java mapscript make file for Win32. > > Once we put the first version of my project up for public testing it > will > be on a Linux machine, I will then be able to test the latest CVS. > > Until then I will hope that a pre-compiled Java mapscript will be > uploaded > to http://hobu.stat.iastate.edu/mapserver/build_output; > > Thanks, > > Daniel > > > On Mon, 11 Apr 2005 10:01:38 -0600, Sean Gillies > wrote: > >> On Apr 11, 2005, at 3:49 AM, Umberto Nicoletti wrote: >> >>> On Mon, 2005-04-11 at 03:33 -0500, Daniel Caldeweyher wrote: >>>> Hi everyone, >>>> >>>> first of all I would like to thank all the developers for this great >>>> piece >>>> of software. >>>> >>>> I am working on a GIS project for my University using JavaMascript >>>> on >>>> Tomcat 5.5.7. My supervisor would to like to go online with my >>>> solution in >>>> a month or two for public testing. In the beginning 'public' means >>>> open to >>>> all University members, other Stakeholders and for presentations. >>>> However >>>> in the (near) future it is very likely that my project will be made >>>> available to the general public, initially targetted at South East- >>>> Queensland only, but the whole of the state and an Australian-wide >>>> installation are likely to follow. That is why I gave scalablity and >>>> maintainability a high priority and chose Java Servlet/JSP/struts as >>>> the >>>> development basis. >>>> >>>> When I started Umberto Nicoletti's website indicated that "A patch >>>> that >>>> enables exceptions in mapscript, so that mapscript errors don't >>>> crash >>>> your >>>> JVM (and Tomcat) anymore." will come soon. Well its two-three months >>>> later >>>> now and I was wondering when it will be released? It is very >>>> important to >>>> me as I would not be very happy if i had to port my entire site to >>>> php or >>>> python. >>>> >>> >>> The patch is in mainstream mapserver, I'll update my web site asap. >>> There has been some discussion on thread safety lately so make sure >>> you >>> check out the archives: search the subject for 'Java MapScript issues >>> Servlet'. >>> >>> You could find this link interesting (or search bugzilla for threads) >>> >>> http://mapserver.gis.umn.edu/bugs/buglist.cgi? >>> bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status= >>> RE >>> OPENED&field0-0-0=product&type0-0-0=substring&value0-0 >>> -0=thread&field0-0-1=component&type0-0-1=substring&value0-0 >>> -1=thread&field0-0-2=short_desc&type0-0-2=substring&value0-0 >>> -2=thread&field0-0-3=status_whiteboard&type0-0-3=substring&value0-0 >>> -3=thread >>> >>> Regards, >>> Umberto >>> >> >> Daniel, Umberto, >> >> I just committed a change to CVS related to bug 1203 >> >> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1203 >> >> I'd appreciate it very much if you would read the discussion there, >> and >> if possible, update your CVS mapserver and help me test. >> >> cheers, >> Sean >> >> -- >> Sean Gillies >> sgillies at frii dot com >> http://users.frii.com/sgillies > From jms4 at PO.CWRU.EDU Mon Apr 18 09:40:49 2005 From: jms4 at PO.CWRU.EDU (James Sohr) Date: Mon, 18 Apr 2005 11:40:49 -0500 Subject: dymanic extent in php-mapscript (returning -1,-1,-1,-1) Message-ID: You cannot change the extent by simply assigning a new rectangle object to map->extent. In fact, you can't even change it by directly changing the map->extent values. Instead, use the setextent method: $map->setextent($ext->minx, $ext->miny, $ext->maxx, $ext->maxy); HTH, James From dldeskins at GMAIL.COM Mon Apr 18 09:50:37 2005 From: dldeskins at GMAIL.COM (Don Deskins) Date: Mon, 18 Apr 2005 11:50:37 -0500 Subject: MyGIS, Mapfile, and MapScript Message-ID: It must be monday! the errors are as follows: Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named 'Parcels'. in on line 274 Warning: [MapServer Error]: msMYGISLayerGetShapeRandom(): GetShape called on MYGIS layer with invalid DB query results. in on line 274 Warning: [MapServer Error]: SELECT feature.id, feature.vertices, geometry.WKB_GEOMETRY from mysql query failed : mysql query failed in on line 274 Fatal error: Call to a member function on a non-object in on line 276 Can anyone suggest what the problem may be? Thanks, From perrygeo at GMAIL.COM Mon Apr 18 10:24:24 2005 From: perrygeo at GMAIL.COM (Matthew Perry) Date: Mon, 18 Apr 2005 10:24:24 -0700 Subject: Symbols within an area In-Reply-To: Message-ID: James, {slightly off-topic} In the example gif, How did you generate the labels to curve with the road? I wasn't aware of any mapfile configuration that would allow you to spline text labels like this. Did you accomplish this with mapserver proper or a custom mapscript solution? Thanks, -- Matt Perry Humboldt State University perrygeo at gmail.com On 4/18/05, James Sohr wrote: > Well, as far as I know it's not possible directly within MapServer. > > You have three options: > > 1) Generate a large raster image with randomly placed trees, and use this > as your symbol. This is what MSN Maps use, and it's rather easy to > implement in MapServer. Here's a sample using MapServer: > > http://img95.echo.cx/img95/4484/a14mm.gif > > 2) Use MapScript to randomly select a bunch of points. Then, check each > point to see if it is withing a woodlands shape. If so, use MapScript to > draw your tree symbol there. > > 3) Similar to the solution above, but doesn't need MapScript. Choose a > bunch of random points , and draw your tree symbols there using a new > layer. These points can even be the same from map to map, so you can > hardcode these values into a new shapefile or right into your map file. > Finally, overlay this with a layer that only fills in color where your > woodlands AREN'T-- in other words, you'll need a shapefile that can > identify areas that are not woodlands. > From sc at BYTRON.COM Mon Apr 18 11:23:22 2005 From: sc at BYTRON.COM (sc) Date: Mon, 18 Apr 2005 19:23:22 +0100 Subject: Oracle Spatial Error ORA-13373 using geodetic data Message-ID: Hi all, I am trying to get the oracle spatial connectivity working but I am getting the following oracle errors: SELECT rownum, SHAPE FROM SPATIAL_NAV_ARPT A WHERE SDO_FILTER( SHAPE, MDSYS.SDO_GEOMETRY(2003, 8307, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-11.96563,49.89 8,3.25433,60.7694) ),'querytype=window') = 'TRUE' ERROR at line 1: ORA-29902: error in executing ODCIIndexStart() routine ORA-13373: Element of type Extent is not supported for Geodetic data ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 368 ORA-06512: at line 1 This is an extract of my map file: LAYER NAME "Spatial Nav" TYPE POLYGON STATUS ON CONNECTIONTYPE oraclespatial CONNECTION "user/password at mydb.world" DATA "SHAPE FROM SPATIAL_NAV USING SRID 8307" CLASS NAME "Spatial" OUTLINECOLOR 60 60 06 COLOR 0 0 255 SYMBOL 'circle' END END I have noticed that other users have experienced the same problem but I haven't seen any solutions, I have also seen reference to a change of the source code? Could this be correct? Code follows: maporaclespatial.c has the extent type hardcoded to a rectangle, so = there is no work around, without changing the source code. Try changing maporaclespatial.c from: if (apply_window) sprintf( query_str + strlen(query_str), "SDO_FILTER( %s.%s, MDSYS.SDO_GEOMETRY(" "2003, %s, NULL," "MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3)," "MDSYS.SDO_ORDINATE_ARRAY(%.9g,%.9g,%.9g,%.9g) )," "'querytype=3Dwindow') =3D 'TRUE'", table_name, geom_column_name, srid, rect.minx, rect.miny, rect.maxx, rect.maxy ); to: if (apply_window) sprintf( query_str + strlen(query_str), "SDO_FILTER( %s.%s, MDSYS.SDO_GEOMETRY(" "2003, %s, NULL," "MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1)," = "MDSYS.SDO_ORDINATE_ARRAY(%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.= 9g) )," "'querytype=3Dwindow') =3D 'TRUE'", table_name, geom_column_name, srid, rect.minx, rect.miny, rect.minx, rect.maxy, rect.maxx, = rect.maxy, rect.maxx, rect.miny,rect.minx, rect.miny ); regards Simon -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.16 - Release Date: 18/04/2005 From sc at BYTRON.COM Mon Apr 18 11:43:18 2005 From: sc at BYTRON.COM (sc) Date: Mon, 18 Apr 2005 19:43:18 +0100 Subject: Oracle Spatial Error ORA-13373 using geodetic data In-Reply-To: Message-ID: Hi all, I have some more information on this problem, if I rewrite the SELECT statement produced by mapserver to use the sdo_cs.viewport_transform() function as shown below then the SELECT works ok, is this a problem with mapserver or am I doing something wrong? I also noted that the sdo_ordinate array is being populated with values that are slighty different to my MAP files EXTENTS, is this an error or am I misunderstanding something? (EXTENTS -10.458000 49.898000 1.746700 60.769400) SELECT rownum, icao, SHAPE FROM SPATIAL_NAV WHERE SDO_FILTER( SHAPE, sdo_cs.viewport_transform( MDSYS.SDO_GEOMETRY(2003, 0, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3), MDSYS.SDO_ORDINATE_ARRAY(-11.96563,49.898,3.25433,60.7694)), 8307),'querytype=window') = 'TRUE' ; regards Simon -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of sc Sent: 18 April 2005 18:23 To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] Oracle Spatial Error ORA-13373 using geodetic data Hi all, I am trying to get the oracle spatial connectivity working but I am getting the following oracle errors: SELECT rownum, SHAPE FROM SPATIAL_NAV A WHERE SDO_FILTER( SHAPE, MDSYS.SDO_GEOMETRY(2003, 8307, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-11.96563,49.89 8,3.25433,60.7694) ),'querytype=window') = 'TRUE' ERROR at line 1: ORA-29902: error in executing ODCIIndexStart() routine ORA-13373: Element of type Extent is not supported for Geodetic data ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 368 ORA-06512: at line 1 This is an extract of my map file: LAYER NAME "Spatial Nav" TYPE POLYGON STATUS ON CONNECTIONTYPE oraclespatial CONNECTION "user/password at mydb.world" DATA "SHAPE FROM SPATIAL_NAV USING SRID 8307" CLASS NAME "Spatial" OUTLINECOLOR 60 60 06 COLOR 0 0 255 SYMBOL 'circle' END END I have noticed that other users have experienced the same problem but I haven't seen any solutions, I have also seen reference to a change of the source code? Could this be correct? Code follows: maporaclespatial.c has the extent type hardcoded to a rectangle, so = there is no work around, without changing the source code. Try changing maporaclespatial.c from: if (apply_window) sprintf( query_str + strlen(query_str), "SDO_FILTER( %s.%s, MDSYS.SDO_GEOMETRY(" "2003, %s, NULL," "MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3)," "MDSYS.SDO_ORDINATE_ARRAY(%.9g,%.9g,%.9g,%.9g) )," "'querytype=3Dwindow') =3D 'TRUE'", table_name, geom_column_name, srid, rect.minx, rect.miny, rect.maxx, rect.maxy ); to: if (apply_window) sprintf( query_str + strlen(query_str), "SDO_FILTER( %s.%s, MDSYS.SDO_GEOMETRY(" "2003, %s, NULL," "MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1)," = "MDSYS.SDO_ORDINATE_ARRAY(%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.= 9g) )," "'querytype=3Dwindow') =3D 'TRUE'", table_name, geom_column_name, srid, rect.minx, rect.miny, rect.minx, rect.maxy, rect.maxx, = rect.maxy, rect.maxx, rect.miny,rect.minx, rect.miny ); regards Simon -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.16 - Release Date: 18/04/2005 -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.16 - Release Date: 18/04/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.16 - Release Date: 18/04/2005 From fsimon at UNIVALI.BR Mon Apr 18 11:49:08 2005 From: fsimon at UNIVALI.BR (Fernando Simon) Date: Mon, 18 Apr 2005 15:49:08 -0300 Subject: Oracle Spatial Error ORA-13373 using geodetic data In-Reply-To: Message-ID: Hi, Thanks for your reply, I know this problem and I already fixed this problem in cvs version (4.5 dev). I used another solution because in 10g version you don`t need to use functions to transoform geodetic data, you can see the solution in http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1211 In my tests the cvs version for maporaclespatial.c worked with 4.4.x version without problems, you can try it and test the results. Thanks. ------------------------------------------------------------------------ Fernando Simon Mapserver and Oracle Spatial developer G10 - Laboratorio de Computacao Aplicada - Brazil http://g10.cttmar.univali.br - UNIVALI/CTTMAR ------------------------------------------------------------------------ sc wrote: >Hi all, > >I am trying to get the oracle spatial connectivity working but I am getting >the following oracle errors: > >SELECT rownum, SHAPE FROM SPATIAL_NAV_ARPT A WHERE SDO_FILTER( SHAPE, >MDSYS.SDO_GEOMETRY(2003, 8307, NULL, >MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-11.96563,49.89 >8,3.25433,60.7694) ),'querytype=window') = 'TRUE' > >ERROR at line 1: >ORA-29902: error in executing ODCIIndexStart() routine >ORA-13373: Element of type Extent is not supported for Geodetic data >ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 368 >ORA-06512: at line 1 > >This is an extract of my map file: > > LAYER > NAME "Spatial Nav" > TYPE POLYGON > STATUS ON > CONNECTIONTYPE oraclespatial > CONNECTION "user/password at mydb.world" > DATA "SHAPE FROM SPATIAL_NAV USING SRID 8307" > > CLASS > NAME "Spatial" > OUTLINECOLOR 60 60 06 > COLOR 0 0 255 > SYMBOL 'circle' > END > END > >I have noticed that other users have experienced the same problem but I >haven't seen any solutions, I have also seen >reference to a change of the source code? Could this be correct? Code >follows: > >maporaclespatial.c has the extent type hardcoded to a rectangle, so = >there is no work around, without changing the source code. > > >Try changing maporaclespatial.c from: > > if (apply_window) > sprintf( query_str + strlen(query_str), > "SDO_FILTER( %s.%s, MDSYS.SDO_GEOMETRY(" > "2003, %s, NULL," > "MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3)," > "MDSYS.SDO_ORDINATE_ARRAY(%.9g,%.9g,%.9g,%.9g) )," > "'querytype=3Dwindow') =3D 'TRUE'", > table_name, geom_column_name, srid, > rect.minx, rect.miny, rect.maxx, rect.maxy ); > >to: > > if (apply_window) > sprintf( query_str + strlen(query_str), > "SDO_FILTER( %s.%s, MDSYS.SDO_GEOMETRY(" > "2003, %s, NULL," > "MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1)," > = >"MDSYS.SDO_ORDINATE_ARRAY(%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.= >9g) )," > "'querytype=3Dwindow') =3D 'TRUE'", > table_name, geom_column_name, srid, > rect.minx, rect.miny, rect.minx, rect.maxy, rect.maxx, = >rect.maxy, rect.maxx, rect.miny,rect.minx, rect.miny ); > >regards > >Simon > >-- >No virus found in this outgoing message. >Checked by AVG Anti-Virus. >Version: 7.0.308 / Virus Database: 266.9.16 - Release Date: 18/04/2005 > > > From fsimon at UNIVALI.BR Mon Apr 18 11:53:40 2005 From: fsimon at UNIVALI.BR (Fernando Simon) Date: Mon, 18 Apr 2005 15:53:40 -0300 Subject: Oracle Spatial Error ORA-13373 using geodetic data In-Reply-To: Message-ID: Hi again, This way is the correct way to permorf the query's with geodetic data. I used this way to solve the problem in maporaclespatial.c. But for the 10G version you don't need to use this function because the Spatial do the conversion on the fly, without user interaction. Thanks for your reply. ------------------------------------------------------------------------ Fernando Simon Mapserver and Oracle Spatial developer G10 - Laboratorio de Computacao Aplicada - Brazil http://g10.cttmar.univali.br - UNIVALI/CTTMAR ------------------------------------------------------------------------ sc wrote: >Hi all, > >I have some more information on this problem, if I rewrite the SELECT >statement produced by mapserver to use the sdo_cs.viewport_transform() >function as shown below then the SELECT works ok, is this a problem with >mapserver >or am I doing something wrong? > >I also noted that the sdo_ordinate array is being populated with values that >are slighty different to my MAP files EXTENTS, >is this an error or am I misunderstanding something? > >(EXTENTS -10.458000 49.898000 1.746700 60.769400) > >SELECT rownum, icao, SHAPE >FROM SPATIAL_NAV >WHERE SDO_FILTER( >SHAPE, >sdo_cs.viewport_transform( >MDSYS.SDO_GEOMETRY(2003, 0, NULL, >MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3), >MDSYS.SDO_ORDINATE_ARRAY(-11.96563,49.898,3.25433,60.7694)), >8307),'querytype=window') = 'TRUE' ; > >regards > >Simon > > From jms4 at PO.CWRU.EDU Mon Apr 18 14:58:18 2005 From: jms4 at PO.CWRU.EDU (James Sohr) Date: Mon, 18 Apr 2005 16:58:18 -0500 Subject: Symbols within an area Message-ID: Matt, This is actually the result of a very-beta-level MapScript function I wrote that draws path-following text labels for a given layer. I say it's very beta since it doesn't do any sort of collision detection, and in some cases can produce upside down or backwards labels. I am working on those issues, as well as adding auto line-wrapping and auto- placement features sometime in the future. Still, if anyone is interesting in playing with the present version, I can share the function and/or the madness behind it. Thanks, James On Mon, 18 Apr 2005 10:24:24 -0700, Matthew Perry wrote: >James, > > {slightly off-topic} In the example gif, How did you generate the >labels to curve with the road? I wasn't aware of any mapfile >configuration that would allow you to spline text labels like this. Did you >accomplish this with mapserver proper or a custom mapscript solution? > >Thanks, >-- >Matt Perry >Humboldt State University >perrygeo at gmail.com From kgeurts at GIS.UMN.EDU Mon Apr 18 15:35:53 2005 From: kgeurts at GIS.UMN.EDU (Kari Geurts) Date: Mon, 18 Apr 2005 17:35:53 -0500 Subject: Open Source Geospatial workshops In-Reply-To: Message-ID: Hello MapServer Users, If you are trying to register online for the Open Source Geospatial workshops and the name of the workshop does NOT appear in the drop down list it means the workshop is FULL. This is how the RegOnline software works and I am not able to change it. As of 4/19 the following workshops are full... Post GIS, GRASS GIS, MapServer, OGC Protocols, and Python GIS Hacks. Thanks, Kari -- Kari A. Geurts GIS and Remote Sensing Laboratory Department of Forest Resources University of Minnesota 1530 Cleveland Ave N. St. Paul, MN. 55108 Phone: 612-624-3459 Fax: 612-625-5212 From jacob.delfos at MAUNSELL.COM Mon Apr 18 16:59:10 2005 From: jacob.delfos at MAUNSELL.COM (Jacob Delfos) Date: Tue, 19 Apr 2005 07:59:10 +0800 Subject: Image resolution Message-ID: Is your map-image being displayed at its normal resolution, or did you specify a size for the image ( From info2005 at RAJSINGH.ORG Mon Apr 18 20:59:40 2005 From: info2005 at RAJSINGH.ORG (Raj) Date: Mon, 18 Apr 2005 23:59:40 -0400 Subject: encoding parameters when acting as WMS client In-Reply-To: Message-ID: It sounds like Mapserver is doing the right thing, URL encoding "test/test1". The receiving server should always URL-decode URL parameters--that's the "law" of Web services. --Raj From chatterjee_sharmistha2 at REDIFFMAIL.COM Mon Apr 18 22:39:06 2005 From: chatterjee_sharmistha2 at REDIFFMAIL.COM (Sharmistha Chatterjee) Date: Tue, 19 Apr 2005 05:39:06 -0000 Subject: Query using Php Mapscript Message-ID: ?Respected Members, Can you plz send me any example of retrieving results by query using php mapscript. thanks & regards, sharmistha -------------- next part -------------- An HTML attachment was scrubbed... URL: From c_alb at GMX.DE Mon Apr 18 23:36:02 2005 From: c_alb at GMX.DE (Cord Albers) Date: Tue, 19 Apr 2005 01:36:02 -0500 Subject: changing color of a single polygon-feature Message-ID: Dear list, I draw polygons with cgi-parameter into a map (&map_polygon_feature=new&map_polygon_feature_points=...). That works wonderful. Now I want to change the color of the polygon. In my map-file I have defined a layer with a class which drwas polygons in red. I know that I can change the color of the class with the cgi-parameter (map_polygon_class_color=0+255+0). But in this case the color of all polygons in this layer would be changed. Is there a possiblity to change only the color of a single feature? Greetings Cord From benerothe at YAHOO.COM Tue Apr 19 00:19:35 2005 From: benerothe at YAHOO.COM (Benedikt Unset) Date: Tue, 19 Apr 2005 09:19:35 +0200 Subject: Windows/Makefile/Java-Mapscript Message-ID: Hallo I think somebody asked for a Windows-Makefile to generate the mapscript.dll and the Java-files for Java-Mapscript. Merging "Makefile.vc for C#" and "Makefile.in for Java" resulted in the attached Makefile. Benedikt ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de -------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile.vc Type: application/octet-stream Size: 2194 bytes Desc: Makefile.vc URL: From lluisgm at GMAIL.COM Tue Apr 19 00:40:19 2005 From: lluisgm at GMAIL.COM (=?ISO-8859-1?Q?Llu=EDs_Garcia_i_Mestres?=) Date: Tue, 19 Apr 2005 09:40:19 +0200 Subject: Image resolution In-Reply-To: <000801c54472$9d8de5d0$5d2815ac@au.aecomnet.com> Message-ID: I didn?t change the image size, it's the original from the tfw. My tif is a composition of 6 RGB and is displayed as a raster layer in the correct position. The resolution of the image and the map is the same:72 dpi. The output format is png, and I think the problem should be there. Llu?s On 4/19/05, Jacob Delfos wrote: > Is your map-image being displayed at its normal resolution, or did you > specify a size for the image ( your map-image size? > Or are you by any chance using GIF as an output format? Or another format > that is not rgb? Sometimes using indexed colour (8bit, 256 colours) can > create the illusion of reduced resolution, because pixels of similar colour > get merged. > > Regards, > > Jacob > > > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On > Behalf Of Llu?s Garcia i Mestres > Sent: 18 April 2005 22:04 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: [UMN_MAPSERVER-USERS] Image resolution > > Hi > > I'm working with a tif file of 0,5 meter per pixel. I don't know why, > when I check this tif out of mapserver the quality is greater than > when I display it in my mapserver application. I?ve try with different > resolution in the map file but the quality is still the same. > > Thanks > > Llu?s > From jacob.delfos at MAUNSELL.COM Tue Apr 19 00:52:50 2005 From: jacob.delfos at MAUNSELL.COM (Jacob Delfos) Date: Tue, 19 Apr 2005 15:52:50 +0800 Subject: Image resolution Message-ID: Llu?s, If you are using PNG, it is possible you only get 256 colours. Put these statements in your mapfile (comment out your existing outputformat and imagetype, if any), and check whether it gets any better: OUTPUTFORMAT NAME jpeg DRIVER "GD/JPEG" MIMETYPE "image/jpeg" IMAGEMODE RGB EXTENSION "jpg" FORMATOPTION "QUALITY=80" END IMAGETYPE jpeg When I mentioned about changing the image size, I meant in your template. Do you have an " wrote: > Is your map-image being displayed at its normal resolution, or did you > specify a size for the image ( your map-image size? > Or are you by any chance using GIF as an output format? Or another format > that is not rgb? Sometimes using indexed colour (8bit, 256 colours) can > create the illusion of reduced resolution, because pixels of similar colour > get merged. > > Regards, > > Jacob > > > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On > Behalf Of Llu?s Garcia i Mestres > Sent: 18 April 2005 22:04 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: [UMN_MAPSERVER-USERS] Image resolution > > Hi > > I'm working with a tif file of 0,5 meter per pixel. I don't know why, > when I check this tif out of mapserver the quality is greater than > when I display it in my mapserver application. I?ve try with different > resolution in the map file but the quality is still the same. > > Thanks > > Llu?s > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sc at BYTRON.COM Tue Apr 19 02:39:56 2005 From: sc at BYTRON.COM (sc) Date: Tue, 19 Apr 2005 10:39:56 +0100 Subject: Oracle Spatial Error ORA-13373 using geodetic data In-Reply-To: <42640124.6090905@univali.br> Message-ID: Hi, the 4.5 dev version has stopped the error, thanks, now I have the issue that none of the data is being displayed. The SQL coming from Mapserver is correct and records are being returned, why would the data not display on the image? Is my map file incorrect? LAYER NAME "Spatial Nav" TYPE POLYGON STATUS ON CONNECTIONTYPE oraclespatial CONNECTION "user/password at mydb.world" DATA "SHAPE FROM SPATIAL_NAV USING SRID 8307 VERSION 9i" CLASS NAME "Spatial" OUTLINECOLOR 60 60 06 COLOR 0 0 255 SYMBOL 'circle' END END regards Simon -----Original Message----- From: Fernando Simon [mailto:fsimon at univali.br] Sent: 18 April 2005 18:49 To: sc Cc: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Oracle Spatial Error ORA-13373 using geodetic data Hi, Thanks for your reply, I know this problem and I already fixed this problem in cvs version (4.5 dev). I used another solution because in 10g version you don`t need to use functions to transoform geodetic data, you can see the solution in http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1211 In my tests the cvs version for maporaclespatial.c worked with 4.4.x version without problems, you can try it and test the results. Thanks. ------------------------------------------------------------------------ Fernando Simon Mapserver and Oracle Spatial developer G10 - Laboratorio de Computacao Aplicada - Brazil http://g10.cttmar.univali.br - UNIVALI/CTTMAR ------------------------------------------------------------------------ sc wrote: >Hi all, > >I am trying to get the oracle spatial connectivity working but I am getting >the following oracle errors: > >SELECT rownum, SHAPE FROM SPATIAL_NAV_ARPT A WHERE SDO_FILTER( SHAPE, >MDSYS.SDO_GEOMETRY(2003, 8307, NULL, >MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-11.96563,49.8 9 >8,3.25433,60.7694) ),'querytype=window') = 'TRUE' > >ERROR at line 1: >ORA-29902: error in executing ODCIIndexStart() routine >ORA-13373: Element of type Extent is not supported for Geodetic data >ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 368 >ORA-06512: at line 1 > >This is an extract of my map file: > > LAYER > NAME "Spatial Nav" > TYPE POLYGON > STATUS ON > CONNECTIONTYPE oraclespatial > CONNECTION "user/password at mydb.world" > DATA "SHAPE FROM SPATIAL_NAV USING SRID 8307" > > CLASS > NAME "Spatial" > OUTLINECOLOR 60 60 06 > COLOR 0 0 255 > SYMBOL 'circle' > END > END > >I have noticed that other users have experienced the same problem but I >haven't seen any solutions, I have also seen >reference to a change of the source code? Could this be correct? Code >follows: > >maporaclespatial.c has the extent type hardcoded to a rectangle, so = >there is no work around, without changing the source code. > > >Try changing maporaclespatial.c from: > > if (apply_window) > sprintf( query_str + strlen(query_str), > "SDO_FILTER( %s.%s, MDSYS.SDO_GEOMETRY(" > "2003, %s, NULL," > "MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3)," > "MDSYS.SDO_ORDINATE_ARRAY(%.9g,%.9g,%.9g,%.9g) )," > "'querytype=3Dwindow') =3D 'TRUE'", > table_name, geom_column_name, srid, > rect.minx, rect.miny, rect.maxx, rect.maxy ); > >to: > > if (apply_window) > sprintf( query_str + strlen(query_str), > "SDO_FILTER( %s.%s, MDSYS.SDO_GEOMETRY(" > "2003, %s, NULL," > "MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1)," > = >"MDSYS.SDO_ORDINATE_ARRAY(%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.= >9g) )," > "'querytype=3Dwindow') =3D 'TRUE'", > table_name, geom_column_name, srid, > rect.minx, rect.miny, rect.minx, rect.maxy, rect.maxx, = >rect.maxy, rect.maxx, rect.miny,rect.minx, rect.miny ); > >regards > >Simon > >-- >No virus found in this outgoing message. >Checked by AVG Anti-Virus. >Version: 7.0.308 / Virus Database: 266.9.16 - Release Date: 18/04/2005 > > > -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.16 - Release Date: 18/04/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.17 - Release Date: 19/04/2005 From logicalgenetics at GMAIL.COM Tue Apr 19 02:50:53 2005 From: logicalgenetics at GMAIL.COM (Dan Taylor) Date: Tue, 19 Apr 2005 10:50:53 +0100 Subject: Transparent PNG files... Message-ID: Following up from another thread, I'm currently attempting to show woodland as a polygon filled with tree images. It has been suggested to me that I use two or more transparent images to fill the polygon and get the effect I want. However, I have hit another problem. I get the warning: "Warning: [MapServer Error]: loadSymbol(): Unable to load GIF symbol" when I try to load a gif image using the following in my map file: SYMBOL NAME 'tree3' TYPE pixmap TRANSPARENT 127 IMAGE 'symbols/trees.gif' END If I try to use a PNG image it won't go transparent. Using Paint Shop pro I have examined the palette to find the index of the colour I want to be transparent (white), so as far as I know it's correct. The image ends up looking wrong. See mapfile snippet and link for example. SYMBOL NAME 'tree4' TYPE pixmap TRANSPARENT 0 IMAGE 'symbols/trees2.png' END http://logicalgenetics.com/assorted/upload/output_not_working.jpg So I have two questions... 1) Can transparent PNG images be used and if so, how? 2) Why can my version of mapserver not load GIF images? Do I need to compile something extra in? Very best, Dan -- Dan Taylor Software Development Engineer, JTL Systems Ltd PhD Student, Reading University, UK http://www.logicalgenetics.com From logicalgenetics at GMAIL.COM Tue Apr 19 03:42:37 2005 From: logicalgenetics at GMAIL.COM (Dan Taylor) Date: Tue, 19 Apr 2005 11:42:37 +0100 Subject: Symbols within an area In-Reply-To: Message-ID: Just to say thanks for helping - especially to Stephen, who's suggestion was exactly what I was after. The trees look pretty good now,with just one problem... I can't for the life of me get the image to be transparent. See other thread for my moanings about that! http://logicalgenetics.com/assorted/upload/output_not_working.jpg Dan On 4/18/05, James Sohr wrote: > Matt, > > This is actually the result of a very-beta-level MapScript function I > wrote that draws path-following text labels for a given layer. > > I say it's very beta since it doesn't do any sort of collision detection, > and in some cases can produce upside down or backwards labels. I am > working on those issues, as well as adding auto line-wrapping and auto- > placement features sometime in the future. > > Still, if anyone is interesting in playing with the present version, I can > share the function and/or the madness behind it. > > Thanks, > James > > On Mon, 18 Apr 2005 10:24:24 -0700, Matthew Perry > wrote: > > >James, > > > > {slightly off-topic} In the example gif, How did you generate the > >labels to curve with the road? I wasn't aware of any mapfile > >configuration that would allow you to spline text labels like this. Did > you > >accomplish this with mapserver proper or a custom mapscript solution? > > > >Thanks, > >-- > >Matt Perry > >Humboldt State University > >perrygeo at gmail.com > -- Dan Taylor Software Development Engineer, JTL Systems Ltd PhD Student, Reading University, UK http://www.logicalgenetics.com From fsimon at UNIVALI.BR Tue Apr 19 05:17:43 2005 From: fsimon at UNIVALI.BR (Fernando Simon) Date: Tue, 19 Apr 2005 09:17:43 -0300 Subject: Oracle Spatial Error ORA-13373 using geodetic data In-Reply-To: Message-ID: Hi, About the data problem, can be little problems. How did you import the data in your database? With loader? If yes, did you execute the Oracle migrate function? To check the internal sql you can compile the Mapserver using the DEBUG flag, if you use it the maporaclespatial will report the internal sql that retrieve the spatial data. Another problem can be with the extents, the data form the database can be diferent of your extents, in another kind. To fix this problem you can define a Projection for your layer to transform your data. Thanks for your reply. ------------------------------------------------------------------------ Fernando Simon Mapserver and Oracle Spatial developer G10 - Laboratorio de Computacao Aplicada - Brazil http://g10.cttmar.univali.br - UNIVALI/CTTMAR ------------------------------------------------------------------------ sc wrote: >Hi, > >the 4.5 dev version has stopped the error, thanks, now I have the issue >that none of the data is being displayed. The SQL coming from Mapserver >is correct and records are being returned, why would the data not display >on the image? Is my map file incorrect? > > LAYER > NAME "Spatial Nav" > TYPE POLYGON > STATUS ON > CONNECTIONTYPE oraclespatial > CONNECTION "user/password at mydb.world" > DATA "SHAPE FROM SPATIAL_NAV USING SRID 8307 VERSION 9i" > > CLASS > NAME "Spatial" > OUTLINECOLOR 60 60 06 > COLOR 0 0 255 > SYMBOL 'circle' > END > END > >regards > >Simon > > From sc at BYTRON.COM Tue Apr 19 05:52:46 2005 From: sc at BYTRON.COM (sc) Date: Tue, 19 Apr 2005 13:52:46 +0100 Subject: Oracle Spatial Error ORA-13373 using geodetic data In-Reply-To: <4264F6E7.20505@univali.br> Message-ID: Hi, The SELECT statement produced by mapserver works ok in SQL*Plus and rows of data are returned. The data was NOT imported using sql*loader. regards Simon -----Original Message----- From: Fernando Simon [mailto:fsimon at univali.br] Sent: 19 April 2005 12:18 To: sc Cc: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Oracle Spatial Error ORA-13373 using geodetic data Hi, About the data problem, can be little problems. How did you import the data in your database? With loader? If yes, did you execute the Oracle migrate function? To check the internal sql you can compile the Mapserver using the DEBUG flag, if you use it the maporaclespatial will report the internal sql that retrieve the spatial data. Another problem can be with the extents, the data form the database can be diferent of your extents, in another kind. To fix this problem you can define a Projection for your layer to transform your data. Thanks for your reply. ------------------------------------------------------------------------ Fernando Simon Mapserver and Oracle Spatial developer G10 - Laboratorio de Computacao Aplicada - Brazil http://g10.cttmar.univali.br - UNIVALI/CTTMAR ------------------------------------------------------------------------ sc wrote: >Hi, > >the 4.5 dev version has stopped the error, thanks, now I have the issue >that none of the data is being displayed. The SQL coming from Mapserver >is correct and records are being returned, why would the data not display >on the image? Is my map file incorrect? > > LAYER > NAME "Spatial Nav" > TYPE POLYGON > STATUS ON > CONNECTIONTYPE oraclespatial > CONNECTION "user/password at mydb.world" > DATA "SHAPE FROM SPATIAL_NAV USING SRID 8307 VERSION 9i" > > CLASS > NAME "Spatial" > OUTLINECOLOR 60 60 06 > COLOR 0 0 255 > SYMBOL 'circle' > END > END > >regards > >Simon > > -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.17 - Release Date: 19/04/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.17 - Release Date: 19/04/2005 From woodbri at SWOODBRIDGE.COM Tue Apr 19 06:38:30 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Tue, 19 Apr 2005 09:38:30 -0400 Subject: Transparent PNG files... In-Reply-To: <830dd37405041902505aed039e@mail.gmail.com> Message-ID: Dan, With my very limited experience working with images and photoshop you need to make sure that you save set the image as having a transparent background and select the index before you file it. Then you need to tell mapserver in the symbol definition what index is also transparent. I don't think it will work it create a normal (non transparent) image and then tell mapserver to treat some index value is transparent. I have attached a transparent png image where I use "transparent 1" in my symbol def. try replacing your tree with it and see if that works. -Steve Dan Taylor wrote: > Following up from another thread, I'm currently attempting to show > woodland as a polygon filled with tree images. It has been suggested > to me that I use two or more transparent images to fill the polygon > and get the effect I want. However, I have hit another problem. > > I get the warning: "Warning: [MapServer Error]: loadSymbol(): Unable > to load GIF symbol" when I try to load a gif image using the following > in my map file: > > SYMBOL > NAME 'tree3' > TYPE pixmap > TRANSPARENT 127 > IMAGE 'symbols/trees.gif' > END > > If I try to use a PNG image it won't go transparent. Using Paint Shop > pro I have examined the palette to find the index of the colour I want > to be transparent (white), so as far as I know it's correct. The > image ends up looking wrong. See mapfile snippet and link for > example. > > SYMBOL > NAME 'tree4' > TYPE pixmap > TRANSPARENT 0 > IMAGE 'symbols/trees2.png' > END > > http://logicalgenetics.com/assorted/upload/output_not_working.jpg > > So I have two questions... > > 1) Can transparent PNG images be used and if so, how? > > 2) Why can my version of mapserver not load GIF images? Do I need to > compile something extra in? > > Very best, > > Dan > -------------- next part -------------- A non-text attachment was scrubbed... Name: ushwy.png Type: image/png Size: 221 bytes Desc: not available URL: From jms4 at PO.CWRU.EDU Tue Apr 19 06:49:58 2005 From: jms4 at PO.CWRU.EDU (James Sohr) Date: Tue, 19 Apr 2005 08:49:58 -0500 Subject: Transparent PNG files... Message-ID: I've sometimes had problems getting PNGs do display transparency using the "Transparent" keyword with an index-- even when I specify the proper index, the specified color doesn't become transparent. The best solution I've found is to ensure the PNG was saved natively with transparency. I'm not sure how it would be done in Paint Shop Pro, but in Photoshop you can save the PNG as a transparent PNG file and can even specify the transparency color. I can use this PNG in Mapserver fine-- the key is then to not use the "Transparent" keyword at all. If you want, you can post a link to your PNG file and I'd be happy to see if I can get it go transparent. As far as GIF files goes, it might be that your version of mapserver wasn't compiled with GIF support. You can type "mapserv -v" at the command line (on Windows), or "./mapserv -v" at a shell prompt to find out. HTH, James From David.Fawcett at STATE.MN.US Tue Apr 19 07:09:13 2005 From: David.Fawcett at STATE.MN.US (Fawcett, David) Date: Tue, 19 Apr 2005 09:09:13 -0500 Subject: changing color of a single polygon-feature Message-ID: Cord, It depends on the context. If you know which polygons you want to color ahead of time, you could set up a CLASS with an EXPRESSION that only fits that polygon and set a style to symbolize that poly. If this is a dynamic thing, it sounds like you might be looking for a QUERYMAP. More info in the docs: http://mapserver.gis.umn.edu/doc44/mapfile-reference.html David Fawcett Minnesota Office of Environmental Assistance david.fawcett at moea.state.mn.us 651.215.0200 -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of Cord Albers Sent: Tuesday, April 19, 2005 1:36 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] changing color of a single polygon-feature Dear list, I draw polygons with cgi-parameter into a map (&map_polygon_feature=new&map_polygon_feature_points=...). That works wonderful. Now I want to change the color of the polygon. In my map-file I have defined a layer with a class which drwas polygons in red. I know that I can change the color of the class with the cgi-parameter (map_polygon_class_color=0+255+0). But in this case the color of all polygons in this layer would be changed. Is there a possiblity to change only the color of a single feature? Greetings Cord From logicalgenetics at GMAIL.COM Tue Apr 19 07:53:52 2005 From: logicalgenetics at GMAIL.COM (Dan Taylor) Date: Tue, 19 Apr 2005 15:53:52 +0100 Subject: Transparent PNG files... In-Reply-To: Message-ID: Thanks to you both for your help. I managed to solve the problem by making the PNG transparent, as you suggest and using the transparent colour's index. Strangely, I also needed to include "TRANSPARENT 100" in my layer definition. This makes very little sense, but I have it working now so I don't care ;o) http://logicalgenetics.com/assorted/upload/1_M120D424950S37D037775SM118D737450S38D444025S600S500S1S1S2005M04M17S20C51C49.jpg http://logicalgenetics.com/assorted/upload/M120D424950S37D037775SM118D737450S38D444025S600S500S1S1S2005M04M17S20C51C49.jpg Cheers! Dan On 4/19/05, James Sohr wrote: > I've sometimes had problems getting PNGs do display transparency using > the "Transparent" keyword with an index-- even when I specify the proper > index, the specified color doesn't become transparent. > > The best solution I've found is to ensure the PNG was saved natively with > transparency. I'm not sure how it would be done in Paint Shop Pro, but in > Photoshop you can save the PNG as a transparent PNG file and can even > specify the transparency color. I can use this PNG in Mapserver fine-- > the key is then to not use the "Transparent" keyword at all. > > If you want, you can post a link to your PNG file and I'd be happy to > see if I can get it go transparent. > > As far as GIF files goes, it might be that your version of mapserver > wasn't compiled with GIF support. You can type "mapserv -v" at the > command line (on Windows), or "./mapserv -v" at a shell prompt to find > out. > > HTH, > James > -- Dan Taylor Software Development Engineer, JTL Systems Ltd PhD Student, Reading University, UK http://www.logicalgenetics.com From lluisgm at GMAIL.COM Tue Apr 19 09:07:49 2005 From: lluisgm at GMAIL.COM (=?ISO-8859-1?Q?Llu=EDs_Garcia_i_Mestres?=) Date: Tue, 19 Apr 2005 18:07:49 +0200 Subject: Image resolution In-Reply-To: <000801c544b4$c8e351b0$5d2815ac@au.aecomnet.com> Message-ID: Thanks Jacob, It looks that I get the same quality of image. Therefor I was using the same image size. With jpg format it seems correct the quality level. Llu?s On 4/19/05, Jacob Delfos wrote: > Llu?s, > > If you are using PNG, it is possible you only get 256 colours. Put these > statements in your mapfile (comment out your existing outputformat and > imagetype, if any), and check whether it gets any better: > > OUTPUTFORMAT > NAME jpeg > DRIVER "GD/JPEG" > MIMETYPE "image/jpeg" > IMAGEMODE RGB > EXTENSION "jpg" > FORMATOPTION "QUALITY=80" > END > > IMAGETYPE jpeg > > When I mentioned about changing the image size, I meant in your template. Do > you have an " the width of it the same as the mapimage in your mapfile? > > Regards, > > Jacob > > JACOB DELFOS > SPATIAL INFORMATION ANALYST > Maunsell Australia Pty Ltd > 629 Newcastle Street, WA 6007 > PO Box 81, WA 6902 > Leederville > Western Australia > ABN 20 093 846 925 > > Tel + 61 8 9281 6185 > Fax + 61 8 9281 6297 > jacob.delfos at maunsell.com > > > > -----Original Message----- > From: Llu?s Garcia i Mestres [mailto:lluisgm at gmail.com] > Sent: 19 April 2005 15:40 > To: Jacob Delfos > Cc: MAPSERVER-USERS at lists.umn.edu > Subject: Re: [UMN_MAPSERVER-USERS] Image resolution > > I didn?t change the image size, it's the original from the tfw. My tif > is a composition of 6 RGB and is displayed as a raster layer in the > correct position. The resolution of the image and the map is the > same:72 dpi. > > The output format is png, and I think the problem should be there. > > Llu?s > > > On 4/19/05, Jacob Delfos wrote: > > Is your map-image being displayed at its normal resolution, or did you > > specify a size for the image ( match > > your map-image size? > > Or are you by any chance using GIF as an output format? Or another format > > that is not rgb? Sometimes using indexed colour (8bit, 256 colours) can > > create the illusion of reduced resolution, because pixels of similar > colour > > get merged. > > > > Regards, > > > > Jacob > > > > > > > > -----Original Message----- > > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On > > Behalf Of Llu?s Garcia i Mestres > > Sent: 18 April 2005 22:04 > > To: MAPSERVER-USERS at LISTS.UMN.EDU > > Subject: [UMN_MAPSERVER-USERS] Image resolution > > > > Hi > > > > I'm working with a tif file of 0,5 meter per pixel. I don't know why, > > when I check this tif out of mapserver the quality is greater than > > when I display it in my mapserver application. I?ve try with different > > resolution in the map file but the quality is still the same. > > > > Thanks > > > > Llu?s > > > From ryant at CS.UTAH.EDU Tue Apr 19 12:30:45 2005 From: ryant at CS.UTAH.EDU (ryan) Date: Tue, 19 Apr 2005 14:30:45 -0500 Subject: Display a map using Tiger data Message-ID: Hi, I'm having trouble displaying a map of street data i got from the tiger LINE project. mapserv doesn't give me any errors, just shows a blank png. I can run the demo stuff fine. I've also tried changing STATUS from ON to OFF to DEFAULT in my mapfile. Also, I don't know for sure what the extent of my map should be, but i'm passing 1.00, 1.00, 50000.00, 50000.00 because i can use arcexplorer on my windows machine to find that the dimensions of the map are about 50Km by 50Km. Here is the web address i access: http://localhost/cgi-bin/mapserv?map=/usr/bin/apache/htdocs/mapserver/simple.map&mode=map&layer=Freeways&mapext=1.00%201.00%2050000.00%2050000.00&imgsize=300%20300 And my map file is here: #-------start of map file---------------# NAME sampleMapServer # the below extents and size are provided in the URL and so must be removed #EXTENT 482925.85 3625874.39 497393.16 3617143.43 #SIZE 300 300 SHAPEPATH "data" UNITS meters #all layers default to off. # Note that the layers are drawn depending on their order in this file, from top to bottom, and LAYER NAME Freeways TYPE LINE DATA tgr49035lkA STATUS DEFAULT CLASS COLOR 255 0 0 END # end of class object END # end of layer object END # end of map file #-------end of map file---------------# I've also put my shapefiles online if anyone would care to look at them: http://www.cs.utah.edu/~ryant/mapserver/ This is a SuSE linux machine. mapserver was compiled with the following configure command: ./configure --with-postgis --with-jpeg=/usr/bin/jpeg --prefix=/usr/bin/mapserver --with-httpd=/usr/bin/apache/bin/httpd --with-proj=/usr/bin/proj4 Thanks for any help. I've been banging my head against my desk and searching through all the documentation for a few days now. I really appreciate anything you could throw my way. Ryan T. From fwarmerdam at GMAIL.COM Tue Apr 19 12:57:52 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Tue, 19 Apr 2005 15:57:52 -0400 Subject: Display a map using Tiger data In-Reply-To: Message-ID: On 4/19/05, ryan wrote: > Hi, > > I'm having trouble displaying a map of street data i got from the tiger LINE > project. mapserv doesn't give me any errors, just shows a blank png. I can > run the demo stuff fine. I've also tried changing STATUS from ON to OFF to > DEFAULT in my mapfile. Also, I don't know for sure what the extent of my > map should be, but i'm passing 1.00, 1.00, 50000.00, 50000.00 because i can > use arcexplorer on my windows machine to find that the dimensions of the map > are about 50Km by 50Km. Ryan, I would suggest the issue is extents related. Likely all your vectors are getting drawn in one pixel. I would suggest you use some utility to get the extents of your dataset in their intrinsic coordinate system which would be lat/long if they are tiger/line data (that hasn't been reprojected). For shapefiles and a few other formats, you could use ogrinfo. eg. ogrinfo -ro -so -al abc.shp > Here is the web address i access: > http://localhost/cgi-bin/mapserv?map=/usr/bin/apache/htdocs/mapserver/simple.map&mode=map&layer=Freeways&mapext=1.00%201.00%2050000.00%2050000.00&imgsize=300%20300 > > And my map file is here: > > #-------start of map file---------------# > NAME sampleMapServer > # the below extents and size are provided in the URL and so must be removed > #EXTENT 482925.85 3625874.39 497393.16 3617143.43 Note, just because you are listing the extents in the url doesn't mean you have to remove them from the map. The info passed in the url just overrides the info in the map file. I generally try to fill out reasonable information in the mapfile so I can use utilities like shp2img for debugging purposes. PS. there are lots of possible reasons your map could be failing to draw besides the extents issue, but it is pretty hard for us to remotely debug without all supporting files, and a clear understanding of what version of mapserver you are running. Generally "mapserv -v" output is more useful than your configure line. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From ryant at CS.UTAH.EDU Tue Apr 19 13:15:24 2005 From: ryant at CS.UTAH.EDU (Ryan D Taylor) Date: Tue, 19 Apr 2005 14:15:24 -0600 Subject: Display a map using Tiger data In-Reply-To: <931f8ea905041912573d267a3e@mail.gmail.com> Message-ID: Hi, Just an update. You were right about the extent info. I put in the output from ogrinfo -ro -so -al and it works beautifully. Thank you so much. Ryan T. On Tue, 19 Apr 2005, Frank Warmerdam wrote: > On 4/19/05, ryan wrote: > > Hi, > > > > I'm having trouble displaying a map of street data i got from the tiger LINE > > project. mapserv doesn't give me any errors, just shows a blank png. I can > > run the demo stuff fine. I've also tried changing STATUS from ON to OFF to > > DEFAULT in my mapfile. Also, I don't know for sure what the extent of my > > map should be, but i'm passing 1.00, 1.00, 50000.00, 50000.00 because i can > > use arcexplorer on my windows machine to find that the dimensions of the map > > are about 50Km by 50Km. > > Ryan, > > I would suggest the issue is extents related. Likely all your vectors are > getting drawn in one pixel. I would suggest you use some utility to get > the extents of your dataset in their intrinsic coordinate system which would > be lat/long if they are tiger/line data (that hasn't been reprojected). > > For shapefiles and a few other formats, you could use ogrinfo. > > eg. > ogrinfo -ro -so -al abc.shp > > > Here is the web address i access: > > http://localhost/cgi-bin/mapserv?map=/usr/bin/apache/htdocs/mapserver/simple.map&mode=map&layer=Freeways&mapext=1.00%201.00%2050000.00%2050000.00&imgsize=300%20300 > > > > And my map file is here: > > > > #-------start of map file---------------# > > NAME sampleMapServer > > # the below extents and size are provided in the URL and so must be removed > > #EXTENT 482925.85 3625874.39 497393.16 3617143.43 > > Note, just because you are listing the extents in the url doesn't > mean you have to remove them from the map. The info passed in > the url just overrides the info in the map file. I generally try to fill > out reasonable information in the mapfile so I can use utilities like > shp2img for debugging purposes. > > PS. there are lots of possible reasons your map could be failing to draw > besides the extents issue, but it is pretty hard for us to remotely debug > without all supporting files, and a clear understanding of what version > of mapserver you are running. Generally "mapserv -v" output is more > useful than your configure line. > > Best regards, > -- > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent > > From bob.basques at CI.STPAUL.MN.US Tue Apr 19 13:33:45 2005 From: bob.basques at CI.STPAUL.MN.US (Bob Basques) Date: Tue, 19 Apr 2005 15:33:45 -0500 Subject: GML output Message-ID: About GML output. Is the WFS server a requirement for GML output? Can the CGI version of MapServer output GML without the WFS configuration? Thanks bobb From numerous at GMAIL.COM Tue Apr 19 14:05:56 2005 From: numerous at GMAIL.COM (Yar Doroshenko) Date: Tue, 19 Apr 2005 16:05:56 -0500 Subject: MapServer & PHP MapScript 4.4.1 or 4.4.2 binaries Message-ID: Hi, Does anyone have MapServer & PHP MapScript 4.4.1 or 4.4.2 binaries built with MrSID support??? If so, could anyone share those? I would really appreciate your help! THANK YOU!!! From Nick at STONE-ENV.COM Tue Apr 19 14:35:38 2005 From: Nick at STONE-ENV.COM (Nick Floersch) Date: Tue, 19 Apr 2005 17:35:38 -0400 Subject: Perl Mapscript driving me bonkers? Message-ID: Hello All, PROBLEM: Upgraded PerlMapscript does not work with web app written using older PerlMapscript BACKGROUND: New to the list, and relatively new to Mapserver and Perl MapScript. We recently upgraded our mapserver installation from some older version (perhaps 3.x) to 4.4.1. We have a web app that uses Perl MapScript to navigate/explore some maps and such - pretty standard. As part of the MapServer upgrade, I upgraded PerlMapscript because I was told that the previous Mapserver installation we had (which I did not build or install) did not have TIFF raster support built in, and we needed it for the next version of our little PerlMapscript web app. Our new mapserver executable reports that it supports as many raster formats as we're going to be able to use (png, bmp, gif, tiff, gd, pdf, ming, etc..). I'm fairly sure I've built it right because it works for some other purposes. So, after building the newest mapserver and then installing the perl mapscript which came with it, the web app does not work. I saved the old PerlMapscript libs and put them back in place, and stuff works again. Good... CURRENT STATUS: We either need to know that the old version of Perlmapscript did have support for TIFF rasters, or figure out how to make the new version of mapscript and our webapp work together. I am a sysadmin who does not know anything about Mapserver beyond what it takes to build it. I am a Perl programmer (no Guru, but still). I do not know enough about GIS to write a Mapfile from scratch. Currently, the web app gets to the following line: v---snip--- #Create map object that refers to full extent map my $mapObjFull = new mapscript::mapObj("../mapserver/malibu.map") or die("$mapscript::ms_error->{message}"); warn "Got Here 2.5"; ^---snip--- And never prints "Got Here 2.5" or continues or does anything. There are, of course, various "Got Here 2.x" items before this point, and it prints all of them (no I don't use debuggers, I use 'warn' statements). I tried using the $ENV{MS_ERRFILE} or whatever it is to setup a debug log - it never seems to work, no matter where I put the file or what permissions I give it. So that hasn't helped. As I said, this is a web app, so my "Got Here" statements print into the Apache error_log file. I decided to try a command line version to see if I missed anything... But I didn't. v---snip--- #!/usr/bin/perl -w use mapscript; use XBase; my $mapObjFull = new mapscript::mapObj("../mapserver/.map") or die ("$mapscript::ms_error->{message}"); warn "Got Here 2.5"; ^---snip--- I run it and I get errors about only using the $mapscript::ms_error variable once. So I commented it out: v---snip--- #!/usr/bin/perl -w use mapscript; use XBase; my $mapObjFull = new mapscript::mapObj("../mapserver/.map"); # or die ("$mapscript::ms_error->{message}"); warn "Got Here 2.5"; ^---snip--- And now when I run the thing I just get: "Segmentation fault" If I run the same script with the old mapscript, I get: "Got Here 2.5" Which is what I want, at least at this point. I tried re-swigging the perl mapscript and it did change the output a bit. Before re-swigging the output of my script was: "Killed" And now I get the segfault thing. My perl version is 5.8.1 My Linux is Mandrake 9.2. Mapserver is 4.4.1 and PerlMapscript is whatever version comes with MS 4.4.1 At this point, I just went through major headaches building MS 4.4.1, so I would prefer not to upgrade to 4.4.2, and I cannot upgrade Mandrake 9.2, although I can rip out software and recompile pieces by hand - ie I don't have the install media for a newer version of Mandrake, though I doubt that is the problem. Apache is 2.0.47, though I doubt that matters since I get errors at the command line. The machine has 1gb of RAM and a P4 cpu. I can't think of any other details, but I would be very grateful to anyone who even hazards a guess here - I have no idea what to do. I did see various posts on the Wiki about Perl 5.8 and Mapscript, but I never had any trouble building mapscript - ie. No errors during the mapscript build. Is the mapscript wrapper something that works completely independantly of the Mapserver that is installed? I don't fully understand the relationship between the mapserver executable and mapscript libraries, and thus also don't understand if having TIFF support in the mapserver executable has any bearing on TIFF support in the mapscript libraries. Thank you for reading this far, Nicholas Floersch --- Nicholas E. Floersch (pr. Floorsh) IT Group Manager Direct / 802.229.1872 Cell / 802.249.2516 E-Mail / nfloersch at stone-env.com Stone Environmental, Inc. 535 Stone Cutters Way, Montpelier, Vermont 05602 Tel / 802.229.4541 Fax / 802.229.5417 Web Site / www.stone-env.com From gmanepal at GMAIL.COM Tue Apr 19 16:58:21 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Tue, 19 Apr 2005 19:58:21 -0400 Subject: levels in Shapefiles In-Reply-To: <6d675eda05041712545220febd@mail.gmail.com> Message-ID: Hello, Anyone there to answer my question? :-( I am currently trying few options with php/mapscript to embed in my application later on. Say that I have a shapefile for a state with the geometry being polygon. The polygons inside this shapefile each represent a city (say). I have also got the shapefiles for each of the city. Now, if I click on any part of the region inside a city on the main shapefile, how can I load the shapefile corresponding to the city on which I clicked. Is there any standard way to achieve this? Did anyone have an idea which they think is the standard way? I appreciate any help in this regard. Thanks and Regards, Giridhar p.s Currenly I am using ESRI shapefiles. Is any other geometrical data( for eg Tiger Dataset) more appropriate to do this. What is google doing for this?(Just curious) From gmanepal at GMAIL.COM Tue Apr 19 17:17:28 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Tue, 19 Apr 2005 20:17:28 -0400 Subject: Inverse Projection Message-ID: Hello All, When the user clicks on the map image, I calculated the Latitude/Longitude using javascript. This pretty much assumes linear transformation of image points to lat/long which obviously will be erroneous. The deviation from the actual lat/long will depend on the "projection" i have used for my shapefile. Currently, I dont have any information of the projection system used. Is it possible to identify more accurately the lat/long of the mouse click without knowing the projection system? If I know the projection system used, is it right to say that I can accurately calculate the lat/long of the mouse click? If so, how? I appreciate if anyone can throw some light on these issues! Thanks Giridhar From woodbri at SWOODBRIDGE.COM Tue Apr 19 17:36:47 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Tue, 19 Apr 2005 20:36:47 -0400 Subject: levels in Shapefiles In-Reply-To: <6d675eda050419165864a4e852@mail.gmail.com> Message-ID: The way you would accomplish this is have the user click on the map and have mapserver do a query based on the click. You can Query multiple layers so if yo query the state layer then you will know about which state was clicked on and if you query the city layer you will know what city was clicked on or if NO city was clicked on. You can then get the extents of the city shape that was returned in the query and use that information to zoom the map to that city. 1) setup your mapfile to support queries 2) get the click coordinates 3) query the layer(s) 4) get the extents of the city 5) set the extents of the map to the city extents 6) redraw your map -Steve W. http://imaptools.com Giridhar Manepalli wrote: > Hello, > Anyone there to answer my question? :-( > > I am currently trying few options with php/mapscript to embed in my > application later on. > > Say that I have a shapefile for a state with the geometry being > polygon. The polygons inside this shapefile each represent a city > (say). I have also got the shapefiles for each of the city. Now, if I > click on any part of the region inside a city on the main shapefile, > how can I load the shapefile corresponding to the city on which I > clicked. > > Is there any standard way to achieve this? Did anyone have an idea > which they think is the standard way? > > I appreciate any help in this regard. > > Thanks and Regards, > Giridhar > p.s Currenly I am using ESRI shapefiles. Is any other geometrical > data( for eg Tiger Dataset) more appropriate to do this. What is > google doing for this?(Just curious) > From mikeisdacoolest at YAHOO.COM Tue Apr 19 19:23:58 2005 From: mikeisdacoolest at YAHOO.COM (mike bockus) Date: Tue, 19 Apr 2005 19:23:58 -0700 Subject: Dynamically Adding Labels... Please Help!! Message-ID: I'm using the PHP extension and I'm attempting to add a label given a longitude and latitude to a map. The label text will be taken from user input in our web application. I've searched for over two days without finding a solution. Any help would be greatly appreciated. Thanks. I've tried the following but failed... $pt = ms_newLineObj(); $pt->addXY(35,50); // do x and y represent latitude and longitude? $shape = ms_newShapeObj(MS_SHAPE_POINT); $shape->set('classindex', 0); $shape->set('text', "Testing"); // assign the label $shape->add($pt); $layer = $map->getLayerByName('line_annotation'); $test=$layer->addFeature($shape); $shape->draw($map, $layer, $map->draw()); $image = $map->draw(); Here's the mapfile for line_annoatation LAYER NAME line_annotation STATUS ON TYPE ANNOTATION FEATURE END CLASS LABEL TYPE TRUETYPE FONT arial SIZE 10 COLOR 0 0 0 POSITION UC FORCE TRUE END END END Thanks again. __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail From woodbri at SWOODBRIDGE.COM Tue Apr 19 20:59:55 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Tue, 19 Apr 2005 23:59:55 -0400 Subject: Dynamically Adding Labels... Please Help!! In-Reply-To: <20050420022358.8586.qmail@web40512.mail.yahoo.com> Message-ID: mike bockus wrote: > I'm using the PHP extension and I'm attempting to add > a label given a longitude and latitude to a map. The > label text will be taken from user input in our web > application. I've searched for over two days without > finding a solution. Any help would be greatly > appreciated. Thanks. > > > I've tried the following but failed... > $pt = ms_newLineObj(); > $pt->addXY(35,50); // do x and y represent latitude > and longitude? NO, x=longitude y=latitude unless you are using some projection > $shape = ms_newShapeObj(MS_SHAPE_POINT); > $shape->set('classindex', 0); > $shape->set('text', "Testing"); // assign the label > $shape->add($pt); > $layer = $map->getLayerByName('line_annotation'); try adding: $layer->set("status", MS_ON); > $test=$layer->addFeature($shape); > $shape->draw($map, $layer, $map->draw()); > $image = $map->draw(); > > Here's the mapfile for line_annoatation > LAYER > NAME line_annotation > STATUS ON > TYPE ANNOTATION > FEATURE > END > CLASS > LABEL > TYPE TRUETYPE > FONT arial > SIZE 10 > COLOR 0 0 0 > POSITION UC > FORCE TRUE > END > END > END > > Thanks again. > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - Helps protect you from nasty viruses. > http://promotions.yahoo.com/new_mail > From pscott at UWC.AC.ZA Tue Apr 19 23:55:20 2005 From: pscott at UWC.AC.ZA (Paul Scott) Date: Wed, 20 Apr 2005 07:55:20 +0100 Subject: Ubuntu GIS Message-ID: Hi all, I have begun preparing (with help from Perry Nacionales) an Ubuntu GNU/Linux distribution that will be set up for a GIS desktop/test server. The initial audience for the distribution will be in the form of a liveCD/DVD for school learners to get exposure to OSS GIS, as well as an introduction to linux. However, I forsee that anyone remotely interested in GIS could download and try it out, from GIS pro's to casual onlookers. The initial release will contain the following packages: Apache 2.0.53 FastCGI 2.4.0 Proj 4.4.9 GEOS 2.1.1 Xerces-C 2.6.0 FFTW 2.1.5 PostgreSQL 8.0.1 PostGIS 1.0rc5 GDAL/OGR 1.2.6 GRASS 6.0 Quantum GIS 0.6 PDFLib 5.0.4p1 PHP 4.3.10 MapServer 4.4.1 (with PHP/MapScript) MapServer 4.5 CVS (with PHP/MapScript) The project will be hosted on AVOIR http://avoir.uwc.ac.za , where I have created a project for it. I will start working on the distro iso's shortly. If anyone is interested in joining this project as a maintainer/developer/tester etc please register on avoir and send me your username so that I can add you to the project. This project will require quite a substantial amount of maintenance, so any help and suggestions will be greatly appreciated. Thanks --Paul From sbeorchia at GI-LEMANS.COM Wed Apr 20 00:01:11 2005 From: sbeorchia at GI-LEMANS.COM (Sylvain Beorchia) Date: Wed, 20 Apr 2005 09:01:11 +0200 Subject: news about DXF ? Message-ID: Hi list, Is there any news about displaying DXF / DWF files in mapserver ? What do u use to conevrt DXF to shapefiles ? is there a free solution ? And finally, how to use DXF via WMS Thanks a lot. Sylvain. Le Mans - France From lucamarle at GMAIL.COM Wed Apr 20 01:52:55 2005 From: lucamarle at GMAIL.COM (luca marletta) Date: Wed, 20 Apr 2005 10:52:55 +0200 Subject: How to get a plan picture from ortho pictures? Message-ID: How to get a plan picture from ortho pictures? I've a full set of aeropictures of an area used for photogrammetry purpose. I'd like to adapt them for mapserver use, is there any opensource software I can used for this goal? can anyone give me a link and tell me what the main problem with this transformation? Thanks a lot to the list luca -- luca marletta icq: 70590647 From ferencik.ioan at PERSONAL.RO Wed Apr 20 04:24:03 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Wed, 20 Apr 2005 14:24:03 +0300 Subject: Layers visbility Message-ID: Hi all, I am currently developping a simple Mapserver aplication. I need to do the folowing: create a div in my index php where i will have checkboxes representing my layers. I want the user to be able to set my layers visibility (status) on or off. I have the folowing html Rosia Montana Environmental Mapserver

Rosia Montana Gold Corporation Environmental Mapserver

Layer Control
> Rivers  
>Aries  
> DEM  
Legend
Reference map
Scale bar
how could I achieve this through phpmapscript? i think that the logic should be if the checbox is checked $layer->set("status", MS_ON) else $layer->set ("status", MS_OFF) i undestood it can be achieved only with not default layers nay suggestion is welcomed _____________________________________________ Cinefil?Castiga o excursie la Venetia http://www.cineplus.ro/concurs From fwarmerdam at GMAIL.COM Wed Apr 20 04:26:51 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Wed, 20 Apr 2005 07:26:51 -0400 Subject: How to get a plan picture from ortho pictures? In-Reply-To: <8b5020105042001522a44136f@mail.gmail.com> Message-ID: On 4/20/05, luca marletta wrote: > How to get a plan picture from ortho pictures? > I've a full set of aeropictures of an area used for photogrammetry purpose. > I'd like to adapt them for mapserver use, is there any opensource > software I can used for this goal? Luca, What do you mean by a "plan picture"? Generally speaking it should be easy to create a layer from a set of orthophotos in MapServer by creating a tileindex for them (with gdaltindex) and using that tileindex for a layer. For performance purposes it may be necessary to create overviews for the orthophotos, and to manage a seperate "overview" layer for large scales. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From lucamarle at GMAIL.COM Wed Apr 20 05:00:36 2005 From: lucamarle at GMAIL.COM (luca marletta) Date: Wed, 20 Apr 2005 14:00:36 +0200 Subject: Fwd: [UMN_MAPSERVER-USERS] How to get a plan picture from ortho pictures? In-Reply-To: <8b502010504200459460da8d9@mail.gmail.com> Message-ID: Thanks for reply but my problems ("the problem" in this case) is not to have a big picture or a tileindex, else if I appreciate your suggestion, but to create a "plain image" (flat I mean, sorry for error in typing) from aeropictures, pay attention NOT from satellite. The pictures I have couldn't be overlap due to distortion, distortion that give them the possibility to build a 3D view and get an photogrammetric map. With some software elaboration you can rearrange them and make them plain and overlappable and my question is about experience in this directions mainly in opensource environment. Thanks again for contribution luca On 4/20/05, Frank Warmerdam wrote: > What do you mean by a "plan picture"? > > Generally speaking it should be easy to create a layer from a set of > orthophotos in MapServer by creating a tileindex for them (with gdaltindex) > and using that tileindex for a layer. For performance purposes it may > be necessary to create overviews for the orthophotos, and to manage > a seperate "overview" layer for large scales. -- luca marletta icq: 70590647 From jochen at INGENIEURTEAM2.COM Wed Apr 20 05:11:14 2005 From: jochen at INGENIEURTEAM2.COM (Jochen Grefe) Date: Wed, 20 Apr 2005 14:11:14 +0200 Subject: Transparency layers in pdf Message-ID: Hello everybody, I have a polygon layer with TRANSPARENCY 50 that lay on top over a raster layer. While it renders as expected to png the polygon are opaque when renderd to pdf. Despite using FORMATOPTION "OUTPUT_TYPE=RASTER" or not. The raster layers are rendered internally to jpeg because of the absence of inmemory opening of png images in former pdflib versions. Since the newest library (6.01, I don't know until wich version it worked) supports this, I tested the rendering to pdf over png. Which give me a lot of better quality as the jpeg pdf but don't helped me with the transpareny issue. Any help is appreciated, jochen From fwarmerdam at GMAIL.COM Wed Apr 20 05:17:23 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Wed, 20 Apr 2005 08:17:23 -0400 Subject: Fwd: [UMN_MAPSERVER-USERS] How to get a plan picture from ortho pictures? In-Reply-To: <8b5020105042005005589d096@mail.gmail.com> Message-ID: On 4/20/05, luca marletta wrote: > Thanks for reply but my problems ("the problem" in this case) is not > to have a big picture or a tileindex, else if I appreciate your > suggestion, but to create a "plain image" (flat I mean, sorry for > error in typing) from aeropictures, pay attention NOT from satellite. > The pictures I have couldn't be overlap due to distortion, distortion > that give them the possibility to build a 3D view and get an > photogrammetric map. > With some software elaboration you can rearrange them and make them > plain and overlappable and my question is about experience in this > directions mainly in opensource environment. Luca, I'm afraid I am still confused about what you want. Are the inputs actually ortho-photos or raw airphotos? If they are orthophotos then I don't see what you mean about not being able to overlap them due to distortion. From asimpson at I-55.COM Wed Apr 20 05:30:34 2005 From: asimpson at I-55.COM (Simpson) Date: Wed, 20 Apr 2005 07:30:34 -0500 Subject: FW: [UMN_MAPSERVER-USERS] Perl Mapscript driving me bonkers? Message-ID: Nick, The old libmap.a from 3.x may still be in your path and is being picked up during mapscript compilation. Drew. -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of Nick Floersch Sent: Tuesday, April 19, 2005 4:36 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] Perl Mapscript driving me bonkers? Hello All, PROBLEM: Upgraded PerlMapscript does not work with web app written using older PerlMapscript BACKGROUND: New to the list, and relatively new to Mapserver and Perl MapScript. We recently upgraded our mapserver installation from some older version (perhaps 3.x) to 4.4.1. We have a web app that uses Perl MapScript to navigate/explore some maps and such - pretty standard. As part of the MapServer upgrade, I upgraded PerlMapscript because I was told that the previous Mapserver installation we had (which I did not build or install) did not have TIFF raster support built in, and we needed it for the next version of our little PerlMapscript web app. Our new mapserver executable reports that it supports as many raster formats as we're going to be able to use (png, bmp, gif, tiff, gd, pdf, ming, etc..). I'm fairly sure I've built it right because it works for some other purposes. So, after building the newest mapserver and then installing the perl mapscript which came with it, the web app does not work. I saved the old PerlMapscript libs and put them back in place, and stuff works again. Good... CURRENT STATUS: We either need to know that the old version of Perlmapscript did have support for TIFF rasters, or figure out how to make the new version of mapscript and our webapp work together. I am a sysadmin who does not know anything about Mapserver beyond what it takes to build it. I am a Perl programmer (no Guru, but still). I do not know enough about GIS to write a Mapfile from scratch. Currently, the web app gets to the following line: v---snip--- #Create map object that refers to full extent map my $mapObjFull = new mapscript::mapObj("../mapserver/malibu.map") or die("$mapscript::ms_error->{message}"); warn "Got Here 2.5"; ^---snip--- And never prints "Got Here 2.5" or continues or does anything. There are, of course, various "Got Here 2.x" items before this point, and it prints all of them (no I don't use debuggers, I use 'warn' statements). I tried using the $ENV{MS_ERRFILE} or whatever it is to setup a debug log - it never seems to work, no matter where I put the file or what permissions I give it. So that hasn't helped. As I said, this is a web app, so my "Got Here" statements print into the Apache error_log file. I decided to try a command line version to see if I missed anything... But I didn't. v---snip--- #!/usr/bin/perl -w use mapscript; use XBase; my $mapObjFull = new mapscript::mapObj("../mapserver/.map") or die ("$mapscript::ms_error->{message}"); warn "Got Here 2.5"; ^---snip--- I run it and I get errors about only using the $mapscript::ms_error variable once. So I commented it out: v---snip--- #!/usr/bin/perl -w use mapscript; use XBase; my $mapObjFull = new mapscript::mapObj("../mapserver/.map"); # or die ("$mapscript::ms_error->{message}"); warn "Got Here 2.5"; ^---snip--- And now when I run the thing I just get: "Segmentation fault" If I run the same script with the old mapscript, I get: "Got Here 2.5" Which is what I want, at least at this point. I tried re-swigging the perl mapscript and it did change the output a bit. Before re-swigging the output of my script was: "Killed" And now I get the segfault thing. My perl version is 5.8.1 My Linux is Mandrake 9.2. Mapserver is 4.4.1 and PerlMapscript is whatever version comes with MS 4.4.1 At this point, I just went through major headaches building MS 4.4.1, so I would prefer not to upgrade to 4.4.2, and I cannot upgrade Mandrake 9.2, although I can rip out software and recompile pieces by hand - ie I don't have the install media for a newer version of Mandrake, though I doubt that is the problem. Apache is 2.0.47, though I doubt that matters since I get errors at the command line. The machine has 1gb of RAM and a P4 cpu. I can't think of any other details, but I would be very grateful to anyone who even hazards a guess here - I have no idea what to do. I did see various posts on the Wiki about Perl 5.8 and Mapscript, but I never had any trouble building mapscript - ie. No errors during the mapscript build. Is the mapscript wrapper something that works completely independantly of the Mapserver that is installed? I don't fully understand the relationship between the mapserver executable and mapscript libraries, and thus also don't understand if having TIFF support in the mapserver executable has any bearing on TIFF support in the mapscript libraries. Thank you for reading this far, Nicholas Floersch --- Nicholas E. Floersch (pr. Floorsh) IT Group Manager Direct / 802.229.1872 Cell / 802.249.2516 E-Mail / nfloersch at stone-env.com Stone Environmental, Inc. 535 Stone Cutters Way, Montpelier, Vermont 05602 Tel / 802.229.4541 Fax / 802.229.5417 Web Site / www.stone-env.com From jdport at VERITIME.COM Wed Apr 20 05:34:19 2005 From: jdport at VERITIME.COM (Jeff Portwine) Date: Wed, 20 Apr 2005 08:34:19 -0400 Subject: Inverse Projection Message-ID: Well if you make your make projection one that uses linear units such as meters, you can easily convert a click coordinate into x,y meters coordinates by knowing hte map extents and the resolution of the image. From robert.wanczyk at PROGEA.PL Wed Apr 20 05:43:32 2005 From: robert.wanczyk at PROGEA.PL (Robert Wanczyk) Date: Wed, 20 Apr 2005 07:43:32 -0500 Subject: Red Hat & PHP/MapScripts Message-ID: Hi I have problem in Mapserver installation my phpinfo.php look like this http://progea.no-ip.org/phpinfo.php . I install mapsrever like this - http://www.01map.com/david/doc/rh9-2004- 12/html/ but I skip Postgresql. I have some one web page make in Windows and his work so I wont to make the same page in Linux, I have RH9. I take the all file and copy to linux but this look like this http://progea.no- ip.org/n2k/temp/5/gmap/htdocs/gmap75.phtml. I don?t know what happen, I have file gd-2.0.12.tar.gz. So I don?t understand why not work. Maybe you have some idea. Thank you for help Best Robert From lfilak at MEDINACO.ORG Wed Apr 20 05:52:05 2005 From: lfilak at MEDINACO.ORG (Lowell Filak) Date: Wed, 20 Apr 2005 08:52:05 -0400 Subject: Perl Mapscript driving me bonkers? Message-ID: The following message was sent by Nick Floersch on Tue, 19 Apr 2005 17:35:38 -0400. > Hello All, > > PROBLEM: Upgraded PerlMapscript does not work with web app written using > older PerlMapscript > > BACKGROUND: > New to the list, and relatively new to Mapserver and Perl MapScript. > > We recently upgraded our mapserver installation from some older version > (perhaps 3.x) to 4.4.1. > We have a web app that uses Perl MapScript to navigate/explore some maps > and such - pretty standard. > As part of the MapServer upgrade, I upgraded PerlMapscript because I was > told that the previous Mapserver installation we had (which I did not > build or install) did not have TIFF raster support built in, and we > needed it for the next version of our little PerlMapscript web app. Our > new mapserver executable reports that it supports as many raster formats > as we're going to be able to use (png, bmp, gif, tiff, gd, pdf, ming, > etc..). I'm fairly sure I've built it right because it works for some > other purposes. > > So, after building the newest mapserver and then installing the perl > mapscript which came with it, the web app does not work. I saved the old > PerlMapscript libs and put them back in place, and stuff works again. > Good... > > CURRENT STATUS: > We either need to know that the old version of Perlmapscript did have > support for TIFF rasters, or figure out how to make the new version of > mapscript and our webapp work together. I am a sysadmin who does not > know anything about Mapserver beyond what it takes to build it. I am a > Perl programmer (no Guru, but still). I do not know enough about GIS to > write a Mapfile from scratch. > > Currently, the web app gets to the following line: > v---snip--- > #Create map object that refers to full extent map > my $mapObjFull = new mapscript::mapObj("../mapserver/malibu.map") or > die("$mapscript::ms_error->{message}"); > warn "Got Here 2.5"; > ^---snip--- > And never prints "Got Here 2.5" or continues or does anything. There > are, of course, various "Got Here 2.x" items before this point, and it > prints all of them (no I don't use debuggers, I use 'warn' statements). > > I tried using the $ENV{MS_ERRFILE} or whatever it is to setup a debug > log - it never seems to work, no matter where I put the file or what > permissions I give it. So that hasn't helped. > > As I said, this is a web app, so my "Got Here" statements print into the > Apache error_log file. I decided to try a command line version to see if > I missed anything... But I didn't. Nicholas, A LOT has changed (for the better) between 3.x & 4.4 so alterrations to the code AND the 'knowngood' mapfile need to be expected. However, there is a direct relationship between the mapserv executable and mapscript. If you can locate the mapserv executable from your previous install and run it from the command line with the -v option, as you expect, it will list whether tiff support is available. Otherwise you can always do the guess & check method of adding a raster tiff layer to the mapfile used in the app and then drawing it (try this with a 256 color, 8-bit, no compression, tiff with an associated .wld file). Either way you will want to upgrade at some point but this may save you some immediate trouble. Lowell From morten at DOTNETGIS.NET Wed Apr 20 06:06:52 2005 From: morten at DOTNETGIS.NET (Morten Nielsen) Date: Wed, 20 Apr 2005 15:06:52 +0200 Subject: How to get a plan picture from ortho pictures? In-Reply-To: A<931f8ea9050420051742a5cc1c@mail.gmail.com> Message-ID: >If you are looking for airphoto orthorectification capabilities, then I >think you will find it exists in GRASS though I have never tried to >use this capability. You still need inner and exterior orientation parameters of the images, camera parameters and lens distortion measurements. Furthermore you need a digital elevation model to do a proper orthorectification. If the images have been used for photogrammetric mapping, the orientation parameters probably exist already, but then you still need a DEM. Just be aware that if the images have been oriented using single model setups instead of using bundle adjustments / aerotriangulation, you will probably get a poor result. Bottom line is that this is no easy task unless you already have a full blown orthophoto production setup (which I assume you don't have). Best regards Morten Nielsen From lfilak at MEDINACO.ORG Wed Apr 20 06:20:12 2005 From: lfilak at MEDINACO.ORG (Lowell Filak) Date: Wed, 20 Apr 2005 09:20:12 -0400 Subject: MyGIS, Mapfile, and MapScript Message-ID: The following message was sent by Don Deskins on Mon, 18 Apr 2005 11:50:37 -0500. > It must be monday! > > the errors are as follows: > > Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named > 'Parcels'. in on line 274 > > Warning: [MapServer Error]: msMYGISLayerGetShapeRandom(): GetShape called on > MYGIS layer with invalid DB query results. in on line 274 > > Warning: [MapServer Error]: SELECT feature.id, feature.vertices, > geometry.WKB_GEOMETRY from mysql query failed : mysql query failed in > on line 274 > > Fatal error: Call to a member function on a non-object in on line 276 > > Can anyone suggest what the problem may be? Don, I'm confused, from your previous posts I can't determine if you imported your data into mysql using the shp2mysql.pl routine. If not, that is most likely the problem. The third error line above seems to indicate that the geometry fields expected by the mygis reader do not exist. If you do a 'select * from \g' at the mysql prompt does the data appear to be there? Lowell Lowell From fabio.zottele at ING.UNITN.IT Wed Apr 20 06:43:25 2005 From: fabio.zottele at ING.UNITN.IT (Fabio Zottele) Date: Wed, 20 Apr 2005 15:43:25 +0200 Subject: A Problem with Dynamic Legend Message-ID: Hi. I am Fabio Zottele and I work for the University of Trento in Italy. I use Mapserver 4.4.1 PHP 4.3.10 and Apache2. I am a first-timer of PHP/Mapserver and I have included in my work the PHPDynLegend script found at http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPDynLegend. I've merged the script in my code. All work well with one exception: after including the "legend.php" in the HTML file, when visualizing the page on a browser a "Object1"-line appears on the screen just under the legend (correctly displayed). How can I delete it? any suggestions are welcomed! Thanks. From lucamarle at GMAIL.COM Wed Apr 20 07:21:21 2005 From: lucamarle at GMAIL.COM (luca marletta) Date: Wed, 20 Apr 2005 16:21:21 +0200 Subject: Fwd: [UMN_MAPSERVER-USERS] How to get a plan picture from ortho pictures? In-Reply-To: <8b5020105042007202c021a88@mail.gmail.com> Message-ID: Thanks a lot, unfortunately you are right, I've not all needed. It seems a process that can be undertaken just by the team that make the photogrammetric map. best regards luca On 4/20/05, Morten Nielsen wrote: > You still need inner and exterior orientation parameters of the images, > camera parameters and lens distortion measurements. Furthermore you need a > digital elevation model to do a proper orthorectification. > > If the images have been used for photogrammetric mapping, the orientation > parameters probably exist already, but then you still need a DEM. Just be > aware that if the images have been oriented using single model setups > instead of using bundle adjustments / aerotriangulation, you will probably > get a poor result. Bottom line is that this is no easy task unless you > already have a full blown orthophoto production setup (which I assume you > don't have). > > Best regards > Morten Nielsen > -- luca marletta icq: 70590647 From lucamarle at GMAIL.COM Wed Apr 20 07:57:53 2005 From: lucamarle at GMAIL.COM (luca marletta) Date: Wed, 20 Apr 2005 16:57:53 +0200 Subject: How to get a plan picture from ortho pictures? In-Reply-To: <8b5020105042007216eaf22fa@mail.gmail.com> Message-ID: For anyone interested I found an open source software that is done for this purpose. But 1) documentation is Portuguese 2) it ask, as explain by Morten a lot of parameters, to set up the transformation. Anyway is here http://e-foto.sourceforge.net/index-e.html Bye luca -- luca marletta icq: 70590647 From lfilak at MEDINACO.ORG Wed Apr 20 08:28:21 2005 From: lfilak at MEDINACO.ORG (Lowell Filak) Date: Wed, 20 Apr 2005 11:28:21 -0400 Subject: Perl API method setProjection doesn't work. Message-ID: The following message was sent by SUBSCRIBE MAPSERVER-USERS Cave on Wed, 13 Apr 2005 05:46:21 -0500. > > Ah. Hang on. > > The second is wrong. The two others seems to do the same thing. > > Unfortunately, it?s right. All methods of solving my problem do not work. > > > Anyway - I think the problem is that setProjection() doesn't change > > your extents, so you've probably zoomed in very closely on a spot in > > the Pacific Ocean. > > To test this hypothesis, I have calculate the extents with proj utility, > and set them manually. Unfortunately, it didn?t the help also. > > It is significant that setting the projection in query string from CGI- > script works successfully. Cave, My theory on this one is that the setProjection may work correctly but there are other parameters which need to follow for the map to render correctly. The mapserv cgi handles all of those settings automatically as opposed to mapscript where you need to set them manually. Until I can look at the source I don't know what else is missing. Lowell From wlx at MYGIS.ORG Wed Apr 20 08:40:26 2005 From: wlx at MYGIS.ORG (Liangxu Wang) Date: Wed, 20 Apr 2005 23:40:26 +0800 Subject: how to make php_mapscript work with apache2 mpm worker as a dso? Message-ID: Hi all, I know how to make php_mapscript worked with php as cgi mode,but I don't know how to make it worked as a dso with apache2_mpm_worker. MapServer has a configure parameter:with-threads=linkopts,but what is the linkopts? I have tried with with-threads and nothing appended it, but the php_mapscript can't worked. So how can I make it work? Any help are appreciated. Best regards. Sincerely yours, Liangxu Wang From genuchten at YAHOO.COM Wed Apr 20 06:40:34 2005 From: genuchten at YAHOO.COM (Paul) Date: Wed, 20 Apr 2005 06:40:34 -0700 Subject: Does Mapserver-Oracle support labelangleitem? In-Reply-To: Message-ID: I couldn't get labelangleitem working on an oracle spatial point-table. In the mapserver list i found some similar posts, but nobody replied to previous questions. Is it a known bug? Hass somebody found a solution? Is somebody working on it? My table is a spatial table with only point geometry (geometry,angle,label). The labels show without problems, but they don't use the angle: LAYER MyLabels NAME "street" CONNECTIONTYPE oraclespatial CONNECTION mo/mo at gk DATA "GEOMETRY FROM NAST" #srid = null, but also tried; geometry from (select... STATUS ON TYPE ANNOTATION LABELITEM "NAME" LABELANGLEITEM "ANGLE" CLASS LABEL COLOR 0 0 0 POSITION CC SHADOWCOLOR 255 255 255 SIZE 12 ANTIALIAS TRUE ANGLE AUTO FORCE TRUE END END END The angle field is in european 12,345 notation, but when i changed it to round(angle), the labels still didn't show __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From manninside at YAHOO.COM Wed Apr 20 09:05:25 2005 From: manninside at YAHOO.COM (Mandar sarlashkar) Date: Wed, 20 Apr 2005 09:05:25 -0700 Subject: Problem diplaying PostGIS layer. Postgres and Mapserver have been setup on separate Machines Message-ID: I am running Mapserver on Windows and Postgres on Linux. I am trying to display the PosGIS layer but till date could not. Can anyone Help me Please? Thanks in Advance. Best Gregards. Bye for now Mandar __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmanepal at GMAIL.COM Wed Apr 20 09:24:42 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Wed, 20 Apr 2005 12:24:42 -0400 Subject: Problem diplaying PostGIS layer. Postgres and Mapserver have been setup on separate Machines In-Reply-To: <20050420160526.77732.qmail@web50802.mail.yahoo.com> Message-ID: Hello Mandar, Can you post the error messages? Also can you login to the postgresql server from your windows machine. It is more of a system task than a mapserver issue. Thanks, On 4/20/05, Mandar sarlashkar wrote: > > > I am running Mapserver on Windows and Postgres on Linux. > > I am trying to display the PosGIS layer but till date could not. > > Can anyone Help me Please? > > > > Thanks in Advance. > > Best Gregards. > > > > Bye for now > > Mandar > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com From gireddy at GMAIL.COM Wed Apr 20 09:31:34 2005 From: gireddy at GMAIL.COM (Shashi Gireddy) Date: Wed, 20 Apr 2005 11:31:34 -0500 Subject: Problem diplaying PostGIS layer. Postgres and Mapserver have been setup on separate Machines In-Reply-To: <20050420160526.77732.qmail@web50802.mail.yahoo.com> Message-ID: HI Mandar, I used Postgres(8.0-- it automatically configures postgis if u select the option)& mapserver both on windows, here is sample code.. LAYER NAME "qru_fnl1" CONNECTIONTYPE postgis CONNECTION "user=root password=c3n5u5 dbname=census host=localhost" DATA "the_geom from qry1 using srid=-1" STATUS DEFAULT TYPE POLYGON STATUS ON TRANSPARENCY 70 CLASSITEM "p001001" LABELITEM "tract" LABELCACHE ON #MINSCALE 10 #MAXSCALE 50 #LABELMAXSCALE 0.5 #LABELMINSCALE 1.5 CLASS NAME "Class1" EXPRESSION ([p001001]<1000) TEMPLATE void COLOR 210 120 110 OUTLINECOLOR 0 0 0 LABEL FORCE FALSE PARTIALS FALSE MINDISTANCE 200 #MINFEATURESIZE AUTO ANTIALIAS TRUE COLOR 164 140 0 SHADOWCOLOR 218 218 218 SHADOWSIZE 2 2 TYPE TRUETYPE FONT arial MINSIZE 7 MAXSIZE 12 POSITION CL PARTIALS FALSE BUFFER 10 END END As far as I know you don't have to chance anything in php (you can create the same layer through php code, but it didn't worked for me, let me know if it works for you). shashi. On 4/20/05, Mandar sarlashkar wrote: > > > I am running Mapserver on Windows and Postgres on Linux. > > I am trying to display the PosGIS layer but till date could not. > > Can anyone Help me Please? > > > > Thanks in Advance. > > Best Gregards. > > > > Bye for now > > Mandar > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com -- Shashi Kiran Reddy. Gireddy, Graduate Assistant, CBER, University of Alabama. http://www.cs.ua.edu/shashi Home: 205-752-5137 Cell: 205-657-1438 From gireddy at GMAIL.COM Wed Apr 20 09:38:54 2005 From: gireddy at GMAIL.COM (Shashi Gireddy) Date: Wed, 20 Apr 2005 11:38:54 -0500 Subject: mapscript configured but gives fatal error(nothing wrong with the program) Message-ID: Hi all, I have a strange experience today, I had some problem with php errors( I wanted to display php warnings also) so I changed php.ini file, then php didn't worked for me even after I copied the backup ini file. After many trials I installed a fresh copy of php and configured mapscript. Its showing that mapscript is configured on my test page(hello.php) here is the output MapServer version 4.4.0-beta1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE but the strange part its giving "Fatal error: Call to undefined function: ms_newmapobj()" error. there is nothing wrong with programs as they were running fine earlier. I am approaching my deadline , can anybody help me please. thank you, shashi. From wangwr at USTC.EDU Wed Apr 20 09:35:44 2005 From: wangwr at USTC.EDU (WANG WenRui) Date: Thu, 21 Apr 2005 00:35:44 +0800 Subject: How to draw street curb lines? Message-ID: Hi, Given a vector data file of streets and every street's width, how to render a map with street curb location? Is there any software deal with this? Thanks in advance. -- WANG WenRui PGP-Key-ID: 6ABE5DE0 Registered GNU/Linux User #278717 WWW: http://gnor.net/~roger/ From fsimon at UNIVALI.BR Wed Apr 20 10:06:08 2005 From: fsimon at UNIVALI.BR (Fernando Simon) Date: Wed, 20 Apr 2005 14:06:08 -0300 Subject: Does Mapserver-Oracle support labelangleitem? In-Reply-To: <20050420134034.92745.qmail@web90004.mail.scd.yahoo.com> Message-ID: Hi Paul, I did some tests using your definition and everthing is wotking. Here I used this table: SQL> desc cola_markets; Name Null? Type ----------------------------------------- -------- ---------------------------- MKT_ID NOT NULL NUMBER NAME VARCHAR2(32) SHAPE MDSYS.SDO_GEOMETRY ANGLE NUMBER This is the data that I used: MKT_ID NAME SHAPE(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES) ANGLE ---------- 90 point_only SDO_GEOMETRY(2001, NULL, SDO_POINT_TYPE(12, 14, NULL), NULL, NULL) 10 And my layer definition: ( I just added the font and type parameters) layer connectiontype ORACLESPATIAL connection 'user/pass at db' data "shape from (select angle, name, mkt_id, shape from cola_markets where mkt_id = 90) using unique mkt_id" name 'test' TYPE annotation status off labelitem "NAME" LABELANGLEITEM "ANGLE" class label font verdana type truetype COLOR 0 0 0 POSITION CC SHADOWCOLOR 255 255 255 SIZE 12 ANTIALIAS TRUE ANGLE AUTO FORCE TRUE end end end You can see my example using this request: http://g10novo.cttmar.univali.br/cgi-bin/mapserv?map=/home/apache/mapserv/simmam/simmam2.map&mode=map&imgsize=800+600&mapext=-179.999400+-90.000000+180.000000+83.627400&layers=test Thanks. ------------------------------------------------------------------------ Fernando Simon Mapserver and Oracle Spatial developer G10 - Laboratorio de Computacao Aplicada - Brazil http://g10.cttmar.univali.br - UNIVALI/CTTMAR ------------------------------------------------------------------------ Paul wrote: > I couldn't get labelangleitem working on an oracle spatial > point-table. In the mapserver list i found some similar posts, but > nobody replied to previous questions. Is it a known bug? Hass somebody > found a solution? Is somebody working on it? > My table is a spatial table with only point geometry > (geometry,angle,label). The labels show without problems, but they > don't use the angle: > > LAYER MyLabels > NAME "street" > CONNECTIONTYPE oraclespatial > CONNECTION mo/mo at gk > DATA "GEOMETRY FROM NAST" #srid = null, but also tried; > geometry from (select... > STATUS ON > TYPE ANNOTATION > LABELITEM "NAME" > LABELANGLEITEM "ANGLE" > CLASS > LABEL > COLOR 0 0 0 > POSITION CC > SHADOWCOLOR 255 255 255 > SIZE 12 > ANTIALIAS TRUE > ANGLE AUTO > FORCE TRUE > END > END > END > The angle field is in european 12,345 notation, but when i changed it > to round(angle), the labels still didn't show > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > From cvhackel at YAHOO.COM Wed Apr 20 10:12:18 2005 From: cvhackel at YAHOO.COM (Chris Hackel) Date: Wed, 20 Apr 2005 10:12:18 -0700 Subject: SWF OUTPUT_MOVIE=SINGLE resolution? Message-ID: Outputting SWF, when I set OUTPUT_MOVIE=SINGLE I get an empty movie. When it's MULTIPLE it works fine. This problem was described here: http://lists.gis.umn.edu/pipermail/mapserver-dev/2004-June/001112.html but I could not find any sort of resolution. I'm using mapserver 4.4.2. Any assistance would be much appreciated! Thank you, Chris Full file: MAP EXTENT -74.047185 40.679548 -73.907005 40.882078 SIZE 400 300 PROJECTION "init=epsg:4269" END WEB TEMPLATE "tigermap.html" IMAGEPATH "/Library/WebServer/Documents/tigertest/tmp/" IMAGEURL "/tigertest/tmp/" END OUTPUTFORMAT NAME swf DRIVER "SWF" MIMETYPE "application/x-shockwave-flash" EXTENSION "swf" IMAGEMODE PC256 FORMATOPTION "OUTPUT_MOVIE=SINGLE" END IMAGETYPE swf LAYER NAME Complete_Chain TYPE LINE STATUS DEFAULT CONNECTIONTYPE OGR CONNECTION "/Library/WebServer/Documents/tigertest/tgr36061" CLASS COLOR 153 102 0 END END # Layer END From assefa at DMSOLUTIONS.CA Wed Apr 20 10:57:44 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Wed, 20 Apr 2005 13:57:44 -0400 Subject: SWF OUTPUT_MOVIE=SINGLE resolution? In-Reply-To: <20050420171218.76742.qmail@web60502.mail.yahoo.com> Message-ID: Chris, Is this a problem with layers containing labels ? Can you disable layers with labels and try it again with OUTPUT_MOVIE=SINGLE ? Basically if you want to use OUTPUT_MOVIE=SINGLE, you need to use true type fonts instead of FDB fonts as explained in the post. Later, Chris Hackel wrote: > Outputting SWF, when I set OUTPUT_MOVIE=SINGLE I get > an empty movie. When it's MULTIPLE it works fine. This > problem was described here: > http://lists.gis.umn.edu/pipermail/mapserver-dev/2004-June/001112.html > but I could not find any sort of resolution. I'm using > mapserver 4.4.2. > > Any assistance would be much appreciated! > Thank you, > Chris > > > Full file: > > MAP > EXTENT -74.047185 40.679548 -73.907005 40.882078 > SIZE 400 300 > > PROJECTION > "init=epsg:4269" > END > > WEB > TEMPLATE "tigermap.html" > IMAGEPATH > "/Library/WebServer/Documents/tigertest/tmp/" > IMAGEURL "/tigertest/tmp/" > END > > OUTPUTFORMAT > NAME swf > DRIVER "SWF" > MIMETYPE "application/x-shockwave-flash" > EXTENSION "swf" > IMAGEMODE PC256 > FORMATOPTION "OUTPUT_MOVIE=SINGLE" > END > > IMAGETYPE swf > > > > LAYER > NAME Complete_Chain > TYPE LINE > STATUS DEFAULT > CONNECTIONTYPE OGR > CONNECTION > "/Library/WebServer/Documents/tigertest/tgr36061" > CLASS > COLOR 153 102 0 > END > END # Layer > END > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From woodbri at SWOODBRIDGE.COM Wed Apr 20 11:03:56 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Wed, 20 Apr 2005 14:03:56 -0400 Subject: Google is at it again, now the UK Message-ID: http://maps.google.co.uk/ From dylan at IICI.NO-IP.ORG Wed Apr 20 11:05:58 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Wed, 20 Apr 2005 11:05:58 -0700 Subject: consolidation of .map file contents Message-ID: Hi everyone, We have been using Mapserver for about a year now with a great deal of success on small projects (i.e. single map file, single html template, single query template). Now that we are considering a more complicated project with nearly 200 .map files and their associated html templates and query templates - quite a bit to manage should any cosmetic changes need to be made in the map files. Is there any way to "include" bits of a central map file to consolidate the configuration of such a large project, or would it be better to use a single .map file, customizing it through the URL passed to it... ...or is phpmapscript a viable option? thanks in advancce for any ideas! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From cvhackel at YAHOO.COM Wed Apr 20 11:39:05 2005 From: cvhackel at YAHOO.COM (Chris Hackel) Date: Wed, 20 Apr 2005 11:39:05 -0700 Subject: SWF OUTPUT_MOVIE=SINGLE resolution? In-Reply-To: 6667 Message-ID: No.. there's no labels in that layer. Just to test, I changed the mapfile below to: LAYER NAME Complete_Chain TYPE LINE STATUS DEFAULT CONNECTIONTYPE OGR CONNECTION "/Library/WebServer/Documents/tigertest/tgr36061" CLASS COLOR 153 102 0 LABEL TYPE TRUETYPE FONT arial-bold END END END # Layer and it still doesn't work. Any ideas? Thanks, Chris --- Yewondwossen Assefa wrote: > Chris, > > Is this a problem with layers containing labels ? > Can you disable > layers with labels and try it again with > OUTPUT_MOVIE=SINGLE ? > Basically if you want to use OUTPUT_MOVIE=SINGLE, > you need to use true > type fonts instead of FDB fonts as explained in the > post. > > Later, > > Chris Hackel wrote: > > Outputting SWF, when I set OUTPUT_MOVIE=SINGLE I > get > > an empty movie. When it's MULTIPLE it works fine. > This > > problem was described here: > > > http://lists.gis.umn.edu/pipermail/mapserver-dev/2004-June/001112.html > > but I could not find any sort of resolution. I'm > using > > mapserver 4.4.2. > > > > Any assistance would be much appreciated! > > Thank you, > > Chris > > > > > > Full file: > > > > MAP > > EXTENT -74.047185 40.679548 -73.907005 > 40.882078 > > SIZE 400 300 > > > > PROJECTION > > "init=epsg:4269" > > END > > > > WEB > > TEMPLATE "tigermap.html" > > IMAGEPATH > > "/Library/WebServer/Documents/tigertest/tmp/" > > IMAGEURL "/tigertest/tmp/" > > END > > > > OUTPUTFORMAT > > NAME swf > > DRIVER "SWF" > > MIMETYPE > "application/x-shockwave-flash" > > EXTENSION "swf" > > IMAGEMODE PC256 > > FORMATOPTION "OUTPUT_MOVIE=SINGLE" > > END > > > > IMAGETYPE swf > > > > > > > > LAYER > > NAME Complete_Chain > > TYPE LINE > > STATUS DEFAULT > > CONNECTIONTYPE OGR > > CONNECTION > > "/Library/WebServer/Documents/tigertest/tgr36061" > > CLASS > > COLOR 153 102 0 > > END > > END # Layer > > END > > > > -- > ---------------------------------------------------------------- > Assefa Yewondwossen > Software Analyst > > Email: assefa at dmsolutions.ca > http://www.dmsolutions.ca/ > > Phone: (613) 565-5056 (ext 14) > Fax: (613) 565-0925 > ---------------------------------------------------------------- > From woodbri at SWOODBRIDGE.COM Wed Apr 20 11:47:39 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Wed, 20 Apr 2005 14:47:39 -0400 Subject: consolidation of .map file contents In-Reply-To: Message-ID: All of your ideas are valid and can work depending on what you are try to accomplish. I know Ed at Topozone.com is using template mapfile fragments and using the cpp and Makefiles to generate a large number of mapfiles based on change the DEFINES. That way if you need to make a change to a section that is in all your mapfiles you just change one file and type make. But before you solve the technology, you might want to describe why you need 200 mapfiles and what type of things are changing from one to the other. There might be much better solutions. -Steve W. Dylan Beaudette wrote: > Hi everyone, > > We have been using Mapserver for about a year now with a great deal of > success on small projects (i.e. single map file, single html template, > single query template). > > Now that we are considering a more complicated project with nearly 200 > .map files and their associated html templates and query templates - > quite a bit to manage should any cosmetic changes need to be made in > the map files. > > Is there any way to "include" bits of a central map file to consolidate > the configuration of such a large project, or would it be better to use > a single .map file, customizing it through the URL passed to it... > > ...or is phpmapscript a viable option? > > thanks in advancce for any ideas! > > > > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group > University of California at Davis > 530.754.7341 > From manninside at YAHOO.COM Wed Apr 20 12:09:31 2005 From: manninside at YAHOO.COM (Mandar sarlashkar) Date: Wed, 20 Apr 2005 12:09:31 -0700 Subject: Problem diplaying PostGIS layer. Postgres and Mapserver have been setup on separate Machines In-Reply-To: 6667 Message-ID: Thank you Mr. Giridhar and Shashi. Before I check the things that you have asked me to... I would like to ask one thing... The machines on which Mapserver and Postgres are running, are in the same network but the IP Adds are not static. Is it the problem ? Does Postgres denies access because the machine on which it is running has non-static IP add. ? Thank you. Bye for now __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill at BINKO.NET Wed Apr 20 12:20:40 2005 From: bill at BINKO.NET (Bill Binko) Date: Wed, 20 Apr 2005 15:20:40 -0400 Subject: Problem diplaying PostGIS layer. Postgres and Mapserver have been setup on separate Machines In-Reply-To: <5f447e3505042009316381f34d@mail.gmail.com> Message-ID: I believe your problem is in your DATA line. LAYER NAME "qru_fnl1" CONNECTIONTYPE postgis CONNECTION "user=root password=c3n5u5 dbname=census host=localhost" DATA "the_geom from qry1 using srid=-1" ... I assume that qry1 is a view, but you're mixing the two formats for PostGIS's DATA line. You can either do: DATA "the_geom from table" (and it must really be a table) or DATA "the_geom from (select uniqueId, the_geom from qry1) as subQ using unique uniqueId using srid=-1" The reason's simple, but not really well documented. Mapserver needs the following to draw: 1) the shape's column 2) the srid 3) a unique ID for the shape If you use the simple table format, it can use the oid of the table as the unique id, and lookup the srid from the OGC standard geometry_columns metadata table. If you use a view, you need to specify the uniqueID and the srid, because the view doesn't have an oid (unless you pull it from another table) and isn't listed in the geometry_columns table. Hope this helps Bill From assefa at DMSOLUTIONS.CA Wed Apr 20 12:38:02 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Wed, 20 Apr 2005 15:38:02 -0400 Subject: SWF OUTPUT_MOVIE=SINGLE resolution? In-Reply-To: <20050420183905.96253.qmail@web60506.mail.yahoo.com> Message-ID: If you could provide a sample test data and map file with the problem I can look at it. Or even better you could create a bug and attach the data to that bug. I have tried the fuctionnality with my sample data using mapserver 4.4.2 (and also the cvs version) but I could not reproduce the error. Later, Chris Hackel wrote: > No.. there's no labels in that layer. > Just to test, I changed the mapfile below to: > LAYER > NAME Complete_Chain > TYPE LINE > STATUS DEFAULT > CONNECTIONTYPE OGR > CONNECTION > "/Library/WebServer/Documents/tigertest/tgr36061" > CLASS > COLOR 153 102 0 > LABEL > TYPE TRUETYPE > FONT arial-bold > END > END > END # Layer > > and it still doesn't work. > Any ideas? > > Thanks, > Chris > > > --- Yewondwossen Assefa wrote: > >>Chris, >> >> Is this a problem with layers containing labels ? >>Can you disable >>layers with labels and try it again with >>OUTPUT_MOVIE=SINGLE ? >>Basically if you want to use OUTPUT_MOVIE=SINGLE, >>you need to use true >>type fonts instead of FDB fonts as explained in the >>post. >> >>Later, >> >>Chris Hackel wrote: >> >>>Outputting SWF, when I set OUTPUT_MOVIE=SINGLE I >> >>get >> >>>an empty movie. When it's MULTIPLE it works fine. >> >>This >> >>>problem was described here: >>> >> > http://lists.gis.umn.edu/pipermail/mapserver-dev/2004-June/001112.html > >>>but I could not find any sort of resolution. I'm >> >>using >> >>>mapserver 4.4.2. >>> >>>Any assistance would be much appreciated! >>>Thank you, >>>Chris >>> >>> >>>Full file: >>> >>>MAP >>> EXTENT -74.047185 40.679548 -73.907005 >> >>40.882078 >> >>> SIZE 400 300 >>> >>> PROJECTION >>> "init=epsg:4269" >>> END >>> >>> WEB >>> TEMPLATE "tigermap.html" >>> IMAGEPATH >>>"/Library/WebServer/Documents/tigertest/tmp/" >>> IMAGEURL "/tigertest/tmp/" >>> END >>> >>> OUTPUTFORMAT >>> NAME swf >>> DRIVER "SWF" >>> MIMETYPE >> >>"application/x-shockwave-flash" >> >>> EXTENSION "swf" >>> IMAGEMODE PC256 >>> FORMATOPTION "OUTPUT_MOVIE=SINGLE" >>> END >>> >>> IMAGETYPE swf >>> >>> >>> >>> LAYER >>> NAME Complete_Chain >>> TYPE LINE >>> STATUS DEFAULT >>> CONNECTIONTYPE OGR >>> CONNECTION >>>"/Library/WebServer/Documents/tigertest/tgr36061" >>> CLASS >>> COLOR 153 102 0 >>> END >>> END # Layer >>>END >>> >> >>-- >> > > ---------------------------------------------------------------- > >>Assefa Yewondwossen >>Software Analyst >> >>Email: assefa at dmsolutions.ca >>http://www.dmsolutions.ca/ >> >>Phone: (613) 565-5056 (ext 14) >>Fax: (613) 565-0925 >> > > ---------------------------------------------------------------- > > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From nunoragil at GMAIL.COM Wed Apr 20 13:21:44 2005 From: nunoragil at GMAIL.COM (Nuno Gil) Date: Wed, 20 Apr 2005 21:21:44 +0100 Subject: wms capabilities and mapfile scale correspondence Message-ID: Dear listers, Can someone guide me on the correspondence between the WMS capabilities scale hint value and the scalemax/scalemin value in the mapfile? Regards, Nuno From dylan at IICI.NO-IP.ORG Wed Apr 20 14:10:51 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Wed, 20 Apr 2005 14:10:51 -0700 Subject: consolidation of .map file contents In-Reply-To: <4266A3CB.4070802@swoodbridge.com> Message-ID: Steve, Thanks for the input. To clarify a bit, we have county -by-county information, with associated data in a MySQL database that is accessed via Mapserver-style query templates and PHP. There are 2 current reasons why each county has its own .map file (and they might not even be very good ones, i hope!): 1. each map obviously has a different: -context map image -geographic extent -shape file for the main content, rendered according to the county 2. the query results need to contain a unique county ID a lot of these problems could be resolved if i could figure out how to pass mapserver configuration parameters in the URL: i.e. the county ID, the geographic extent, and the name of the shape file containing the main content for that county. does this seem reasonable? thanks! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 On Wednesday 20 April 2005 11:47 am, Stephen Woodbridge wrote: > All of your ideas are valid and can work depending on what you are try > to accomplish. I know Ed at Topozone.com is using template mapfile > fragments and using the cpp and Makefiles to generate a large number of > mapfiles based on change the DEFINES. That way if you need to make a > change to a section that is in all your mapfiles you just change one > file and type make. > > But before you solve the technology, you might want to describe why you > need 200 mapfiles and what type of things are changing from one to the > other. There might be much better solutions. > > -Steve W. > > Dylan Beaudette wrote: > > Hi everyone, > > > > We have been using Mapserver for about a year now with a great deal of > > success on small projects (i.e. single map file, single html template, > > single query template). > > > > Now that we are considering a more complicated project with nearly 200 > > .map files and their associated html templates and query templates - > > quite a bit to manage should any cosmetic changes need to be made in > > the map files. > > > > Is there any way to "include" bits of a central map file to consolidate > > the configuration of such a large project, or would it be better to use > > a single .map file, customizing it through the URL passed to it... > > > > ...or is phpmapscript a viable option? > > > > thanks in advancce for any ideas! > > > > > > > > -- > > Dylan Beaudette > > Soils and Biogeochemistry Graduate Group > > University of California at Davis > > 530.754.7341 From bdavis at USGS.GOV Wed Apr 20 13:48:53 2005 From: bdavis at USGS.GOV (Brian Davis) Date: Wed, 20 Apr 2005 15:48:53 -0500 Subject: newbie needs help correcting distorted map Message-ID: However, ...... I have been struggling with projection, extents, and size for a couple of days now. When I zoom in to a map, the four corner points of my rubber-band box are the new corners for the data displayed in my 400x200 browser space. So, if I define an area that is 2:1 in x size to y size, I zoom in as expected. But when defining space that is not this 2:1 rectangular ratio, the data gets stretched/contracted/distorted to fit that space, because the corners of my new definition become the drawn corners, instead of extra data in either the x or y direction being used to fill the the remaining area. Previously, interfacing to mapserver 4.0.2 on a Windows platform worked just fine. Currently, interfacing to mapserver 4.4.1 on a Red Hat Enterprise server shows these symptoms. I changed NONE of the html, js, or java, except all I did was point to a new url with the linux mapserv, and the corresponding new location for the .map file. Is there a platform-dependency I am not worrying about correctly? Is there a version-dependency I am not worrying about correctly? Perhaps the answer is to point me at the correct discussion thread dealing with these issues? I couldn't find anything useful after a few searches, so thought I would send out a post while I'm still looking. Thanks! Here are the relevant snippets from my .map file: EXTENT -180.000 -90.000 180.000 90.000 SIZE 400 200 TRANSPARENT ON UNITS DD PROJECTION proj=longlat ellps=WGS84 datum=WGS84 no_defs "init=epsg:4326" END On Tue, 12 Oct 2004 17:08:05 -0400, Ed McNierney wrote: >Mike - > >Because MapServer supports projections defined parametrically (i.e. by specifying the family of projection and its parameters), it - practically speaking - supports any projection you want. The European Petroleum Survey Group (EPSG) maintains a database of projections with a unique integer ID associated with each (the "EPSG code") and several products (including MapServer) support this "shorthand" way of describing projections. "EPSG:4326" is EPSG code 4326, which is the "decimal degrees, WGS84 datum" projection. > >If YOU don't know what projection you want, it's hard for any of us to know. It sounds like you might be best served by just living with the "geographic" projection you're using for a while, until you better understand what you want. > >Read the MapServer documentation to learn more about extents. Normally, a MapServer request will include the extents (in the coordinates of the output map projection). > >Finally, please ALWAYS reply to the group. This allows others to participate in the discussion (the first person to answer your first question may not know the answers to all your questions), allows others to learn from the information so the question doesn't need to be asked again, puts the answers in the archives, and prevents the first person to reply from feeling like they've acquired a personal lifetime support commitment just because they answered one question . > > - Ed > >----- Original Message ----- >From: Mike Jackson >To: Ed McNierney >Sent: Tue, 12 Oct 2004 18:22:06 -0400 >Subject: Re: [UMN_MAPSERVER-USERS] newbie needs help correcting distorted map > > >> Ed McNierney wrote: >> >> >Mike - >> > >> >It sounds like nothing's wrong at all, except your choice of output projection. >> The "geographic" projection has MANY limitations, including the fact that it >> badly distorts areas far from the Equator. But all projections have strong >> points and weak points - that's why there are several to choose from. >> > >> > >> > >> How do I tell which projection mapserver is using? Where is the list of >> supported projections? >> >> >You should try to do some research on what a good output projection would be. >> If you're particularly interested in northern Europe, then look for the >> projections that are popular in those countries. You can then change the >> MAP-level PROJECTION, UNITS, and EXTENT to reflect the *output* projection you >> want, while leaving the LAYER definitions alone, since those do accurately >> describe the *input* projection of your source data. >> > >> > >> >> I researched for a while and came up empty. Perhaps I don't know the >> keywords to search for. >> >> If a shapefile mentions an extent, then how can I know how to determine >> an arbitrary extent that I would like to see? For example, what would >> the extent be if I wanted to view Great Britain? >> >> Thanks, >> Mike >> >> From woodbri at SWOODBRIDGE.COM Wed Apr 20 14:38:57 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Wed, 20 Apr 2005 17:38:57 -0400 Subject: consolidation of .map file contents In-Reply-To: <200504201410.51209.dylan@iici.no-ip.org> Message-ID: Dylan Beaudette wrote: > Steve, > > Thanks for the input. To clarify a bit, we have county -by-county information, > with associated data in a MySQL database that is accessed via Mapserver-style > query templates and PHP. > > There are 2 current reasons why each county has its own .map file (and they > might not even be very good ones, i hope!): > > 1. each map obviously has a different: > -context map image > -geographic extent > -shape file for the main content, rendered according to the county One question is why not make all your counties as a seamless map using a tileindex. I have 3300+ counties of Tiger data and each county is a directory of about 10 separate shapefiles for each of the layers. You can do the same for images depending on projection issues. http://imaptools.com/tiger/ http://imaptools.com/tiger2/ (Googlesque styling) You may have reasons why you don't what to tile the counties, and you could change the shapefile on the fly using mapscript. As for geographic extents, you already have a way to select the county, it would be pretty straight forward to load the extents of each county into a table and then look up the extents after the county has been selected and then position the map based on those extents. Create a table like: County_ID | State | County_Name | Shapefile | minx | miny | maxx | maxy > 2. the query results need to contain a unique county ID > > a lot of these problems could be resolved if i could figure out how to pass > mapserver configuration parameters in the URL: i.e. the county ID, the > geographic extent, and the name of the shape file containing the main content > for that county. You can edit most stuff in the mapfile via the URL. If you had the table of extents you could add the county ID, all my Tiger county polygons have a unique FIPS id like 25017 for Middlesex County, MA. The 25 is actually the FIPS code for MA. Do you have anything like that in the shapefile attributes? > does this seem reasonable? It all sounds very reasonable, and if you are using mapscript then it should be all the more easy to do these things. In mapscript if you didn't want your counties tiled, then you could change the shapefile in mapscript based on the county you selected. There should be example around for most of the pieces mentioned above. Ask the list for any specific issues and I'm sure you'll get the help you need. -Steve W. > thanks! > > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group > University of California at Davis > 530.754.7341 > > On Wednesday 20 April 2005 11:47 am, Stephen Woodbridge wrote: > >>All of your ideas are valid and can work depending on what you are try >>to accomplish. I know Ed at Topozone.com is using template mapfile >>fragments and using the cpp and Makefiles to generate a large number of >>mapfiles based on change the DEFINES. That way if you need to make a >>change to a section that is in all your mapfiles you just change one >>file and type make. >> >>But before you solve the technology, you might want to describe why you >>need 200 mapfiles and what type of things are changing from one to the >>other. There might be much better solutions. >> >>-Steve W. >> >>Dylan Beaudette wrote: >> >>>Hi everyone, >>> >>>We have been using Mapserver for about a year now with a great deal of >>>success on small projects (i.e. single map file, single html template, >>>single query template). >>> >>>Now that we are considering a more complicated project with nearly 200 >>>.map files and their associated html templates and query templates - >>>quite a bit to manage should any cosmetic changes need to be made in >>>the map files. >>> >>>Is there any way to "include" bits of a central map file to consolidate >>>the configuration of such a large project, or would it be better to use >>>a single .map file, customizing it through the URL passed to it... >>> >>>...or is phpmapscript a viable option? >>> >>>thanks in advancce for any ideas! >>> >>> >>> >>>-- >>>Dylan Beaudette >>>Soils and Biogeochemistry Graduate Group >>>University of California at Davis >>>530.754.7341 > > From ed at TOPOZONE.COM Wed Apr 20 16:44:00 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Wed, 20 Apr 2005 19:44:00 -0400 Subject: consolidation of .map file contents Message-ID: Dylan - Steve's suggestions are quite reasonable. As he mentioned, I use the C preprocessor to manage the generation of .map files. The use of #define and #include directives is especially helpful when you have a large number of attributes you want to keep consistent across layers. For example, I might have a "street map" that's made up of several different LAYERs (interstate highways, state highways, local roads, etc., etc.). Each of them might have labels using fonts of a particular style and size. If I use a statement like: #define STREETFACE "Arial" #define STREETSIZE 10 Then it's easy for me to change the typeface or size of all those layers at once, keeping them consistent. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Stephen Woodbridge Sent: Wednesday, April 20, 2005 5:39 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] consolidation of .map file contents Dylan Beaudette wrote: > Steve, > > Thanks for the input. To clarify a bit, we have county -by-county > information, with associated data in a MySQL database that is accessed > via Mapserver-style query templates and PHP. > > There are 2 current reasons why each county has its own .map file (and > they might not even be very good ones, i hope!): > > 1. each map obviously has a different: > -context map image > -geographic extent > -shape file for the main content, rendered according to the county One question is why not make all your counties as a seamless map using a tileindex. I have 3300+ counties of Tiger data and each county is a directory of about 10 separate shapefiles for each of the layers. You can do the same for images depending on projection issues. http://imaptools.com/tiger/ http://imaptools.com/tiger2/ (Googlesque styling) You may have reasons why you don't what to tile the counties, and you could change the shapefile on the fly using mapscript. As for geographic extents, you already have a way to select the county, it would be pretty straight forward to load the extents of each county into a table and then look up the extents after the county has been selected and then position the map based on those extents. Create a table like: County_ID | State | County_Name | Shapefile | minx | miny | maxx | maxy > 2. the query results need to contain a unique county ID > > a lot of these problems could be resolved if i could figure out how to > pass mapserver configuration parameters in the URL: i.e. the county > ID, the geographic extent, and the name of the shape file containing > the main content for that county. You can edit most stuff in the mapfile via the URL. If you had the table of extents you could add the county ID, all my Tiger county polygons have a unique FIPS id like 25017 for Middlesex County, MA. The 25 is actually the FIPS code for MA. Do you have anything like that in the shapefile attributes? > does this seem reasonable? It all sounds very reasonable, and if you are using mapscript then it should be all the more easy to do these things. In mapscript if you didn't want your counties tiled, then you could change the shapefile in mapscript based on the county you selected. There should be example around for most of the pieces mentioned above. Ask the list for any specific issues and I'm sure you'll get the help you need. -Steve W. > thanks! > > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group University of California at > Davis > 530.754.7341 > > On Wednesday 20 April 2005 11:47 am, Stephen Woodbridge wrote: > >>All of your ideas are valid and can work depending on what you are try >>to accomplish. I know Ed at Topozone.com is using template mapfile >>fragments and using the cpp and Makefiles to generate a large number >>of mapfiles based on change the DEFINES. That way if you need to make >>a change to a section that is in all your mapfiles you just change one >>file and type make. >> >>But before you solve the technology, you might want to describe why >>you need 200 mapfiles and what type of things are changing from one >>to the other. There might be much better solutions. >> >>-Steve W. >> >>Dylan Beaudette wrote: >> >>>Hi everyone, >>> >>>We have been using Mapserver for about a year now with a great deal >>>of success on small projects (i.e. single map file, single html >>>template, single query template). >>> >>>Now that we are considering a more complicated project with nearly >>>200 .map files and their associated html templates and query >>>templates - quite a bit to manage should any cosmetic changes need to >>>be made in the map files. >>> >>>Is there any way to "include" bits of a central map file to >>>consolidate the configuration of such a large project, or would it be >>>better to use a single .map file, customizing it through the URL passed to it... >>> >>>...or is phpmapscript a viable option? >>> >>>thanks in advancce for any ideas! >>> >>> >>> >>>-- >>>Dylan Beaudette >>>Soils and Biogeochemistry Graduate Group University of California at >>>Davis >>>530.754.7341 > > From jacob.delfos at MAUNSELL.COM Wed Apr 20 17:12:16 2005 From: jacob.delfos at MAUNSELL.COM (Jacob Delfos) Date: Thu, 21 Apr 2005 08:12:16 +0800 Subject: Problem diplaying PostGIS layer. Postgres and Mapserver have been setup on separate Machines Message-ID: Mandar, I'm by no means an expert, but you mentioned you have postgres and mapserver on separate machines. Yet in your data statement, you use "localhost" as a host. "Localhost" means it tries to access PostGIS on the same machine as where mapserver sits. I don't think that will work. If you want to use variable IP, you will need to use the IP-name to have the machines access eachother. If they're on the same network, just the machine name will do (e.g. pc100). regards, Jacob -------------------------------------------------------------------------------- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Mandar sarlashkar Sent: 21 April 2005 03:10 To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Problem diplaying PostGIS layer. Postgres and Mapserver have been setup on separate Machines Thank you Mr. Giridhar and Shashi. Before I check the things that you have asked me to... I would like to ask one thing... The machines on which Mapserver and Postgres are running, are in the same network but the IP Adds are not static. Is it the problem ? Does Postgres denies access because the machine on which it is running has non-static IP add. ? Thank you. Bye for now __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tom.Kralidis at EC.GC.CA Wed Apr 20 21:02:57 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Thu, 21 Apr 2005 00:02:57 -0400 Subject: wms capabilities and mapfile scale correspondence Message-ID: The MAXSCALE and MINSCALE objects in the LAYER object, if set, are visible in the output WMS GetCapabilities XML response in the Layer/ScaleHint/@min and Layer/ScaleHint/@max attributes, which provides a client a good 'hint' of what scale the layer will view for. ..Tom > -----Original Message----- > From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Nuno Gil > Sent: Wednesday, 20 April, 2005 16:22 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: [UMN_MAPSERVER-USERS] wms capabilities and mapfile > scale correspondence > > > Dear listers, > Can someone guide me on the correspondence between the WMS > capabilities scale hint value and the scalemax/scalemin value > in the mapfile? > > Regards, > Nuno > From covariance at SHAW.CA Wed Apr 20 21:07:06 2005 From: covariance at SHAW.CA (Bob Bruce) Date: Wed, 20 Apr 2005 23:07:06 -0500 Subject: UNIX Fonts? Message-ID: I am not knowledgeable about UNIX systems and am hoping that someone can help me. I am in the process of migrating my MapServer MapScript pages to a UNIX server from my Windows 2000 system and am having problems with fonts. I don't know where to get the equivalent fonts to the ones that I have been using on my Windows system and the manager of my hosting provider doesn't seem to know this either. Can someone tell me how to go about getting fonts for the UNIX system? thanks, Bob Bruce, Winnipeg, Manitoba From stigmata_blackangel at YAHOO.COM Wed Apr 20 21:36:58 2005 From: stigmata_blackangel at YAHOO.COM (Gregor Mosheh) Date: Wed, 20 Apr 2005 21:36:58 -0700 Subject: UNIX Fonts? In-Reply-To: 6667 Message-ID: --- Bob Bruce wrote: > Can someone tell me how to go about getting fonts > for the UNIX system? Truetype fonts are just the .TTF files. You can simply copy the ones from your c:\windows\fonts directory, or go to any of the font websites out there. (You may want to check the copyrights. Most of Windows' fonts are copyrighted, and I don't know the legality of using them on a server.) __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From nacional at CBS.UMN.EDU Wed Apr 20 22:33:18 2005 From: nacional at CBS.UMN.EDU (Pericles S. Nacionales) Date: Thu, 21 Apr 2005 00:33:18 -0500 Subject: UNIX Fonts? In-Reply-To: Message-ID: Bob, If you are using the core Microsoft fonts (arial, times new roman, courier new, verdana, etc.) then you can copy those fonts to your Unix machine. You might want to have a look at Microsoft's license on the use of their fonts. I don't know about the licenses of any other Windows truetype fonts so you also might want to go back and read them before you make copies. In general, many of these licenses only prevent you from modifying the fonts and/or selling them--no problem since you're only using it to display labels. There are some free (I'm using the word loosely) fonts that you can use on Unix/Linux--Bitstream has the Vera fonts which is used by Gnome (http://www.gnome.org/fonts/), SIL International has Gentium (http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=Gentium_download), Bigelow and Holmes has the Luxi fonts, and there are others. The use of truetype fonts in MapServer is the same for Windows as for Unix/Linux and Mac. You don't need to install them on a system directory (e.g. /usr/share/fonts c:\windows\fonts) but you can put them in some other directory along with your MapServer font list (see http://mapserver.gis.umn.edu/fontset.html). Cheers! -Perry On Wednesday 20 April 2005 11:07 pm, Bob Bruce wrote: > I am not knowledgeable about UNIX systems and am hoping that someone can > help me. I am in the process of migrating my MapServer MapScript pages to a > UNIX server from my Windows 2000 system and am having problems with fonts. > I don't know where to get the equivalent fonts to the ones that I have been > using on my Windows system and the manager of my hosting provider doesn't > seem to know this either. Can someone tell me how to go about getting fonts > for the UNIX system? > > thanks, > Bob Bruce, Winnipeg, Manitoba -- Pericles S. Nacionales Dept. of Ecology, Evolution, and Behavior University of Minnesota work: 612 624 6713 e-mail: nacional at cbs.umn.edu From jbarong at HOTMAIL.COM Thu Apr 21 01:35:09 2005 From: jbarong at HOTMAIL.COM (Juan Baron) Date: Thu, 21 Apr 2005 03:35:09 -0500 Subject: box zooming Message-ID: Hello: Is possible to do box zooming without applet? Thank's From BEN at SYNCERA-ITSOLUTIONS.NL Thu Apr 21 01:37:14 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Thu, 21 Apr 2005 10:37:14 +0200 Subject: box zooming Message-ID: Have a look at DBox, eg: http://www.dnr.state.mn.us/maps/landview_dhtml_x.html Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Juan Baron 04/21/05 10:35am >>> Hello: Is possible to do box zooming without applet? Thank's From juergen.link at BGS-AG.DE Thu Apr 21 02:07:04 2005 From: juergen.link at BGS-AG.DE (Jürgen Link) Date: Thu, 21 Apr 2005 11:07:04 +0200 Subject: Missing namespace definition in DescribeFeatureType Message-ID: Folks, we use mapserver 4.4.1 on a linux box to provide a wfs server. The GML output does not validate due to an invalid schema file: The problem is a lack of namespace definition in the element. I found other postings on this list with valid schema output, so it's most probably a misconfiguration of our map server. What could we have done wrong?? Thanks in advance J?rgen -- Dr. J?rgen Link BGS Systemplanung AG http://www.bgs-ag.de E-Mail juergen.link at bgs-ag.de Phone: 02241 166-530 Fax: 02241 166-680 Mobile: 0160 97262616 From jbarong at HOTMAIL.COM Thu Apr 21 03:07:51 2005 From: jbarong at HOTMAIL.COM (Juan Baron) Date: Thu, 21 Apr 2005 05:07:51 -0500 Subject: Distance measuring Message-ID: Hi list: Is possible to do distance measuring without applet? Thank's From superbla3000 at GMX.NET Thu Apr 21 03:37:10 2005 From: superbla3000 at GMX.NET (joerg pfeiffer) Date: Thu, 21 Apr 2005 12:37:10 +0200 Subject: where can I buy nice maps? Message-ID: hello, I know meanwhile some free sites, but now it seems I have to buy some maps. I am searching vector maps for North Italy, Greece, Portugal and some more in the near future. I need 'normal' details, like big streets, city outlines, hill shading maybe.... It would be nice to have one mapstyle, so I think I need one seller. Where can I buy such maps? best regards, Joerg From BEN at SYNCERA-ITSOLUTIONS.NL Thu Apr 21 03:56:53 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Thu, 21 Apr 2005 12:56:53 +0200 Subject: Distance measuring Message-ID: Yes it is, eg using DBox, or using Chameleon. DBox (Measure on/off in the lower left corner): http://www.dnr.state.mn.us/maps/landview_dhtml_x.html Chameleon: http://chameleon.maptools.org/ Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Juan Baron 04/21/05 12:07pm >>> Hi list: Is possible to do distance measuring without applet? Thank's From Gail.Millin at MANCHESTER.AC.UK Thu Apr 21 04:28:42 2005 From: Gail.Millin at MANCHESTER.AC.UK (Gail Millin) Date: Thu, 21 Apr 2005 06:28:42 -0500 Subject: WCS no image as yet! Message-ID: Dear MapServer Users, I am trying to get the WCS working and have managed so far to produce a GETCAPABILITIES Request for WCS (see url) http://camber.mc.man.ac.uk/cgi-bin/mapserv.exe? map=c:\Inetpub\wwwroot\MIMAS\wcs_mimas_mosaic.map&SERVICE=WCS&REQUEST=GetCap abilities I am now trying to figure out how to get the GetCoverage request to work, http://camber.mc.man.ac.uk/cgi-bin/mapserv.exe? REQUEST=GetCoverage&COVERAGE=Landsat7Mosaic15m&SERVICE=WCS&map=c:\Inetpub\ww wroot\MIMAS\wms_mimas_mosaic.map&&BBOX=0,0,700005,1050000&FORMAT=ECW&CRS=EPS G:27700&RESX=10&RESY=10 So far I get a message saying CGI ERROR 'The specified CGI application misbehaved by not returning a complete set of HTTP headers' - Does anyone know what is wrong? What format does the raster data need to be in for WCS to work? At the moment the raster imagery is in ER Mapper ECW format, this is the same format I used for WMS which works fine. - Also do I need to change/add something to the MapServer configuration in some way to resolve the CGI error WCS is new to me so any help would be greatly appreciated. Kind Regards Gail From nbarker at RSINC.COM Thu Apr 21 05:03:58 2005 From: nbarker at RSINC.COM (Norman Barker) Date: Thu, 21 Apr 2005 13:03:58 +0100 Subject: WCS no image as yet! Message-ID: -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of Gail Millin Sent: Thursday, April 21, 2005 12:29 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] WCS no image as yet! Dear MapServer Users, I am trying to get the WCS working and have managed so far to produce a GETCAPABILITIES Request for WCS (see url) http://camber.mc.man.ac.uk/cgi-bin/mapserv.exe? map=c:\Inetpub\wwwroot\MIMAS\wcs_mimas_mosaic.map&SERVICE=WCS&REQUEST=GetCap abilities I am now trying to figure out how to get the GetCoverage request to work, http://camber.mc.man.ac.uk/cgi-bin/mapserv.exe? REQUEST=GetCoverage&COVERAGE=Landsat7Mosaic15m&SERVICE=WCS&map=c:\Inetpub\ww wroot\MIMAS\wms_mimas_mosaic.map&&BBOX=0,0,700005,1050000&FORMAT=ECW&CRS=EPS G:27700&RESX=10&RESY=10 So far I get a message saying CGI ERROR 'The specified CGI application misbehaved by not returning a complete set of HTTP headers' - Does anyone know what is wrong? What format does the raster data need to be in for WCS to work? At the moment the raster imagery is in ER Mapper ECW format, this is the same format I used for WMS which works fine. - Also do I need to change/add something to the MapServer configuration in some way to resolve the CGI error WCS is new to me so any help would be greatly appreciated. Kind Regards Gail Hi Gail, I tried the following request on your server http://camber.mc.man.ac.uk/cgi-bin/mapserv.exe?map=c:\Inetpub\wwwroot\MIMAS\wcs_mimas_mosaic.map&SERVICE=WCS&REQUEST=GetCoverage&Coverage=Landsat7Mosaic15m&FORMAT=ECW&BBOX=-8,50,-6,52&CRS=EPSG:4326&WIDTH=2000&HEIGHT=2000 and I got an ECW image back which I checked with gdalinfo and it look ok, but looking with openev the image was blank!! With your request I get the same error as you. I guess it is an error with your setting up of the bounding box in the map request. There is an open bug against the WCS (correct me if I am wrong) that when you do a reprojection of an image causes the image to be black (quite amusing when translating DEMS!!). If you can sort out the following in the describeCoverage (created from the map file) 0 0 700005 1.05e+006 I think you will be fine. Interesting that you are doing a Landsat WCS here in the UK (there are a couple now), any chance you can drop me a line telling me about it? thanks, Norman Barker From bobbyfung at HOTMAIL.COM Thu Apr 21 05:43:36 2005 From: bobbyfung at HOTMAIL.COM (Libo Feng) Date: Thu, 21 Apr 2005 07:43:36 -0500 Subject: Create a shapefile using Java Mapscript Message-ID: I am a newbie to Java mapscript and in my project, I need to dynamically create a shape file that contains a point. The coordinate of that point is from an address matching web service. I am able to create the .shp, .shx files with the mapscript and a .dbf file with Javadbf. But the .shp and .shx seem to be empty - when I open it with ArcExplorer, there is no point at all. The following is the code: shapefileObj civicAddressShp = new shapefileObj(shapeFile, mapscriptConstants.MS_SHAPEFILE_POINT); pointObj addressPoint = new pointObj(x, y, 0.0, Double.MIN_VALUE); civicAddressShp.addPoint(addressPoint); Did I miss anything? Thanks! From bdavis at USGS.GOV Thu Apr 21 06:23:26 2005 From: bdavis at USGS.GOV (Brian Davis) Date: Thu, 21 Apr 2005 08:23:26 -0500 Subject: Version 4.4.1 dependency and/or linux platform dependency? Message-ID: I originally posted this under a reply to a problem with distorted maps. This is the same text, under a new subject with version and platform dependency type words: I have been struggling with projection, extents, and size for a couple of days now. When I zoom in to a map, the four corner points of my rubber-band box are the new corners for the data displayed in my 400x200 browser space. So, if I define an area that is 2:1 in x size to y size, I zoom in as expected. But when defining space that is not this 2:1 rectangular ratio, the data gets stretched/contracted/distorted to fit that space, because the corners of my new definition become the drawn corners, instead of extra data in either the x or y direction being used to fill the the remaining area. Previously, interfacing to mapserver 4.0.2 on a Windows platform worked just fine. Currently, interfacing to mapserver 4.4.1 on a Red Hat Enterprise server shows these symptoms. I changed NONE of the html, js, or java, except all I did was point to a new url with the linux mapserv, and the corresponding new location for the .map file. Is there a platform-dependency I am not worrying about correctly? Is there a version-dependency I am not worrying about correctly? Perhaps the answer is to point me at the correct discussion thread dealing with these issues? I couldn't find anything useful after a few searches, so thought I would send out a post while I'm still looking. Thanks! Here are the relevant snippets from my .map file: EXTENT -180.000 -90.000 180.000 90.000 SIZE 400 200 TRANSPARENT ON UNITS DD PROJECTION proj=longlat ellps=WGS84 datum=WGS84 no_defs "init=epsg:4326" END From lucamarle at GMAIL.COM Thu Apr 21 06:26:58 2005 From: lucamarle at GMAIL.COM (luca marletta) Date: Thu, 21 Apr 2005 15:26:58 +0200 Subject: Simple question Message-ID: Till now I've no experience with a real mapserver live application on a 24/7 server and, maybe I lost some passage, but I'm wondering if there is a simple and easy way to get rid of all images that fill the images directory. Sorry if is a very silly question but I miss this point Thanks in advance or your help luca -- luca marletta icq: 70590647 From justin at EXPERTRON.CO.ZA Thu Apr 21 06:24:42 2005 From: justin at EXPERTRON.CO.ZA (Justin Schoeman) Date: Thu, 21 Apr 2005 08:24:42 -0500 Subject: Mapserver crash with gd and antialiasing? Message-ID: Hi everybody, I am trying to use mapserver to render maps. The basic rendering works great, but antialiasing is giving me a lot of trouble. After finally figuring out to use TrueColour visuals (RGB instead of PC256) for PNG output in libgd (libgd 2.0.33), antialiasing started working _but_... Some lines cause mapserv (cgi interface) to die (probably a segfault, only 'Premature end of script headers: /var/www/cgi-bin/mapserv' gets logged). I have experienced this with CARTOLINE and ELIPSE styles. Without antialiasing everything works fine. With antialiasing it sometimes just dies... I am not sure exactly what lines trigger the problem though. I know that enabling antialiasing on some layers will cause mapserver to die at some scale factors... If anybody has any ideas on how to track further, please let me know ;-). This problem has been verified on mapserver version 4.4.1 and 4.4.2. Any help would be greatly appreciated. Thanks, Justin From David.Fawcett at STATE.MN.US Thu Apr 21 06:38:27 2005 From: David.Fawcett at STATE.MN.US (Fawcett, David) Date: Thu, 21 Apr 2005 08:38:27 -0500 Subject: Simple question Message-ID: Luca, Mapserver cannot do this for you, but it can be (and often is) done with utilities on your server. If you are on a Unix or Linux machine, you can use a cron job to do this. On Windows, you can use the scheduler. David. David Fawcett Minnesota Office of Environmental Assistance david.fawcett at moea.state.mn.us 651.215.0200 -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of luca marletta Sent: Thursday, April 21, 2005 8:27 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] Simple question Till now I've no experience with a real mapserver live application on a 24/7 server and, maybe I lost some passage, but I'm wondering if there is a simple and easy way to get rid of all images that fill the images directory. Sorry if is a very silly question but I miss this point Thanks in advance or your help luca -- luca marletta icq: 70590647 From lucamarle at GMAIL.COM Thu Apr 21 06:47:57 2005 From: lucamarle at GMAIL.COM (luca marletta) Date: Thu, 21 Apr 2005 15:47:57 +0200 Subject: Fwd: [UMN_MAPSERVER-USERS] Simple question In-Reply-To: <8b50201050421064543ff554a@mail.gmail.com> Message-ID: Thanks David, that was my question! It's easy do a cron job on linux but it's strange that there is not a purge option inside mapserver Thanks a gain -- luca marletta icq: 70590647 From sgillies at FRII.COM Thu Apr 21 06:49:43 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Thu, 21 Apr 2005 07:49:43 -0600 Subject: Create a shapefile using Java Mapscript In-Reply-To: Message-ID: On Apr 21, 2005, at 6:43 AM, Libo Feng wrote: > I am a newbie to Java mapscript and in my project, I need to > dynamically > create a shape file that contains a point. The coordinate of that > point is > from an address matching web service. I am able to create the .shp, > .shx > files with the mapscript and a .dbf file with Javadbf. But the .shp > and .shx > seem to be empty - when I open it with ArcExplorer, there is no point > at all. > > The following is the code: > > shapefileObj civicAddressShp = new shapefileObj(shapeFile, > > mapscriptConstants.MS_SHAPEFILE_POINT); > pointObj addressPoint = new pointObj(x, y, 0.0, Double.MIN_VALUE); > civicAddressShp.addPoint(addressPoint); > > > Did I miss anything? Thanks! > Yes, what you missed is that the point isn't written to the file on disk until the shapefileObj is "closed". The only way to close it is by triggering its destructor. It's awkward, but that's just the way it is. cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From jms4 at PO.CWRU.EDU Thu Apr 21 06:51:34 2005 From: jms4 at PO.CWRU.EDU (James Sohr) Date: Thu, 21 Apr 2005 08:51:34 -0500 Subject: Simple question Message-ID: This is my personal opinion, but I think the best way to get rid of the temporary images is to never create them in the first place. You can configure the mapserver CGI executable to output just a map image straight to the web browser (intead of it generating a temp image and outputting an HTML file). You can then use a plain HTML (or PHP or whatever other language you'd like) page that wraps around the image and is responsible only for passing paramaters to the MapServer CGI and updating the map image. Thus, you create no temp images, and there is no need to reload the whole page to update the map-- you only need to reload the map image. This is how most of the major map websites do it... On Thu, 21 Apr 2005 15:26:58 +0200, luca marletta wrote: >Till now I've no experience with a real mapserver live application on >a 24/7 server and, maybe I lost some passage, but I'm wondering if >there is a simple and easy way to get rid of all images that fill the >images directory. > >Sorry if is a very silly question but I miss this point > >Thanks in advance or your help > >luca >-- >luca marletta icq: 70590647 From juergen.link at BGS-AG.DE Thu Apr 21 07:04:06 2005 From: juergen.link at BGS-AG.DE (Jürgen Link) Date: Thu, 21 Apr 2005 16:04:06 +0200 Subject: Antwort: [UMN_MAPSERVER-USERS] Mapserver crash with gd and antialiasing? Message-ID: Justin, you may want to invoke mapserver on the command line: mapserv "QUERY_STRING=" Replace by your actual query string from your actual URL (i.e. the stuff behind the question mark). Output goes to stdout and you'll maybe see some hints. You may also want to set the "DEBUG ON" option in your map file to make output verbose. J?rgen -- Dr. J?rgen Link BGS Systemplanung AG http://www.bgs-ag.de E-Mail juergen.link at bgs-ag.de Phone: 02241 166-530 Fax: 02241 166-680 Mobile: 0160 97262616 |---------+-------------------------------> | | Justin Schoeman | | | | | | Gesendet von: UMN | | | MapServer Users List| | | | | | | | | | | | 21.04.2005 15:24 | | | Bitte antworten an | | | Justin Schoeman | | | | |---------+-------------------------------> >---------------------------------------------------------------------------------------------------------------------------------------------| | | | An: MAPSERVER-USERS at LISTS.UMN.EDU | | Kopie: | | Thema: [UMN_MAPSERVER-USERS] Mapserver crash with gd and antialiasing? | >---------------------------------------------------------------------------------------------------------------------------------------------| Hi everybody, I am trying to use mapserver to render maps. The basic rendering works great, but antialiasing is giving me a lot of trouble. After finally figuring out to use TrueColour visuals (RGB instead of PC256) for PNG output in libgd (libgd 2.0.33), antialiasing started working _but_... Some lines cause mapserv (cgi interface) to die (probably a segfault, only 'Premature end of script headers: /var/www/cgi-bin/mapserv' gets logged). I have experienced this with CARTOLINE and ELIPSE styles. Without antialiasing everything works fine. With antialiasing it sometimes just dies... I am not sure exactly what lines trigger the problem though. I know that enabling antialiasing on some layers will cause mapserver to die at some scale factors... If anybody has any ideas on how to track further, please let me know ;-). This problem has been verified on mapserver version 4.4.1 and 4.4.2. Any help would be greatly appreciated. Thanks, Justin From fwarmerdam at GMAIL.COM Thu Apr 21 07:06:51 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Thu, 21 Apr 2005 10:06:51 -0400 Subject: Version 4.4.1 dependency and/or linux platform dependency? In-Reply-To: Message-ID: On 4/21/05, Brian Davis wrote: > When I zoom in to a map, the four corner points of my rubber-band box > are the new corners for the data displayed in my 400x200 browser space. > So, if I define an area that is 2:1 in x size to y size, I zoom in > as expected. But when defining space that is not this 2:1 rectangular > ratio, the data gets stretched/contracted/distorted to fit that space, > because the corners of my new definition become the drawn corners, > instead of extra data in either the x or y direction being used to > fill the the remaining area. Brian, As I understand it, the problem you are seeing is that MapServer used to expand the region you requested as needed in order to ensure square pixels, and now does not resulting in distorted results, is that right? Indeed, for MapServer 4.4 there was "nonsquare" support added to MapServer. In WMS mode this is on by default, in order to comply with the specification. In non-WMS mode it is supposed to be off by default (giving you the traditional aspect preserving behavior) unless you add the following line to your .map file: CONFIG MS_NONSQUARE YES Is your client requesting data via WMS? If so, then you will pretty much have to pre-adjust your bounding box to match the aspect ratio of the image size. If you are getting this behavior in traditional MapServer cgi mode and haven't defined MS_NONSQUARE then we should look into what is going on. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From sbeorchia at GI-LEMANS.COM Thu Apr 21 07:12:20 2005 From: sbeorchia at GI-LEMANS.COM (Sylvain Beorchia) Date: Thu, 21 Apr 2005 16:12:20 +0200 Subject: Simple question Message-ID: That's right, but by doing this way, can you retreive an image url on the client side ? I mean, in my application i need to reference the generated image map from two different places....so i need an url... thanks . Sylvain. ----- Original Message ----- From: "James Sohr" To: Sent: Thursday, April 21, 2005 3:51 PM Subject: Re: [UMN_MAPSERVER-USERS] Simple question > This is my personal opinion, but I think the best way to get rid of the > temporary images is to never create them in the first place. > > You can configure the mapserver CGI executable to output just a map image > straight to the web browser (intead of it generating a temp image and > outputting an HTML file). You can then use a plain HTML (or PHP or > whatever other language you'd like) page that wraps around the image and > is responsible only for passing paramaters to the MapServer CGI and > updating the map image. > > Thus, you create no temp images, and there is no need to reload the whole > page to update the map-- you only need to reload the map image. > > This is how most of the major map websites do it... > > > > > On Thu, 21 Apr 2005 15:26:58 +0200, luca marletta > wrote: > >>Till now I've no experience with a real mapserver live application on >>a 24/7 server and, maybe I lost some passage, but I'm wondering if >>there is a simple and easy way to get rid of all images that fill the >>images directory. >> >>Sorry if is a very silly question but I miss this point >> >>Thanks in advance or your help >> >>luca >>-- >>luca marletta icq: 70590647 From justin at EXPERTRON.CO.ZA Thu Apr 21 07:16:06 2005 From: justin at EXPERTRON.CO.ZA (Justin Schoeman) Date: Thu, 21 Apr 2005 16:16:06 +0200 Subject: Antwort: [UMN_MAPSERVER-USERS] Mapserver crash with gd and antialiasing? In-Reply-To: Message-ID: Thanks for the help - I see it is a problem in libgd - the clipping must be broken as it is trying to renderr off the bottom of the image... Thanks again, Justin J?rgen Link wrote: > Justin, > you may want to invoke mapserver on the command line: > > mapserv "QUERY_STRING=" > > Replace by your actual query string from your actual URL > (i.e. the stuff behind the question mark). > Output goes to stdout and you'll maybe see some hints. > You may also want to set the "DEBUG ON" option in your map file to make > output verbose. > > J?rgen > -- > Dr. J?rgen Link > BGS Systemplanung AG > http://www.bgs-ag.de > E-Mail juergen.link at bgs-ag.de > Phone: 02241 166-530 > Fax: 02241 166-680 > Mobile: 0160 97262616 > > > |---------+-------------------------------> > | | Justin Schoeman | > | | | | .ZA> | > | | Gesendet von: UMN | > | | MapServer Users List| > | | | | TS.UMN.EDU> | > | | | > | | | > | | 21.04.2005 15:24 | > | | Bitte antworten an | > | | Justin Schoeman | > | | | > |---------+-------------------------------> > >---------------------------------------------------------------------------------------------------------------------------------------------| > | | > | An: MAPSERVER-USERS at LISTS.UMN.EDU | > | Kopie: | > | Thema: [UMN_MAPSERVER-USERS] Mapserver crash with gd and antialiasing? | > >---------------------------------------------------------------------------------------------------------------------------------------------| > > > > Hi everybody, > > I am trying to use mapserver to render maps. The basic rendering works > great, but antialiasing is giving me a lot of trouble. > > After finally figuring out to use TrueColour visuals (RGB instead of PC256) > for PNG output in libgd (libgd 2.0.33), antialiasing started working > _but_... > > Some lines cause mapserv (cgi interface) to die (probably a segfault, only > 'Premature end of script headers: /var/www/cgi-bin/mapserv' gets logged). > I > have experienced this with CARTOLINE and ELIPSE styles. Without > antialiasing everything works fine. With antialiasing it sometimes just > dies... > > I am not sure exactly what lines trigger the problem though. I know that > enabling antialiasing on some layers will cause mapserver to die at some > scale factors... If anybody has any ideas on how to track further, please > let me know ;-). > > This problem has been verified on mapserver version 4.4.1 and 4.4.2. > > Any help would be greatly appreciated. > > Thanks, > Justin > From nunoragil at GMAIL.COM Thu Apr 21 07:24:36 2005 From: nunoragil at GMAIL.COM (Nuno Gil) Date: Thu, 21 Apr 2005 15:24:36 +0100 Subject: wms capabilities and mapfile scale correspondence In-Reply-To: <2576812186CDD411BF1500508B6DCE950972F9DB@ecnwri1.ontario.int.ec.gc.ca> Message-ID: Hi Tom, The problem is that they display different values... :s In the map file I have MINSCALE 45000001 MAXSCALE 999999999999 and in the capabilities file this same layer has Any idea why? Maybe a unit related issue? I have UNITS DD set up in the MAP element of the map file. Thank you, Nuno On 4/21/05, Kralidis,Tom [Burlington] wrote: > > The MAXSCALE and MINSCALE objects in the LAYER object, if set, are > visible in the output WMS GetCapabilities XML response in the > Layer/ScaleHint/@min and Layer/ScaleHint/@max attributes, which provides > a client a good 'hint' of what scale the layer will view for. > > ..Tom > > > > -----Original Message----- > > From: UMN MapServer Users List > > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Nuno Gil > > Sent: Wednesday, 20 April, 2005 16:22 > > To: MAPSERVER-USERS at LISTS.UMN.EDU > > Subject: [UMN_MAPSERVER-USERS] wms capabilities and mapfile > > scale correspondence > > > > > > Dear listers, > > Can someone guide me on the correspondence between the WMS > > capabilities scale hint value and the scalemax/scalemin value > > in the mapfile? > > > > Regards, > > Nuno > > > From dmorissette at DMSOLUTIONS.CA Thu Apr 21 07:32:56 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Thu, 21 Apr 2005 10:32:56 -0400 Subject: wms capabilities and mapfile scale correspondence In-Reply-To: Message-ID: Nuno Gil wrote: > Hi Tom, > The problem is that they display different values... :s > In the map file I have > MINSCALE 45000001 > MAXSCALE 999999999999 > and in the capabilities file this same layer has > > > Any idea why? Maybe a unit related issue? I have UNITS DD set up in > the MAP element of the map file. The different values are normal. MapServer's scale values are what you are used to seeing on paper maps as scale denominator, e.g. 1:50000, etc. ... and with respect to the scalehint value in WMS capabilities: > ** (see WMS 1.1.0 sect. 7.1.5.4) The WMS defines the scalehint values as > ** the ground distance in meters of the southwest to northeast diagonal of > ** the central pixel of a map. ScaleHint values are the min and max > ** recommended values of that diagonal. You can see how we convert from one to the other in function msWMSPrintScaleHint() in mapwms.c Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette at dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From trondmm-mapserver at CRUSADERS.NO Thu Apr 21 07:38:50 2005 From: trondmm-mapserver at CRUSADERS.NO (Trond Michelsen) Date: Thu, 21 Apr 2005 16:38:50 +0200 Subject: wms capabilities and mapfile scale correspondence In-Reply-To: <4267B998.20509@dmsolutions.ca> Message-ID: On Thu, Apr 21, 2005 at 10:32:56AM -0400, Daniel Morissette wrote: >> The problem is that they display different values... :s >> In the map file I have >> MINSCALE 45000001 >> MAXSCALE 999999999999 >> and in the capabilities file this same layer has >> >> Any idea why? Maybe a unit related issue? I have UNITS DD set up in >> the MAP element of the map file. > The different values are normal. > MapServer's scale values are what you are used to seeing on paper maps > as scale denominator, e.g. 1:50000, etc. Just one small question about the scale values. Are they just like a regular map, so that 1:50000 means that one centimeter on screen equals 50000 cm., or does it mean that 1 pixel equals 50000 mapunits? -- Trond Michelsen From ed at TOPOZONE.COM Thu Apr 21 07:50:12 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Thu, 21 Apr 2005 10:50:12 -0400 Subject: wms capabilities and mapfile scale correspondence Message-ID: Trond - Yes, they are, with one important note. Since MapServer does not know the pixel resolution of your screen, it cannot know how many pixels are used to create "one centimeter on screen". That's what the RESOLUTION statement in the map file does; the default value is 72 for 72 pixels per inch (the units are always pixels per inch). Since you cannot know the user's screen resolution either, you can either work with this estimate or choose another guess of your own. Most users are running monitors more in the 100 pixels per inch range these days. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed at topozone.com (978) 251-4242 -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Trond Michelsen Sent: Thursday, April 21, 2005 10:39 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] wms capabilities and mapfile scale correspondence On Thu, Apr 21, 2005 at 10:32:56AM -0400, Daniel Morissette wrote: >> The problem is that they display different values... :s In the map >> file I have >> MINSCALE 45000001 >> MAXSCALE 999999999999 >> and in the capabilities file this same layer has >> Any idea why? >> Maybe a unit related issue? I have UNITS DD set up in the MAP element >> of the map file. > The different values are normal. > MapServer's scale values are what you are used to seeing on paper maps > as scale denominator, e.g. 1:50000, etc. Just one small question about the scale values. Are they just like a regular map, so that 1:50000 means that one centimeter on screen equals 50000 cm., or does it mean that 1 pixel equals 50000 mapunits? -- Trond Michelsen From stigmata_blackangel at YAHOO.COM Thu Apr 21 08:00:07 2005 From: stigmata_blackangel at YAHOO.COM (Gregor Mosheh) Date: Thu, 21 Apr 2005 08:00:07 -0700 Subject: Simple question In-Reply-To: 6667 Message-ID: --- luca marletta wrote: > I'm wondering if > there is a simple and easy way to get rid of all > images that fill the images directory. If you're using Unix, then a cronjob like this should do the job: /usr/bin/find /path/to/images.tmp -type f -atime +1d -delete >/dev/null 2>/dev/null That says to delete any files that haven't been accessed in 1 day or more. Check the find manpage for more details. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jms4 at PO.CWRU.EDU Thu Apr 21 08:07:30 2005 From: jms4 at PO.CWRU.EDU (James Sohr) Date: Thu, 21 Apr 2005 10:07:30 -0500 Subject: Simple question Message-ID: Sure... since the image URL needs to be generated on the client side anyways. The best way of doing this is through Javascript. I've thrown a small sample of this in action at http://www.houseclick.com/map.htm It uses a small piece of JavaScript which keepts track of the map URL, as well as the current map size, current extent, and even can toggle a map layer on and off. All options are stored in JavaScript variables, and wheenever an option is changed, the new URL is reconstructed using the variables and the image is updated. The map URL is actually just the path to the MapServer CGI, plus with some MapServer options passed using CGI variables. The key CGI variable to use here is the "mode" variable-- set it to "map" to have the MapServer CGI spit out just a map image. For instance, the URL http://www.houseclick.com/cgi-bin/mapserv?mode=map&mapext=- 9561082+4629954+- 8761082+5429954&map=/var/www/map/map.map&mapsize=400+400&layer=roadtrl020&l ayer=states spits out just a map image : with an extent of -9561082,4629954 to -8761082, 5429954 using the map file located at /var/www/map/map.map with a size of 400 width by 400 height with layers "roadtrl020" and "states" turned on . It's really quite simple. Hope that helps... -James On Thu, 21 Apr 2005 16:12:20 +0200, Sylvain Beorchia wrote: >That's right, but by doing this way, can you retreive an image url on the >client side ? >I mean, in my application i need to reference the generated image map from >two different places....so i need an url... > >thanks . >Sylvain. > >----- Original Message ----- >From: "James Sohr" >To: >Sent: Thursday, April 21, 2005 3:51 PM >Subject: Re: [UMN_MAPSERVER-USERS] Simple question > > >> This is my personal opinion, but I think the best way to get rid of the >> temporary images is to never create them in the first place. >> >> You can configure the mapserver CGI executable to output just a map image >> straight to the web browser (intead of it generating a temp image and >> outputting an HTML file). You can then use a plain HTML (or PHP or >> whatever other language you'd like) page that wraps around the image and >> is responsible only for passing paramaters to the MapServer CGI and >> updating the map image. >> >> Thus, you create no temp images, and there is no need to reload the whole >> page to update the map-- you only need to reload the map image. >> >> This is how most of the major map websites do it... >> >> >> >> >> On Thu, 21 Apr 2005 15:26:58 +0200, luca marletta >> wrote: >> >>>Till now I've no experience with a real mapserver live application on >>>a 24/7 server and, maybe I lost some passage, but I'm wondering if >>>there is a simple and easy way to get rid of all images that fill the >>>images directory. >>> >>>Sorry if is a very silly question but I miss this point >>> >>>Thanks in advance or your help >>> >>>luca >>>-- >>>luca marletta icq: 70590647 From gmanepal at GMAIL.COM Thu Apr 21 08:26:52 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Thu, 21 Apr 2005 11:26:52 -0400 Subject: UNIX Fonts? In-Reply-To: <200504210033.18899.nacional@cbs.umn.edu> Message-ID: Bob, Because you said that you are not familiar with unix, I am just curious what distribution are you actually using. The following email is a generic way for installing fonts on a redhat machine. Let me know, if you are not using redhat(or Fedora Core). mkdir /usr/X11R6/lib/X11/fonts/ttf cp *.ttf to /usr/X11R6/lib/X11/fonts/ttf cd /usr/X11R6/lib/X11/fonts/ttf ttmkfdir -o fonts.dir On 4/21/05, Pericles S. Nacionales wrote: > Bob, > > If you are using the core Microsoft fonts (arial, times new roman, courier > new, verdana, etc.) then you can copy those fonts to your Unix machine. You > might want to have a look at Microsoft's license on the use of their fonts. > I don't know about the licenses of any other Windows truetype fonts so you > also might want to go back and read them before you make copies. In general, > many of these licenses only prevent you from modifying the fonts and/or > selling them--no problem since you're only using it to display labels. > > There are some free (I'm using the word loosely) fonts that you can use on > Unix/Linux--Bitstream has the Vera fonts which is used by Gnome > (http://www.gnome.org/fonts/), SIL International has Gentium > (http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=Gentium_download), > Bigelow and Holmes has the Luxi fonts, and there are others. > > The use of truetype fonts in MapServer is the same for Windows as for > Unix/Linux and Mac. You don't need to install them on a system directory > (e.g. /usr/share/fonts c:\windows\fonts) but you can put them in some other > directory along with your MapServer font list (see > http://mapserver.gis.umn.edu/fontset.html). > > Cheers! > -Perry > > On Wednesday 20 April 2005 11:07 pm, Bob Bruce wrote: > > I am not knowledgeable about UNIX systems and am hoping that someone can > > help me. I am in the process of migrating my MapServer MapScript pages to a > > UNIX server from my Windows 2000 system and am having problems with fonts. > > I don't know where to get the equivalent fonts to the ones that I have been > > using on my Windows system and the manager of my hosting provider doesn't > > seem to know this either. Can someone tell me how to go about getting fonts > > for the UNIX system? > > > > thanks, > > Bob Bruce, Winnipeg, Manitoba > > -- > Pericles S. Nacionales > > Dept. of Ecology, Evolution, and Behavior > University of Minnesota > work: 612 624 6713 > e-mail: nacional at cbs.umn.edu > From bdavis at USGS.GOV Thu Apr 21 08:28:39 2005 From: bdavis at USGS.GOV (Brian Davis) Date: Thu, 21 Apr 2005 10:28:39 -0500 Subject: Version 4.4.1 dependency and/or linux platform dependency? Message-ID: Frank, Thanks for your reply. Yes, you understood my problem correctly. Now, I am trying to understand your response ..... I AM making wms requests, and if I understand your comments correctly, I have to "pre-adjust my bounding box to match the aspect ratio of the image size" .... not sure what this means ...... To avoid this, do I add an entry to my map file like: CONFIG MS_NONSQUARE NO or CONFIG MS_NONSQUARE FALSE ? Or, do I really have to resize the browser display area each time I select a new area of new x/y shape? The original image dimensions, on which I am zooming on, are 10020 x 5010. In my map file, I have an entry for SIZE 500 250 and corresponding width and height specifications in my url call to mapserv. I added the CONFIG MS_NONSQUARE NO entry to the map file, with no effect. I usually assume it is always my fault, so I am not ready to blame mapserver yet. Any hints you can provide would be greatly appreciated. Maybe I can tar up my entire web site, send it to you, go on vacation, have you fix everything while I'm gone, then take credit for it when I get back?????!!!!!! :) Brian. On Thu, 21 Apr 2005 10:06:51 -0400, Frank Warmerdam wrote: >On 4/21/05, Brian Davis wrote: >> When I zoom in to a map, the four corner points of my rubber-band box >> are the new corners for the data displayed in my 400x200 browser space. >> So, if I define an area that is 2:1 in x size to y size, I zoom in >> as expected. But when defining space that is not this 2:1 rectangular >> ratio, the data gets stretched/contracted/distorted to fit that space, >> because the corners of my new definition become the drawn corners, >> instead of extra data in either the x or y direction being used to >> fill the the remaining area. > >Brian, > >As I understand it, the problem you are seeing is that MapServer >used to expand the region you requested as needed in order to >ensure square pixels, and now does not resulting in distorted >results, is that right? > >Indeed, for MapServer 4.4 there was "nonsquare" support >added to MapServer. In WMS mode this is on by default, >in order to comply with the specification. In non-WMS mode >it is supposed to be off by default (giving you the traditional >aspect preserving behavior) unless you add the following >line to your .map file: > > CONFIG MS_NONSQUARE YES > >Is your client requesting data via WMS? If so, then you >will pretty much have to pre-adjust your bounding box to >match the aspect ratio of the image size. If you are getting >this behavior in traditional MapServer cgi mode and haven't >defined MS_NONSQUARE then we should look into what is >going on. > >Best regards, >-- >---------------------------------------+----------------------------------- --- >I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com >light and sound - activate the windows | http://pobox.com/~warmerdam >and watch the world go round - Rush | Geospatial Programmer for Rent From gmanepal at GMAIL.COM Thu Apr 21 08:30:59 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Thu, 21 Apr 2005 11:30:59 -0400 Subject: UNIX Fonts? In-Reply-To: <6d675eda0504210826a645d7a@mail.gmail.com> Message-ID: Hey, I mistakenly send the email, you need to chkfontpath --add /usr/X11R6/lib/X11/fonts/ttf /etc/rc.d/init.d/xfs restart Now make a list of all the fonts in a file and point this list in the map. Regards, Giridhar On 4/21/05, Giridhar Manepalli wrote: > Bob, > Because you said that you are not familiar with unix, I am just > curious what distribution are you actually using. The following email > is a generic way for installing fonts on a redhat machine. Let me > know, if you are not using redhat(or Fedora Core). > > mkdir /usr/X11R6/lib/X11/fonts/ttf > > cp *.ttf to /usr/X11R6/lib/X11/fonts/ttf > > cd /usr/X11R6/lib/X11/fonts/ttf > > ttmkfdir -o fonts.dir > > > On 4/21/05, Pericles S. Nacionales wrote: > > Bob, > > > > If you are using the core Microsoft fonts (arial, times new roman, courier > > new, verdana, etc.) then you can copy those fonts to your Unix machine. You > > might want to have a look at Microsoft's license on the use of their fonts. > > I don't know about the licenses of any other Windows truetype fonts so you > > also might want to go back and read them before you make copies. In general, > > many of these licenses only prevent you from modifying the fonts and/or > > selling them--no problem since you're only using it to display labels. > > > > There are some free (I'm using the word loosely) fonts that you can use on > > Unix/Linux--Bitstream has the Vera fonts which is used by Gnome > > (http://www.gnome.org/fonts/), SIL International has Gentium > > (http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=Gentium_download), > > Bigelow and Holmes has the Luxi fonts, and there are others. > > > > The use of truetype fonts in MapServer is the same for Windows as for > > Unix/Linux and Mac. You don't need to install them on a system directory > > (e.g. /usr/share/fonts c:\windows\fonts) but you can put them in some other > > directory along with your MapServer font list (see > > http://mapserver.gis.umn.edu/fontset.html). > > > > Cheers! > > -Perry > > > > On Wednesday 20 April 2005 11:07 pm, Bob Bruce wrote: > > > I am not knowledgeable about UNIX systems and am hoping that someone can > > > help me. I am in the process of migrating my MapServer MapScript pages to a > > > UNIX server from my Windows 2000 system and am having problems with fonts. > > > I don't know where to get the equivalent fonts to the ones that I have been > > > using on my Windows system and the manager of my hosting provider doesn't > > > seem to know this either. Can someone tell me how to go about getting fonts > > > for the UNIX system? > > > > > > thanks, > > > Bob Bruce, Winnipeg, Manitoba > > > > -- > > Pericles S. Nacionales > > > > Dept. of Ecology, Evolution, and Behavior > > University of Minnesota > > work: 612 624 6713 > > e-mail: nacional at cbs.umn.edu > > > From dylan at IICI.NO-IP.ORG Thu Apr 21 08:58:16 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Thu, 21 Apr 2005 08:58:16 -0700 Subject: box zooming In-Reply-To: Message-ID: is there a place to see tis code, or is the HTML source on that page enough? thanks! On Apr 21, 2005, at 1:37 AM, Bart van den Eijnden wrote: > Have a look at DBox, eg: > > http://www.dnr.state.mn.us/maps/landview_dhtml_x.html > > Best regards, > Bart > > Bart van den Eijnden > Syncera-ITSolutions > Postbus 270 > 2600 AG DELFT > > tel.nr.: 015-7512436 > email: BEN at Syncera-ITSolutions.nl > >>>> Juan Baron 04/21/05 10:35am >>> > Hello: > > Is possible to do box zooming without applet? > > Thank's > > -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From joseluismapserver at YAHOO.ES Thu Apr 21 08:59:41 2005 From: joseluismapserver at YAHOO.ES (Jose Luis Gonzalez) Date: Thu, 21 Apr 2005 17:59:41 +0200 Subject: Points in symbol Message-ID: Hello to all. I have defined a symbol in my mapfile: SYMBOL NAME "Circle" TYPE ellipse POINTS 12 12 END END It has a defined radius, that is 12 in this case. What is the instruction that I have to use to change this point parameter from my program? I am working in java, but I don?t mind knowing the solution in PHP or another progamming language. I don?t know how to manage the parameters of a symbol of a mapfile from my program. So if someone knows how, please tell me. Thank you Jose Luis ______________________________________________ Renovamos el Correo Yahoo!: ?250 MB GRATIS! Nuevos servicios, m?s seguridad http://correo.yahoo.es From fwarmerdam at GMAIL.COM Thu Apr 21 08:58:47 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Thu, 21 Apr 2005 11:58:47 -0400 Subject: Version 4.4.1 dependency and/or linux platform dependency? In-Reply-To: Message-ID: On 4/21/05, Brian Davis wrote: > Frank, > > Thanks for your reply. > Yes, you understood my problem correctly. > Now, I am trying to understand your response ..... > I AM making wms requests, and if I understand your comments correctly, > I have to "pre-adjust my bounding box to match the aspect ratio > of the image size" .... not sure what this means ...... > > To avoid this, do I add an entry to my map file like: > CONFIG MS_NONSQUARE NO > or > CONFIG MS_NONSQUARE FALSE > ? Brian, You cannot override MS_NONSQUARE in WMS mode. The GetMap request forces it on for WMS protocol compliance. Basically what I am suggesting is that you either need to adjust your BBOX to have the same aspect ratio as your WIDTH/HEIGHT or you need to adjust the WIDTH/HEIGHT of your request. To get the old behavior, you would need to expand the BBOX extent in one dimension or the other till you get the same aspect ratio as the image being requested. The following C code from MapServer essentially does this calculation. You may want to adapt this approach. I t basically picks the "maximum" cellsize from the two dimensions and then recomputes the BBOX around the center of the old area with the same cellsize in both directions. double msAdjustExtent(rectObj *rect, int width, int height) { double cellsize, ox, oy; cellsize = MS_MAX(MS_CELLSIZE(rect->minx, rect->maxx, width), MS_CELLSIZE(rect->miny, rect->maxy, height)); if(cellsize <= 0) /* avoid division by zero errors */ return(0); ox = MS_MAX((width - (rect->maxx - rect->minx)/cellsize)/2,0); /* these were width-1 and height-1 */ oy = MS_MAX((height - (rect->maxy - rect->miny)/cellsize)/2,0); rect->minx = rect->minx - ox*cellsize; rect->miny = rect->miny - oy*cellsize; rect->maxx = rect->maxx + ox*cellsize; rect->maxy = rect->maxy + oy*cellsize; return(cellsize); } I assume you have some JavaScript or Java or something on the client where you could adjust your bounds? > Maybe I can tar up my entire web site, send it to you, go on vacation, > have you fix everything while I'm gone, then take credit for it when > I get back?????!!!!!! :) That is what I have consulting rates for! More seriously, I am weak on real "application building" with MapServer, though I can be helpful on input and rendering part of such work. I don't generally like working for governments though. Too much paperwork. :-) Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From bartvde at XS4ALL.NL Thu Apr 21 09:05:36 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Thu, 21 Apr 2005 18:05:36 +0200 Subject: box zooming In-Reply-To: <43bc152d519268ffcc69de2c30e20b1d@iici.no-ip.org> Message-ID: Hi Dylan, view source is enough (at least it was for me), you can see the references to the various javascript libraries used and download them, also how to use them in the HTML page itself. Best regards, Bart On Thu, 21 Apr 2005 08:58:16 -0700, Dylan Beaudette wrote: > is there a place to see tis code, or is the HTML source on that page > enough? > > thanks! > > > On Apr 21, 2005, at 1:37 AM, Bart van den Eijnden wrote: > >> Have a look at DBox, eg: >> >> http://www.dnr.state.mn.us/maps/landview_dhtml_x.html >> >> Best regards, >> Bart >> >> Bart van den Eijnden >> Syncera-ITSolutions >> Postbus 270 >> 2600 AG DELFT >> >> tel.nr.: 015-7512436 >> email: BEN at Syncera-ITSolutions.nl >> >>>>> Juan Baron 04/21/05 10:35am >>> >> Hello: >> >> Is possible to do box zooming without applet? >> >> Thank's >> >> > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group > University of California at Davis > 530.754.7341 > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From cneves at LREC.PT Thu Apr 21 09:47:06 2005 From: cneves at LREC.PT (Carlos Neves) Date: Thu, 21 Apr 2005 11:47:06 -0500 Subject: Mapserv 4.4.2 Annotation disappear if extends over the limit of Map Message-ID: Hi, I'm using mapsurfer to test my MAP files. I habe noticed that all annotations features working well, if the annotation shapefile limits is within the limits of the map display, but any zoomin over the map limits will make the annotations disappear. Any ideas? LAYER NAME rivers TYPE ANNOTATION STATUS DEFAULT #MAXSCALE 150000 #MINSCALE 500 DATA planimetric/topo #MAXFEATURES 500 LABELITEM "TEXT" LABELANGLEITEM "Angle" #LABELMAXSCALE 150000 #LABELMINSCALE 500 #LABELOVERLAP OFF LABELCACHE TRU FORCE TRUE POSTLABELCACHE TRUE CLASSITEM "TEXT" CLASS LABEL COLOR 0 255 0 TYPE TRUETYPE FONT arial SIZE 5 ANTIALIAS FALSE #POSITION CC PARTIALS TRUE #MINDISTANCE 0 END # end of label SIZE 2 END END (...) Tanks in Advance From nunoragil at GMAIL.COM Thu Apr 21 10:10:01 2005 From: nunoragil at GMAIL.COM (Nuno Gil) Date: Thu, 21 Apr 2005 18:10:01 +0100 Subject: WCS error - msDrawRasterLayerLow Message-ID: Dear Listers, I am trying to request a WCS coverage: http://iceds.ge.ucl.ac.uk/cgi-bin/wcs?map=wcs.map&SERVICE=WCS&REQUEST=GetCoverage&COVERAGE=landsat_europe&CRS=EPSG:4326&BBOX=-6,40,-5.5,40.5&RESX=0.00027778&RESY=0.00027778&FORMAT=geotiff The browser displays: "The server encountered an internal error or misconfiguration and was unable to complete your request." And the Apache error.log file has the following information on it: [Thu Apr 21 16:49:02 2005] [error] [client 128.40.25.202] Premature end of script headers: wcs [Thu Apr 21 16:49:02 2005] [error] [client 128.40.25.202] [Thu Apr 21 16:49:02 2005].887169 msDrawRasterLayerLow(landsat_europe): entering. Any hints? Regards, Nuno From cvhackel at YAHOO.COM Thu Apr 21 10:16:46 2005 From: cvhackel at YAHOO.COM (Chris Hackel) Date: Thu, 21 Apr 2005 10:16:46 -0700 Subject: Class Symbols & SWF Message-ID: From mark at REFRACTIONS.NET Thu Apr 21 10:30:43 2005 From: mark at REFRACTIONS.NET (Mark Leslie) Date: Thu, 21 Apr 2005 10:30:43 -0700 Subject: Mapserver for Windows 2003 + FCGI + SDE In-Reply-To: <931f8ea90504121008111244bb@mail.gmail.com> Message-ID: Frank, I've managed to clear some of the errors I'm having, thanks to your advice, but I'm still getting a fault in the libfcgi.dll. I am using mapserv.c v1.141.2.2, which sports calls to msResetErrorList, but I'm still getting the a persistant error stack, which I would guess could be the cause of my fault. Do you have any ideas as to why this is still happening? Mark Frank Warmerdam wrote: >On Apr 12, 2005 12:15 PM, Mark Leslie wrote: > > >>I'm having trouble building mapserver on a Windows 2003 server with >>ArcSDE and fastcgi support. I can compile it, and it runs for a while, >>but I eventually get memory faults in msvcrt.dll and libfcgi.dll. I have >>tryed this with Mapservers 4.4, 4.4.1 and now 4.4.2. I've compiled using >>both vc6 and vc7. Two things that may be relevent: I'm using the >>precompiled gd binaries; the error stack does not seem to be clearing >>between requests. I was under the impression that the error stack issue >>had been taken care of around the 4.4 release. >> >> > >Mark, > >The error stack reset for FastCGI support is in MapServer 4.4.1. It >is version 1.141.2.1 of mapserv.c (calls msResetErrorList() after >completing - or failing - an OWS request). > > > >>This build has worked >>fine before on Win2000. If anyone has had similar problems, or has any >>ideas, I would appreciate it. >> >> > >I don't know why you are running into problems on Win2003 that >didn't occur on Win2000. I will say that the build process is complex >including the need to past the fastcgi client library (as noted in the >wiki) and care must be taken to build with MSVCRT.DLL. I haven't >tried with VC7, but I think that would be imprudent. > >I think the precompiled binaries for GD are fine as long as you >build with VC6 and /MD. > >Best regards, >-- >---------------------------------------+-------------------------------------- >I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com >light and sound - activate the windows | http://pobox.com/~warmerdam >and watch the world go round - Rush | Geospatial Programmer for Rent > > From fwarmerdam at GMAIL.COM Thu Apr 21 11:01:00 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Thu, 21 Apr 2005 14:01:00 -0400 Subject: Mapserver for Windows 2003 + FCGI + SDE In-Reply-To: <4267E343.6070903@refractions.net> Message-ID: On 4/21/05, Mark Leslie wrote: > Frank, > I've managed to clear some of the errors I'm having, thanks to your > advice, but I'm still getting a fault in the libfcgi.dll. I am using > mapserv.c v1.141.2.2, which sports calls to msResetErrorList, but I'm > still getting the a persistant error stack, which I would guess could be > the cause of my fault. Do you have any ideas as to why this is still > happening? Mark, Is the persisent error messages occuring with WMS requests? There is no error clearing after non-OWS requests, and some very early errors could also pile up on the error stack. Can you provide details on what is happening to you? Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From bobbyfung at HOTMAIL.COM Thu Apr 21 11:24:04 2005 From: bobbyfung at HOTMAIL.COM (Libo Feng) Date: Thu, 21 Apr 2005 13:24:04 -0500 Subject: Create a shapefile using Java Mapscript Message-ID: Thanks a lot! calling shapefileObj.delete() fixed the problem. From fwarmerdam at GMAIL.COM Thu Apr 21 11:06:14 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Thu, 21 Apr 2005 14:06:14 -0400 Subject: WCS error - msDrawRasterLayerLow In-Reply-To: Message-ID: On 4/21/05, Nuno Gil wrote: > Dear Listers, > I am trying to request a WCS coverage: > http://iceds.ge.ucl.ac.uk/cgi-bin/wcs?map=wcs.map&SERVICE=WCS&REQUEST=GetCoverage&COVERAGE=landsat_europe&CRS=EPSG:4326&BBOX=-6,40,-5.5,40.5&RESX=0.00027778&RESY=0.00027778&FORMAT=geotiff > > The browser displays: > "The server encountered an internal error or misconfiguration and was > unable to complete your request." > > And the Apache error.log file has the following information on it: > [Thu Apr 21 16:49:02 2005] [error] [client 128.40.25.202] Premature > end of script headers: wcs > [Thu Apr 21 16:49:02 2005] [error] [client 128.40.25.202] [Thu Apr 21 > 16:49:02 2005].887169 msDrawRasterLayerLow(landsat_europe): entering. Nuno, I don't have any particular idea what is going wrong. From the debug messages it is getting reasonably far. Under normal conditions I think that would be the last debug messages though, so it is hard to judge how much further it got. In particular, there is no "exiting" message despite what might be implied by the word entering message. I would suggest trying to replicate the request at the command line and see how that goes. ie. ./mapserv QUERY_STRING='map=wcs.map&SERVICE=WCS&REQUEST=GetCoverage&COVERAGE=landsat_europe&CRS=EPSG:4326&BBOX=-6,40,-5.5,40.5&RESX=0.00027778&RESY=0.00027778&FORMAT=geotiff' If the problem persists try to boil down the problem and submit a bug report via bugzilla (or debug it yourself). Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From constantin.a.cristian at GMAIL.COM Thu Apr 21 11:37:28 2005 From: constantin.a.cristian at GMAIL.COM (Constantin Cristian) Date: Thu, 21 Apr 2005 21:37:28 +0300 Subject: Mapserv 4.4.2 Annotation disappear if extends over the limit of Map Message-ID: Try: PARTIALS TRUE in your label object. ----- Original Message ----- From: "Carlos Neves" To: Sent: Thursday, April 21, 2005 7:47 PM Subject: [UMN_MAPSERVER-USERS] Mapserv 4.4.2 Annotation disappear if extends over the limit of Map > Hi, > I'm using mapsurfer to test my MAP files. > I habe noticed that all annotations features working well, if the > annotation shapefile limits is within the limits of the map display, but > any > zoomin over the map limits will make the annotations disappear. > Any ideas? > > LAYER > NAME rivers > TYPE ANNOTATION > STATUS DEFAULT > #MAXSCALE 150000 > #MINSCALE 500 > DATA planimetric/topo > #MAXFEATURES 500 > LABELITEM "TEXT" > LABELANGLEITEM "Angle" > #LABELMAXSCALE 150000 > #LABELMINSCALE 500 > #LABELOVERLAP OFF > LABELCACHE TRU > FORCE TRUE > POSTLABELCACHE TRUE > CLASSITEM "TEXT" > CLASS > LABEL > COLOR 0 255 0 > TYPE TRUETYPE > FONT arial > SIZE 5 > ANTIALIAS FALSE > #POSITION CC > PARTIALS TRUE > #MINDISTANCE 0 > > END # end of label > > > > SIZE 2 > END > END > (...) > Tanks in Advance From mark at REFRACTIONS.NET Thu Apr 21 11:48:54 2005 From: mark at REFRACTIONS.NET (Mark Leslie) Date: Thu, 21 Apr 2005 11:48:54 -0700 Subject: Mapserver for Windows 2003 + FCGI + SDE In-Reply-To: <931f8ea905042111011a5c9381@mail.gmail.com> Message-ID: I'm making WMS requests. In order to speed the failure, I'm currently requesting an SDE layer that mapserver can't connect to (required VPN connection isn't established) but the fault happens eventually if it can connect. I'm using jmeter to make the requests and save out the responses. Each error response contains two new messages, one from msSDELayerOpen, and one from msDrawMap. I'll have to take a closer look to make sure my contrived testing isn't the cause, but I recall having this problem under normal use as well. Mark Frank Warmerdam wrote: >On 4/21/05, Mark Leslie wrote: > > >>Frank, >>I've managed to clear some of the errors I'm having, thanks to your >>advice, but I'm still getting a fault in the libfcgi.dll. I am using >>mapserv.c v1.141.2.2, which sports calls to msResetErrorList, but I'm >>still getting the a persistant error stack, which I would guess could be >>the cause of my fault. Do you have any ideas as to why this is still >>happening? >> >> > >Mark, > >Is the persisent error messages occuring with WMS requests? >There is no error clearing after non-OWS requests, and some >very early errors could also pile up on the error stack. > >Can you provide details on what is happening to you? > >Best regards, > > From dylan at IICI.NO-IP.ORG Thu Apr 21 11:51:34 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Thu, 21 Apr 2005 11:51:34 -0700 Subject: box zooming In-Reply-To: Message-ID: Bart, Wow! you were right - i was able to fix up my old mapserver application with the source fromthe UMN site!! however, i noticed that my legend does not seem to be rendered. i modified the source of the UMN page, near the legendURL section; ------------------ // update the legend var legendURL = "http://169.237.35.250/cgi-bin/mapserv?map=/home/dylan/public_html/mapserver/mapunit/fresno_w.map&mode=legend&layers=" + ms.getlayerlist('+') + "&mapext=" + ms.extent[0] + "+" + ms.extent[1] + "+" + ms.extent[2] + "+" + ms.extent[3] + "&mapsize=" + ms.width + "+" + ms.height; legend.setcontent(legendURL); ------------------------------- i know that the variable 'legendURL' is valid, as it expands to the working: http://169.237.35.250/cgi-bin/mapserv?map=/home/dylan/public_html/mapserver/mapunit/fresno_w.map&mode=legend&layers=&mapext=-2133333.6828213334+-216382.321635+-1954777.1482586667+-82464.920713&mapsize=640+480 ... but somehow the legend image is not drawn... any ideas on this one? thanks for the help!! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 On Thursday 21 April 2005 09:05 am, Bart van den Eijnden wrote: > Hi Dylan, > > view source is enough (at least it was for me), you can see the references > to the various javascript libraries used and download them, also how to > use them in the HTML page itself. > > Best regards, > Bart > > On Thu, 21 Apr 2005 08:58:16 -0700, Dylan Beaudette > > wrote: > > is there a place to see tis code, or is the HTML source on that page > > enough? > > > > thanks! > > > > On Apr 21, 2005, at 1:37 AM, Bart van den Eijnden wrote: > >> Have a look at DBox, eg: > >> > >> http://www.dnr.state.mn.us/maps/landview_dhtml_x.html > >> > >> Best regards, > >> Bart > >> > >> Bart van den Eijnden > >> Syncera-ITSolutions > >> Postbus 270 > >> 2600 AG DELFT > >> > >> tel.nr.: 015-7512436 > >> email: BEN at Syncera-ITSolutions.nl > >> > >>>>> Juan Baron 04/21/05 10:35am >>> > >> > >> Hello: > >> > >> Is possible to do box zooming without applet? > >> > >> Thank's > > > > -- > > Dylan Beaudette > > Soils and Biogeochemistry Graduate Group > > University of California at Davis > > 530.754.7341 > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From bartvde at XS4ALL.NL Thu Apr 21 11:57:15 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Thu, 21 Apr 2005 20:57:15 +0200 Subject: box zooming In-Reply-To: <200504211151.34465.dylan@iici.no-ip.org> Message-ID: Dylan, I haven't used the legend so far myself, but I know it uses the XMLHttp technique. A few questions which come to mind: 1. Are there any javascript errors? 2. Which browser are you using? On which platform? 3. Can you view the legend of the UMN site? 4. Can we view your site to check? Best regards, Bart On Thu, 21 Apr 2005 11:51:34 -0700, Dylan Beaudette wrote: > Bart, > > Wow! you were right - i was able to fix up my old mapserver application > with > the source fromthe UMN site!! > > however, i noticed that my legend does not seem to be rendered. > > i modified the source of the UMN page, near the legendURL section; > > ------------------ > // update the legend > var legendURL = > "http://169.237.35.250/cgi-bin/mapserv?map=/home/dylan/public_html/mapserver/mapunit/fresno_w.map&mode=legend&layers=" > + ms.getlayerlist('+') + "&mapext=" + ms.extent[0] + "+" + ms.extent[1] > + > "+" + ms.extent[2] + "+" + ms.extent[3] + "&mapsize=" + ms.width + "+" > + > ms.height; > legend.setcontent(legendURL); > ------------------------------- > > i know that the variable 'legendURL' is valid, as it expands to the > working: > http://169.237.35.250/cgi-bin/mapserv?map=/home/dylan/public_html/mapserver/mapunit/fresno_w.map&mode=legend&layers=&mapext=-2133333.6828213334+-216382.321635+-1954777.1482586667+-82464.920713&mapsize=640+480 > > ... but somehow the legend image is not drawn... > > any ideas on this one? > > thanks for the help!! > > > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group > University of California at Davis > 530.754.7341 > > On Thursday 21 April 2005 09:05 am, Bart van den Eijnden wrote: >> Hi Dylan, >> >> view source is enough (at least it was for me), you can see the >> references >> to the various javascript libraries used and download them, also how to >> use them in the HTML page itself. >> >> Best regards, >> Bart >> >> On Thu, 21 Apr 2005 08:58:16 -0700, Dylan Beaudette >> >> >> wrote: >> > is there a place to see tis code, or is the HTML source on that page >> > enough? >> > >> > thanks! >> > >> > On Apr 21, 2005, at 1:37 AM, Bart van den Eijnden wrote: >> >> Have a look at DBox, eg: >> >> >> >> http://www.dnr.state.mn.us/maps/landview_dhtml_x.html >> >> >> >> Best regards, >> >> Bart >> >> >> >> Bart van den Eijnden >> >> Syncera-ITSolutions >> >> Postbus 270 >> >> 2600 AG DELFT >> >> >> >> tel.nr.: 015-7512436 >> >> email: BEN at Syncera-ITSolutions.nl >> >> >> >>>>> Juan Baron 04/21/05 10:35am >>> >> >> >> >> Hello: >> >> >> >> Is possible to do box zooming without applet? >> >> >> >> Thank's >> > >> > -- >> > Dylan Beaudette >> > Soils and Biogeochemistry Graduate Group >> > University of California at Davis >> > 530.754.7341 >> >> -- >> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From bill at BINKO.NET Thu Apr 21 12:09:20 2005 From: bill at BINKO.NET (Bill Binko) Date: Thu, 21 Apr 2005 15:09:20 -0400 Subject: Displaying per-feature images on map Message-ID: Hi everyone, In my quest to do weird nasty things with mapserver (which is being very tolerant BTW), I've come up with a new one. I'd like to display images on my maps next to the features they go with. Basically, I have a set of points in a postgis database with an attribute which is a URL to a JPG (I can convert them to PNG or anything else). They are mostly about 337x394 pixels. Some are up to double that - I can resize them to match if needed. I have the images on another machine accessible via http, and I'd like to leave them there since they update via a separate process. (I have a caching script setup w/Apache so only the first fetch will go over the network.) So, I considered using GDAL's Virtual support, but I don't know if it needs local images, and I think it needs GeoTIFFs or the like: these are just plain images. I also considered updating the mapserver code to use a different image for each shape. However, those filenames are local as well, so I'd have to add code for fetching them image via libcurl. Generally, I don't see a simple solution. Perhaps I could write a GDAL Dataset that will fetch images from a URL on demand? Any thoughts would be appreciated, Bill From fwarmerdam at GMAIL.COM Thu Apr 21 12:09:54 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Thu, 21 Apr 2005 15:09:54 -0400 Subject: Mapserver for Windows 2003 + FCGI + SDE In-Reply-To: <4267F596.7020500@refractions.net> Message-ID: On 4/21/05, Mark Leslie wrote: > I'm making WMS requests. In order to speed the failure, I'm currently > requesting an SDE layer that mapserver can't connect to (required VPN > connection isn't established) but the fault happens eventually if it can > connect. I'm using jmeter to make the requests and save out the > responses. Each error response contains two new messages, one from > msSDELayerOpen, and one from msDrawMap. I'll have to take a closer look > to make sure my contrived testing isn't the cause, but I recall having > this problem under normal use as well. Mark, I'm sorry, I can't see why the error messages would still pile up in this situations. You might want to add some printfs() to verify things are happening as expected. The key in mapserv.c is this bit: #if defined(USE_WMS_SVR) || defined(USE_WFS_SVR) || defined(USE_WCS_SVR) if ((status = msOWSDispatch(msObj->Map, msObj->request)) != MS_DONE ) { /* This was a WMS/WFS request... cleanup and exit * At this point any error has already been handled * as an XML exception by the OGC service. */ msFreeMapServObj(msObj); #ifdef USE_FASTCGI /* FCGI_ --- return to top of loop */ msResetErrorList(); continue; #else /* normal case, processing is complete */ msCleanup(); exit( 0 ); #endif } #endif /* have an OWS service request */ Basically, msOWSDispatch() will return something other than MS_DONE if it finds it has received a WMS, WFS or WCS request. Then the code should call msFreeMapServObj(), msResetErrorList() and then continue back to the main dispatch loop. msResetErrorList() should wipe the current error stack. Either in a debugger, or with lots of printfs(), verify that all these stages are working as expected. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From bdavis at USGS.GOV Thu Apr 21 12:33:28 2005 From: bdavis at USGS.GOV (Brian Davis) Date: Thu, 21 Apr 2005 14:33:28 -0500 Subject: Version 4.4.1 dependency and/or linux platform dependency? Message-ID: Frank, Thanks for the info. I just wanted to make sure of the situation before I went of and wrote software to do this manually. Now you'll know to get ready to duck if you see any more postings by me ... Brian On Thu, 21 Apr 2005 11:58:47 -0400, Frank Warmerdam wrote: >On 4/21/05, Brian Davis wrote: >> Frank, >> >> Thanks for your reply. >> Yes, you understood my problem correctly. >> Now, I am trying to understand your response ..... >> I AM making wms requests, and if I understand your comments correctly, >> I have to "pre-adjust my bounding box to match the aspect ratio >> of the image size" .... not sure what this means ...... >> >> To avoid this, do I add an entry to my map file like: >> CONFIG MS_NONSQUARE NO >> or >> CONFIG MS_NONSQUARE FALSE >> ? > >Brian, > >You cannot override MS_NONSQUARE in WMS mode. The >GetMap request forces it on for WMS protocol compliance. >Basically what I am suggesting is that you either need to >adjust your BBOX to have the same aspect ratio as your >WIDTH/HEIGHT or you need to adjust the WIDTH/HEIGHT >of your request. > >To get the old behavior, you would need to expand the >BBOX extent in one dimension or the other till you get the >same aspect ratio as the image being requested. > >The following C code from MapServer essentially does this >calculation. You may want to adapt this approach. I t >basically picks the "maximum" cellsize from the two dimensions >and then recomputes the BBOX around the center of the old >area with the same cellsize in both directions. > >double msAdjustExtent(rectObj *rect, int width, int height) >{ > double cellsize, ox, oy; > > cellsize = MS_MAX(MS_CELLSIZE(rect->minx, rect->maxx, width), >MS_CELLSIZE(rect->miny, rect->maxy, height)); > > if(cellsize <= 0) /* avoid division by zero errors */ > return(0); > > ox = MS_MAX((width - (rect->maxx - rect->minx)/cellsize)/2,0); /* >these were width-1 and height-1 */ > oy = MS_MAX((height - (rect->maxy - rect->miny)/cellsize)/2,0); > > rect->minx = rect->minx - ox*cellsize; > rect->miny = rect->miny - oy*cellsize; > rect->maxx = rect->maxx + ox*cellsize; > rect->maxy = rect->maxy + oy*cellsize; > > return(cellsize); >} > >I assume you have some JavaScript or Java or something on the >client where you could adjust your bounds? > >> Maybe I can tar up my entire web site, send it to you, go on vacation, >> have you fix everything while I'm gone, then take credit for it when >> I get back?????!!!!!! :) > >That is what I have consulting rates for! > >More seriously, I am weak on real "application building" with MapServer, >though I can be helpful on input and rendering part of such work. I >don't generally like working for governments though. Too much >paperwork. :-) > >Best regards, >-- >---------------------------------------+----------------------------------- --- >I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com >light and sound - activate the windows | http://pobox.com/~warmerdam >and watch the world go round - Rush | Geospatial Programmer for Rent From dylan at IICI.NO-IP.ORG Thu Apr 21 13:28:41 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Thu, 21 Apr 2005 13:28:41 -0700 Subject: DHTML legend problems (was box zooming) Message-ID: Bart, I made a new thread, so as not to pollute the last one with extra questions. In response to your questions: 1. No JS errors 2. Was using Konqueror on Linux (KDE 3.3) 3. I can view the legend on the UMN site... but only with Firefox ... so my first problem, was that Konqueror was not rendering anything. Switching to Firefox allowed me to see the legend on the UMN site. However, on my test site, the legend appears to be a binary dump of a png image... you can see this first hand here: http://169.237.35.250/~dylan/mapserver/dhtml/landview_dhtml_x.html thanks, -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 > Dylan, > > I haven't used the legend so far myself, but I know it uses the XMLHttp > technique. A few questions which come to mind: > > 1. Are there any javascript errors? > 2. Which browser are you using? On which platform? > 3. Can you view the legend of the UMN site? > 4. Can we view your site to check? > > Best regards, > Bart From steve.lime at DNR.STATE.MN.US Thu Apr 21 14:42:37 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Thu, 21 Apr 2005 16:42:37 -0500 Subject: Sol Katz Award for Geospatial Free and Open Source Software - Call for Nominations Message-ID: The organizing committee for the upcoming Open Source Geospatial '05 conference would like to open nominations for the inaugural Sol Katz Award for Geospatial Free and Open Source Software. The Sol Katz Award for Geospatial Free and Open Source Software (GFOSS) will be given to individuals who have demonstrated leadership in the GFOSS community. Recipients of the award will have contributed significantly through their activities to advance open source ideals in the geospatial realm. Sol Katz was an early pioneer of GFOSS and left behind a large body of work in the form of applications, format specifications, and utilities while at the U.S. Bureau of Land Management. This early GFOSS archive provided both source code and applications freely available to the community. Sol was also a frequent contributor to many geospatial list servers, providing much guidance to the geospatial community at large. Sol unfortunately passed away in 1999 from Non-Hodgkin's Lymphoma, but his legacy lives on in the open source world. Those interested in making a donation to the American Cancer Society, as per Sol's family's request, can do so at https://www.cancer.org/asp/donate/don_multi_donate.asp?navToScreen=don_1. Nominations for the Sol Katz Award should be sent to sol.katz.award at gmail.com with a brief description of the reasons for this nomination. Please place "Sol Katz Award" in the subject of the email. Nominations will be accepted until Saturday April 30th @ midnight. A recipient will be decided from the nomination list by a selection committee. The winner of the Sol Katz Award for Geospatial Free and Open Source Software will be announced at the Open Source Geospatial conference in June. The hope is that the award will both acknowledge the work of community members, and pay tribute to one of its founders, for years to come. -- Organizing Committee Open Source Geospatial '05 http://mapserver.gis.umn.edu/mum/mtg2005.html From dylan at IICI.NO-IP.ORG Thu Apr 21 14:48:44 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Thu, 21 Apr 2005 14:48:44 -0700 Subject: changing DATA parameter in mapfile via URL Message-ID: Is is possible to change the 'DATA' parameter via a URL-style variable such as: ...&map_layername_data="xxx.shp" i am able to change every other property of this layer, but not its data source. if this is not possible, does anyone know of some kind of work-around? i am trying to use a single map file for numerous different shape files... thanks in advance! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From steve.lime at DNR.STATE.MN.US Thu Apr 21 14:56:35 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Thu, 21 Apr 2005 16:56:35 -0500 Subject: changing DATA parameter in mapfile via URL Message-ID: For security reasons we don't allow that by default. You have to set the DATAPATTERN parameter in the mapfile first. The pattern is nothing more than a regular expression that will limit the values that DATA can take. For example: DATAPATTERN "xxx|yyy|zzz" will allow ...&map_layername_data=xxx.shp but not ...&map_layername_data=sss.shp. Another option is using runtime substitutions. In your layer definition you'd have something like: LAYER DATA %thefile% .... END and then you'd set a CGI variable called 'thefile' to hold the name of a shapefile. If you do the whole filename as just a single variable you have the hole that DATAPATTERN was put in place to plug. You'd probably want to use the %thefile% as part of a longer file name instead which would be moderately safe. Steve >>> Dylan Beaudette 4/21/2005 4:48:44 PM >>> Is is possible to change the 'DATA' parameter via a URL-style variable such as: ...&map_layername_data="xxx.shp" i am able to change every other property of this layer, but not its data source. if this is not possible, does anyone know of some kind of work-around? i am trying to use a single map file for numerous different shape files... thanks in advance! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From steve.lime at DNR.STATE.MN.US Thu Apr 21 15:15:32 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Thu, 21 Apr 2005 17:15:32 -0500 Subject: box zooming Message-ID: It would be easier to help if we could see the whole application. Off the top of my head I would think there might be a problem with div names, make sure those jive... Steve >>> Dylan Beaudette 4/21/2005 1:51:34 PM >>> Bart, Wow! you were right - i was able to fix up my old mapserver application with the source fromthe UMN site!! however, i noticed that my legend does not seem to be rendered. i modified the source of the UMN page, near the legendURL section; ------------------ // update the legend var legendURL = "http://169.237.35.250/cgi-bin/mapserv?map=/home/dylan/public_html/mapserver/mapunit/fresno_w.map&mode=legend&layers=" + ms.getlayerlist('+') + "&mapext=" + ms.extent[0] + "+" + ms.extent[1] + "+" + ms.extent[2] + "+" + ms.extent[3] + "&mapsize=" + ms.width + "+" + ms.height; legend.setcontent(legendURL); ------------------------------- i know that the variable 'legendURL' is valid, as it expands to the working: http://169.237.35.250/cgi-bin/mapserv?map=/home/dylan/public_html/mapserver/mapunit/fresno_w.map&mode=legend&layers=&mapext=-2133333.6828213334+-216382.321635+-1954777.1482586667+-82464.920713&mapsize=640+480 ... but somehow the legend image is not drawn... any ideas on this one? thanks for the help!! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 On Thursday 21 April 2005 09:05 am, Bart van den Eijnden wrote: > Hi Dylan, > > view source is enough (at least it was for me), you can see the references > to the various javascript libraries used and download them, also how to > use them in the HTML page itself. > > Best regards, > Bart > > On Thu, 21 Apr 2005 08:58:16 -0700, Dylan Beaudette > > wrote: > > is there a place to see tis code, or is the HTML source on that page > > enough? > > > > thanks! > > > > On Apr 21, 2005, at 1:37 AM, Bart van den Eijnden wrote: > >> Have a look at DBox, eg: > >> > >> http://www.dnr.state.mn.us/maps/landview_dhtml_x.html > >> > >> Best regards, > >> Bart > >> > >> Bart van den Eijnden > >> Syncera-ITSolutions > >> Postbus 270 > >> 2600 AG DELFT > >> > >> tel.nr.: 015-7512436 > >> email: BEN at Syncera-ITSolutions.nl > >> > >>>>> Juan Baron 04/21/05 10:35am >>> > >> > >> Hello: > >> > >> Is possible to do box zooming without applet? > >> > >> Thank's > > > > -- > > Dylan Beaudette > > Soils and Biogeochemistry Graduate Group > > University of California at Davis > > 530.754.7341 > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From assefa at DMSOLUTIONS.CA Thu Apr 21 16:46:07 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Thu, 21 Apr 2005 19:46:07 -0400 Subject: Class Symbols & SWF In-Reply-To: <20050421171646.50165.qmail@web60504.mail.yahoo.com> Message-ID: I have added the support to create thick lines for line and polygon layers by setting the width parameter of the style object. This functionnality is available in the current CVS version of Mapserver. If there are any issues please update Bug 1328 (http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1328). Later, Chris Hackel wrote: >>From what I gather, the way to create road/line > thickness w/ image-based output (PNG, etc) is to > create a circle symbol and set the size of it in the > appropriate layer's class. > However, this doesn't seem to work w/ SWF output. > Does anyone know how to change line size in SWF? > > Thanks, > Chris > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From kenlord at GMAIL.COM Thu Apr 21 17:32:08 2005 From: kenlord at GMAIL.COM (Ken Lord) Date: Thu, 21 Apr 2005 17:32:08 -0700 Subject: changing DATA parameter in mapfile via URL In-Reply-To: Message-ID: Hi Dylan, In addition to Steve's comments, If your data source is PostGIS, the DATA %thefile% system works great for modifying query statements used in your DATA parameter on the fly in CGI mapserver, allowing you to make tools where your user can choose from a set of spatial analysis functions or settings whose results are symbolized by that layer's settings. For example a layer set to show all X's within 100m of Y could be reset by the user to find all X's within some other distance of Y, or another function could be used, such as all X's contained by Y where attribute Z=foo. ... or whatever type of spatial / attribute query you need so long as it doesnt bog your server down in processing. Using javascript or an ASP redirect (or whatever your choice of method) to parse the appropriate string into your "&thefile=xxxxx" variable in the URL. or the form submission. It adds some real GIS abilities to mapserver without very much effort. Cheers, Ken Lord Vancouver BC On 4/21/05, Steve Lime wrote: > For security reasons we don't allow that by default. You have to set the > DATAPATTERN > parameter in the mapfile first. The pattern is nothing more than a > regular expression that > will limit the values that DATA can take. For example: > > DATAPATTERN "xxx|yyy|zzz" > > will allow ...&map_layername_data=xxx.shp but not > ...&map_layername_data=sss.shp. > > Another option is using runtime substitutions. In your layer definition > you'd have something > like: > > LAYER > DATA %thefile% > .... > END > > and then you'd set a CGI variable called 'thefile' to hold the name of > a shapefile. If you do the > whole filename as just a single variable you have the hole that > DATAPATTERN was put in place > to plug. You'd probably want to use the %thefile% as part of a longer > file name instead which > would be moderately safe. > > Steve > > >>> Dylan Beaudette 4/21/2005 4:48:44 PM >>> > Is is possible to change the 'DATA' parameter via a URL-style variable > such > as: > > ...&map_layername_data="xxx.shp" > > i am able to change every other property of this layer, but not its > data > source. > > if this is not possible, does anyone know of some kind of work-around? > > i am trying to use a single map file for numerous different shape > files... > > thanks in advance! > > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group > University of California at Davis > 530.754.7341 > From covariance at SHAW.CA Thu Apr 21 21:07:19 2005 From: covariance at SHAW.CA (Bob Bruce) Date: Thu, 21 Apr 2005 23:07:19 -0500 Subject: UNIX Fonts? Message-ID: Giridhar, Gregor, Pericles: my UNIX hosting provider solved the problem, here is his message: "Bob, the font issue is resolved and that test page now appears to work. It was a bleepin' nightmare! I'll spare you the details... :)" I have actually asked him for the details so I can supply them to the list but maybe he actually used one of your suggestions. All I know is that I left him with a web page that should have worked along with the font files (from my Windows 2K system) that were all configured and this afternoon he fixed. thanks to everyone for your help, Bob Bruce, Winnipeg, Manitoba On Thu, 21 Apr 2005 11:30:59 -0400, Giridhar Manepalli wrote: >Hey, >I mistakenly send the email, > >you need to > >chkfontpath --add /usr/X11R6/lib/X11/fonts/ttf > >/etc/rc.d/init.d/xfs restart > >Now make a list of all the fonts in a file and point this list in the map. > >Regards, >Giridhar > >On 4/21/05, Giridhar Manepalli wrote: >> Bob, >> Because you said that you are not familiar with unix, I am just >> curious what distribution are you actually using. The following email >> is a generic way for installing fonts on a redhat machine. Let me >> know, if you are not using redhat(or Fedora Core). >> >> mkdir /usr/X11R6/lib/X11/fonts/ttf >> >> cp *.ttf to /usr/X11R6/lib/X11/fonts/ttf >> >> cd /usr/X11R6/lib/X11/fonts/ttf >> >> ttmkfdir -o fonts.dir >> >> >> On 4/21/05, Pericles S. Nacionales wrote: >> > Bob, >> > >> > If you are using the core Microsoft fonts (arial, times new roman, courier >> > new, verdana, etc.) then you can copy those fonts to your Unix machine. You >> > might want to have a look at Microsoft's license on the use of their fonts. >> > I don't know about the licenses of any other Windows truetype fonts so you >> > also might want to go back and read them before you make copies. In general, >> > many of these licenses only prevent you from modifying the fonts and/or >> > selling them--no problem since you're only using it to display labels. >> > >> > There are some free (I'm using the word loosely) fonts that you can use on >> > Unix/Linux--Bitstream has the Vera fonts which is used by Gnome >> > (http://www.gnome.org/fonts/), SIL International has Gentium >> > (http://scripts.sil.org/cms/scripts/page.php? site_id=nrsi&item_id=Gentium_download), >> > Bigelow and Holmes has the Luxi fonts, and there are others. >> > >> > The use of truetype fonts in MapServer is the same for Windows as for >> > Unix/Linux and Mac. You don't need to install them on a system directory >> > (e.g. /usr/share/fonts c:\windows\fonts) but you can put them in some other >> > directory along with your MapServer font list (see >> > http://mapserver.gis.umn.edu/fontset.html). >> > >> > Cheers! >> > -Perry >> > >> > On Wednesday 20 April 2005 11:07 pm, Bob Bruce wrote: >> > > I am not knowledgeable about UNIX systems and am hoping that someone can >> > > help me. I am in the process of migrating my MapServer MapScript pages to a >> > > UNIX server from my Windows 2000 system and am having problems with fonts. >> > > I don't know where to get the equivalent fonts to the ones that I have been >> > > using on my Windows system and the manager of my hosting provider doesn't >> > > seem to know this either. Can someone tell me how to go about getting fonts >> > > for the UNIX system? >> > > >> > > thanks, >> > > Bob Bruce, Winnipeg, Manitoba >> > >> > -- >> > Pericles S. Nacionales >> > >> > Dept. of Ecology, Evolution, and Behavior >> > University of Minnesota >> > work: 612 624 6713 >> > e-mail: nacional at cbs.umn.edu >> > >> From arunoday_chatterjee at REDIFFMAIL.COM Thu Apr 21 21:42:44 2005 From: arunoday_chatterjee at REDIFFMAIL.COM (Arunoday Chatterjee) Date: Thu, 21 Apr 2005 23:42:44 -0500 Subject: Displaying data for only the visible map area using php mapscript Message-ID: I'm trying to develop this map with counties for a particular state, with major highways and secondary highways and streets. Streets is something that i want to display when the map is zoomed into to a certain level. Problem is that i'm not being able to load street data for only the visible area of the map as a result of which apache is failing to process as the street data is enormously huge. Since it is just zooming i'm unable to get any parameter to filter street data by. Can anyone let me know how to do this, basically display data of a layer for only the visible area in the map. I'm using php mapscript 4.2.3. From arunoday_chatterjee at REDIFFMAIL.COM Thu Apr 21 21:43:43 2005 From: arunoday_chatterjee at REDIFFMAIL.COM (Arunoday Chatterjee) Date: Thu, 21 Apr 2005 23:43:43 -0500 Subject: controling the number of symbols displayed using php mapscript Message-ID: I'm displaying symbols for interstate highways and too many of them are coming up and cluttering the map, how do i control this. Any help would be highly appreciated. From arunoday_chatterjee at REDIFFMAIL.COM Thu Apr 21 21:44:02 2005 From: arunoday_chatterjee at REDIFFMAIL.COM (Arunoday Chatterjee) Date: Thu, 21 Apr 2005 23:44:02 -0500 Subject: controling the number of symbols displayed using php mapscript Message-ID: I'm displaying symbols for interstate highways and too many of them are coming up and cluttering the map, how do i control this. Any help would be highly appreciated. I'm using php mapscript 4.2.3. From arunoday_chatterjee at REDIFFMAIL.COM Thu Apr 21 21:45:23 2005 From: arunoday_chatterjee at REDIFFMAIL.COM (Arunoday Chatterjee) Date: Thu, 21 Apr 2005 23:45:23 -0500 Subject: quering layer using result of the query on another layer using php mapscript Message-ID: Can i use the query result from one layer to query another layer. Basically to display only those data from the other layer that is relevant with the first layer that is queried on. Can anyone help on this. I'm using php mapscript 4.2.3. From bob.basques at CI.STPAUL.MN.US Thu Apr 21 21:55:07 2005 From: bob.basques at CI.STPAUL.MN.US (Blammo) Date: Thu, 21 Apr 2005 23:55:07 -0500 Subject: controling the number of symbols displayed using php mapscript In-Reply-To: Message-ID: Arunoday Chatterjee wrote: >I'm displaying symbols for interstate highways and too many of them are >coming up and cluttering the map, how do i control this. Any help would be >highly appreciated. I'm using php mapscript 4.2.3. > > Look at : http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#label Specifically: MINDISTANCE MINFEATURESIZE bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From bob.basques at CI.STPAUL.MN.US Thu Apr 21 21:56:34 2005 From: bob.basques at CI.STPAUL.MN.US (Blammo) Date: Thu, 21 Apr 2005 23:56:34 -0500 Subject: Displaying data for only the visible map area using php mapscript In-Reply-To: Message-ID: Arunoday Chatterjee wrote: >I'm trying to develop this map with counties for a particular state, with >major highways and >secondary highways and streets. Streets is something that i want to >display when the map is >zoomed into to a certain level. Problem is that i'm not being able to load >street data for only the visible area of the map as a result of which >apache is failing to process as the >street data is enormously huge. Since it is just zooming i'm unable to get >any parameter to filter street data by. >Can anyone let me know how to do this, basically display data of a layer >for only the visible area in the map. >I'm using php mapscript 4.2.3. > > > > You may need to tile up the data into smaller chunks, and then use a tileindex to access only those tiles of data within the current view. bobb From lexssmith at HOTMAIL.COM Thu Apr 21 22:15:08 2005 From: lexssmith at HOTMAIL.COM (Lex Smith) Date: Fri, 22 Apr 2005 05:15:08 +0000 Subject: unsubscribe Message-ID: An HTML attachment was scrubbed... URL: From Dejan.Gambin at PULA.HR Fri Apr 22 00:36:11 2005 From: Dejan.Gambin at PULA.HR (Gambin Dejan) Date: Fri, 22 Apr 2005 09:36:11 +0200 Subject: PHP/MapScript doesn't show the map Message-ID: Hello, After installing mapserver version 4.4 on Debian Linux, I have enabled php/mapscript following the instructions on how to enable .phtml files to be processed by cgi php executable. Everything seems to work fine, I can successfully load php_mapscript.so and opening phpinfo_mapscript.phtml gives me phpinfo with mapscript showed. Then I have tried to open test_draw_map.phtml. I was using test.map from mapscript examples. I have tried the simplest phtml page: ... dl("php_mapscript.so"); $map = ms_newMapObj("/var/www/mapserver/tests/test.map"); print $map->numlayers; ... ...and I got an empty page that does not show the number of layers. There is nothing in apache error log and no php error log (php error logging is enabled in php.ini). What can be the problem? p.s. Yesterday I had problems in starting php/mapscript application and I got "Premature end of script headers: /usr/lib/cgi-bin/php" Thanks very much Dejan Gambin From ferencik.ioan at PERSONAL.RO Fri Apr 22 00:45:53 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Fri, 22 Apr 2005 10:45:53 +0300 Subject: Chameleon question Message-ID: Hi list, I use the same map file with phpmapscript and chameleon but the raster data i use does not have the same quality. (with phpmapscript i see a a nice continous DEM but with chameleon there are less colors, something like classes.) Do you know why? _____________________________________________ Cinefil?Castiga o excursie la Venetia http://www.cineplus.ro/concurs From BEN at SYNCERA-ITSOLUTIONS.NL Fri Apr 22 00:50:04 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Fri, 22 Apr 2005 09:50:04 +0200 Subject: Chameleon question Message-ID: Check if your Chameleon config references the 24 bits PNG output format of your MAP file (NAME attribute of OUTPUTFORMAT as param-value). image_type PNG Output image type (eg: PNG, GIF). Must be uppercase. This image format MUST be supported by your browser and GD (on the server). Please don't change that value unless you know what you'r doing. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Ferencik Ioan 04/22/05 09:45am >>> Hi list, I use the same map file with phpmapscript and chameleon but the raster data i use does not have the same quality. (with phpmapscript i see a a nice continous DEM but with chameleon there are less colors, something like classes.) Do you know why? _____________________________________________ Cinefil?Castiga o excursie la Venetia http://www.cineplus.ro/concurs From Dejan.Gambin at PULA.HR Fri Apr 22 01:44:20 2005 From: Dejan.Gambin at PULA.HR (Gambin Dejan) Date: Fri, 22 Apr 2005 10:44:20 +0200 Subject: Segmentation fault when running shp2img on Debian Linux Message-ID: Hello, This is probably related to my problem described in last mail. I have tried to debug php/mapscript with gdb and got "segmentation fault" (libjpeg62.so is being mentioned). Then I tried simple "shp2img -m test.map" and I got "segmentation fault" again (I have tried shp2img on my Windows machine with this map file and it is working). Does anyone know how to solve the problem or maybe I have to reinstall everything? Thanks very much Dejan Gambin From joseluismapserver at YAHOO.ES Fri Apr 22 02:47:29 2005 From: joseluismapserver at YAHOO.ES (Jose Luis Gonzalez) Date: Fri, 22 Apr 2005 11:47:29 +0200 Subject: Points in Symbol Message-ID: Hello to all. I have defined a symbol in my mapfile: SYMBOL NAME "Circle" TYPE ellipse POINTS 12 12 END END It has a defined radius, that is 12 in this case. What is the instruction that I have to use to change this point parameter from my program? I am working in java, but I don?t mind knowing the solution in PHP or another progamming language. I don?t know how to manage the parameters of a symbol of a mapfile from my program. So if someone knows how, please tell me. Thank you Jose Luis --------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From Michael.Smith at ERDC.USACE.ARMY.MIL Fri Apr 22 03:56:12 2005 From: Michael.Smith at ERDC.USACE.ARMY.MIL (Smith, Michael ERDC-CRREL-NH) Date: Fri, 22 Apr 2005 05:56:12 -0500 Subject: changing DATA parameter in mapfile via URL Message-ID: You need to use the DATAPATTERN keyword to allow data changes at the URL level. See the docs at http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#map. DATAPATTERN is a regular expression that gets applied to any requests to change data. Its a security thing. Mike ________________________________ From: UMN MapServer Users List on behalf of Dylan Beaudette Sent: Thu 4/21/2005 5:48 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] changing DATA parameter in mapfile via URL Is is possible to change the 'DATA' parameter via a URL-style variable such as: ...&map_layername_data="xxx.shp" i am able to change every other property of this layer, but not its data source. if this is not possible, does anyone know of some kind of work-around? i am trying to use a single map file for numerous different shape files... thanks in advance! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 -------------- next part -------------- An HTML attachment was scrubbed... URL: From asimpson at I-55.COM Fri Apr 22 05:30:13 2005 From: asimpson at I-55.COM (Simpson) Date: Fri, 22 Apr 2005 07:30:13 -0500 Subject: Time Zone Spatial Data Message-ID: Greetings, I have a requirement to determine timezone offset from GMT given a lat/long. Does anyone know of a spatial data set, or software solution that would satisfy this requirement? I guess if spatial data it would have to have some temporal information to deal with daylight savings times. Sorry for slightly off-topic post. Drew. From jdport at VERITIME.COM Fri Apr 22 06:03:14 2005 From: jdport at VERITIME.COM (Jeff Portwine) Date: Fri, 22 Apr 2005 09:03:14 -0400 Subject: controling the number of symbols displayed using php mapscript Message-ID: I don't know about controlling the number of them specifically, but you can set the "buffer" value and the "mindistance" value to keep them from cluttering. The BUFFER value tells how many pixels you want to be between two symbols, and the MINDISTANCE value tells how many pixels you want between instances of the same symbol. So if you set: BUFFER 5 MINDISTANCE 300 You will see at least 5 pixels separating two symbols in that layer, and you will see at least 300 pixels between instances of the same symbol... by instances of the same symbol I mean for example if you are labeling streets, you won't see a particular street name twice right next too each other, there will be at least 300 pixels between the two istances of that street name. Hope that helps, Jeff ----- Original Message ----- From: "Arunoday Chatterjee" To: Sent: Friday, April 22, 2005 12:44 AM Subject: [UMN_MAPSERVER-USERS] controling the number of symbols displayed using php mapscript > I'm displaying symbols for interstate highways and too many of them are > coming up and cluttering the map, how do i control this. Any help would be > highly appreciated. I'm using php mapscript 4.2.3. > From cdaily at GMAIL.COM Fri Apr 22 07:20:09 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Fri, 22 Apr 2005 09:20:09 -0500 Subject: quering layer using result of the query on another layer using php mapscript In-Reply-To: Message-ID: I can't see why not. Once you have your first set of results, just loop through them and perform a query on each of the result shapes. Are you trying to query points both times? If you can be a bit more specific, I can help you out. -Camden On 4/21/05, Arunoday Chatterjee wrote: > Can i use the query result from one layer to query another layer. > Basically to display only those data from the other layer that is relevant > with the first layer that is queried on. > Can anyone help on this. > > I'm using php mapscript 4.2.3. > From cdaily at GMAIL.COM Fri Apr 22 07:26:01 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Fri, 22 Apr 2005 09:26:01 -0500 Subject: PHP/MapScript doesn't show the map In-Reply-To: Message-ID: Try using mapscript's error reporting to find out what's going wrong. At the beginning of your script, put: ms_ResetErrorList(); Then, at the end of the script, put this code: $error = ms_GetErrorObj(); while($error AND $error->code != MS_NOERR) { printf("Error in %s: %s
\n", $error->routine, $error->message); $error = $error->next(); } That may get you started with debugging. From cdaily at GMAIL.COM Fri Apr 22 07:34:11 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Fri, 22 Apr 2005 09:34:11 -0500 Subject: Points in Symbol In-Reply-To: <20050422094729.98661.qmail@web26407.mail.ukl.yahoo.com> Message-ID: I don't know about Java, but in PHP you would first do $symbol = $map->getsymbolbyname("circle"); $points = $symbol->getpointsarray(); to get an array of the points. Then loop through them like this: for ($i=0; $i < count($points); $i++) { $new_points[$i] = $points[$i] ..... // do whatever you want with your points here } Then set them back to the symbol: $symbol->setpoints($new_points); I'd imagine the java code to do this isn't too different. -Camden From dylan at IICI.NO-IP.ORG Fri Apr 22 07:40:26 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Fri, 22 Apr 2005 07:40:26 -0700 Subject: changing DATA parameter in mapfile via URL [fixed] In-Reply-To: <8E1C1E308AE4554F868ECE0E7F42F6472944BC@ERD-ML4ERD.erd.ds.usace.army.mil> Message-ID: Thank you everyone who has offered suggestions, i now have my application working with parameter substitution . cheers! On Apr 22, 2005, at 3:56 AM, Smith, Michael ERDC-CRREL-NH wrote: > You need to use the DATAPATTERN keyword to allow data changes at the > URL level. See the docs at > http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#map. > DATAPATTERN is a regular expression that gets applied to any requests > to change data. Its a security thing. > ? > Mike > ? > > From: UMN MapServer Users List on behalf of Dylan Beaudette > Sent: Thu 4/21/2005 5:48 PM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: [UMN_MAPSERVER-USERS] changing DATA parameter in mapfile via > URL > > > Is is possible to change the 'DATA' parameter via a URL-style variable > such > as: > > ...&map_layername_data="xxx.shp" > > i am able to change every other property of this layer, but not its > data > source. > > if this is not possible, does anyone know of some kind of work-around? > > i am trying to use a single map file for numerous different shape > files... > > thanks in advance! > > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group > University of California at Davis > 530.754.7341 > -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From dylan at IICI.NO-IP.ORG Fri Apr 22 07:49:22 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Fri, 22 Apr 2005 07:49:22 -0700 Subject: pass URL arguments to DHTML mapserver interface Message-ID: Hi everyone, Having recently experimented with the DHTML UMN site, I have to say that it is a very elegant solution with clear documentation within the source code. So far i have been able to pass arguments on the URL to the DHTML interface such that: mapserver_page.html?variable=value where 'variable' and its value are accessible to the JS code within the DHTML page. However, I cannot seem to figure out how to get these variables passed on to the mapserver CGI when it is called. For example, I would like to call the DHTML page with some parameters: mapserver_page.html?county=CA_19 ..which are then passed on to the mapserver CGI: /path/to/cgi/mapserv?county=CA_19 is there currently any way of doing this? thanks in advance, and thanks to the mapserver folks for the excellent DHTML examples! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From marcelito20 at GMAIL.COM Fri Apr 22 07:53:38 2005 From: marcelito20 at GMAIL.COM (Marcelo Carrillo) Date: Fri, 22 Apr 2005 09:53:38 -0500 Subject: C# Mapscript Message-ID: Hi I'm developing a web gis application. I've using php mapscript but my company decide to change to .NET. Where can I find these installers or an example or information about it? Any help will be appreciated Regards, Marcelo Carrillo -------------- next part -------------- An HTML attachment was scrubbed... URL: From BEN at SYNCERA-ITSOLUTIONS.NL Fri Apr 22 08:20:47 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Fri, 22 Apr 2005 17:20:47 +0200 Subject: pass URL arguments to DHTML mapserver interface Message-ID: Dylan, I think you can use javascript to do this. Use document.location.search in your mapserver_page.html and set a respective FORM variable using document.myform.myelement.value, or just add it to the Mapserver URL as a string. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl >>> Dylan Beaudette 04/22/05 04:49pm >>> Hi everyone, Having recently experimented with the DHTML UMN site, I have to say that it is a very elegant solution with clear documentation within the source code. So far i have been able to pass arguments on the URL to the DHTML interface such that: mapserver_page.html?variable=value where 'variable' and its value are accessible to the JS code within the DHTML page. However, I cannot seem to figure out how to get these variables passed on to the mapserver CGI when it is called. For example, I would like to call the DHTML page with some parameters: mapserver_page.html?county=CA_19 ...which are then passed on to the mapserver CGI: /path/to/cgi/mapserv?county=CA_19 is there currently any way of doing this? thanks in advance, and thanks to the mapserver folks for the excellent DHTML examples! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From dylan at IICI.NO-IP.ORG Fri Apr 22 08:22:27 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Fri, 22 Apr 2005 08:22:27 -0700 Subject: box zooming In-Reply-To: Message-ID: Well... this project is based on a map file where i was using image legends... Looking at this page on HTML legends, it looks like i should be able to cobble something together. Just one question, does the DHTML mapserver interface expect an HTML legend? thanks! On Apr 22, 2005, at 7:58 AM, Steve Lime wrote: > Gee that looks familiar. Are you trying to use image legends or html > legends? > > Steve > >>>> Dylan Beaudette 4/21/2005 5:26:59 PM >>> > Steve, > > Thanks for the quick responses. I started a new thread on this topic, > and > included the link to the actual application there. > > here it is again: > http://169.237.35.250/~dylan/mapserver/dhtml/landview_dhtml_x.html > > thanks! > > On Thursday 21 April 2005 03:15 pm, Steve Lime wrote: >> It would be easier to help if we could see the whole application. > Off >> the top of my head I would think >> there might be a problem with div names, make sure those jive... >> >> Steve >> >>>>> Dylan Beaudette 4/21/2005 1:51:34 PM >>> >> >> Bart, >> >> Wow! you were right - i was able to fix up my old mapserver > application >> with >> the source fromthe UMN site!! >> >> however, i noticed that my legend does not seem to be rendered. >> >> i modified the source of the UMN page, near the legendURL section; >> >> ------------------ >> // update the legend >> var legendURL = >> > "http://169.237.35.250/cgi-bin/mapserv?map=/home/dylan/public_html/ > mapserve > >> r/mapunit/fresno_w.map&mode=legend&layers=" + ms.getlayerlist('+') + >> "&mapext=" + ms.extent[0] + "+" + >> ms.extent[1] + >> "+" + ms.extent[2] + "+" + ms.extent[3] + "&mapsize=" + ms.width + >> "+" + >> ms.height; >> legend.setcontent(legendURL); >> ------------------------------- >> >> i know that the variable 'legendURL' is valid, as it expands to the >> working: >> > http://169.237.35.250/cgi-bin/mapserv?map=/home/dylan/public_html/ > mapserver > >> /mapunit/fresno_w.map&mode=legend&layers=&mapext= >> -2133333.6828213334+-216382 >> .321635+-1954777.1482586667+-82464.920713&mapsize=640+480 >> >> >> ... but somehow the legend image is not drawn... >> >> any ideas on this one? >> >> thanks for the help!! >> >> >> -- >> Dylan Beaudette >> Soils and Biogeochemistry Graduate Group >> University of California at Davis >> 530.754.7341 >> >> On Thursday 21 April 2005 09:05 am, Bart van den Eijnden wrote: >>> Hi Dylan, >>> >>> view source is enough (at least it was for me), you can see the >> >> references >> >>> to the various javascript libraries used and download them, also > how >> >> to >> >>> use them in the HTML page itself. >>> >>> Best regards, >>> Bart >>> >>> On Thu, 21 Apr 2005 08:58:16 -0700, Dylan Beaudette >> >> >> >>> wrote: >>>> is there a place to see tis code, or is the HTML source on that >> >> page >> >>>> enough? >>>> >>>> thanks! >>>> >>>> On Apr 21, 2005, at 1:37 AM, Bart van den Eijnden wrote: >>>>> Have a look at DBox, eg: >>>>> >>>>> http://www.dnr.state.mn.us/maps/landview_dhtml_x.html >>>>> >>>>> Best regards, >>>>> Bart >>>>> >>>>> Bart van den Eijnden >>>>> Syncera-ITSolutions >>>>> Postbus 270 >>>>> 2600 AG DELFT >>>>> >>>>> tel.nr.: 015-7512436 >>>>> email: BEN at Syncera-ITSolutions.nl >>>>> >>>>>>>> Juan Baron 04/21/05 10:35am >>> >>>>> >>>>> Hello: >>>>> >>>>> Is possible to do box zooming without applet? >>>>> >>>>> Thank's >>>> >>>> -- >>>> Dylan Beaudette >>>> Soils and Biogeochemistry Graduate Group >>>> University of California at Davis >>>> 530.754.7341 >>> >>> -- >>> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > > > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group > University of California at Davis > 530.754.7341 > > -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From dylan at IICI.NO-IP.ORG Fri Apr 22 08:22:59 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Fri, 22 Apr 2005 08:22:59 -0700 Subject: consolidation of .map file contents In-Reply-To: <4BF377919225F449BB097CB76FFE9BC818835E@ptolemy.topozone.com> Message-ID: Ed, Thanks for the excellent suggestions. I will keep this method in mind when developing our new mapserver applications. After more exchanges with the good people on this list, and bit of monkeying with some of the DHTML code on the UMN site, it looks like i will be able to use a single map file for the many counties' worth of data that we have. Cheers! On Apr 20, 2005, at 4:44 PM, Ed McNierney wrote: > Dylan - > > Steve's suggestions are quite reasonable. As he mentioned, I use the C > preprocessor to manage the generation of .map files. The use of > #define > and #include directives is especially helpful when you have a large > number of attributes you want to keep consistent across layers. For > example, I might have a "street map" that's made up of several > different > LAYERs (interstate highways, state highways, local roads, etc., etc.). > Each of them might have labels using fonts of a particular style and > size. If I use a statement like: > > #define STREETFACE "Arial" > #define STREETSIZE 10 > > Then it's easy for me to change the typeface or size of all those > layers > at once, keeping them consistent. > > - Ed > > Ed McNierney > President and Chief Mapmaker > TopoZone.com / Maps a la carte, Inc. > 73 Princeton Street, Suite 305 > North Chelmsford, MA 01863 > Phone: +1 (978) 251-4242 > Fax: +1 (978) 251-1396 > ed at topozone.com > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] > On > Behalf Of Stephen Woodbridge > Sent: Wednesday, April 20, 2005 5:39 PM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] consolidation of .map file contents > > Dylan Beaudette wrote: >> Steve, >> >> Thanks for the input. To clarify a bit, we have county -by-county >> information, with associated data in a MySQL database that is accessed > >> via Mapserver-style query templates and PHP. >> >> There are 2 current reasons why each county has its own .map file (and > >> they might not even be very good ones, i hope!): >> >> 1. each map obviously has a different: >> -context map image >> -geographic extent >> -shape file for the main content, rendered according to the county > > One question is why not make all your counties as a seamless map using > a > tileindex. I have 3300+ counties of Tiger data and each county is a > directory of about 10 separate shapefiles for each of the layers. You > can do the same for images depending on projection issues. > > http://imaptools.com/tiger/ > http://imaptools.com/tiger2/ (Googlesque styling) > > You may have reasons why you don't what to tile the counties, and you > could change the shapefile on the fly using mapscript. > > As for geographic extents, you already have a way to select the county, > it would be pretty straight forward to load the extents of each county > into a table and then look up the extents after the county has been > selected and then position the map based on those extents. > > Create a table like: > > County_ID | State | County_Name | Shapefile | minx | miny | maxx | maxy > >> 2. the query results need to contain a unique county ID >> >> a lot of these problems could be resolved if i could figure out how to > >> pass mapserver configuration parameters in the URL: i.e. the county >> ID, the geographic extent, and the name of the shape file containing >> the main content for that county. > > You can edit most stuff in the mapfile via the URL. If you had the > table > of extents you could add the county ID, all my Tiger county polygons > have a unique FIPS id like 25017 for Middlesex County, MA. The 25 is > actually the FIPS code for MA. Do you have anything like that in the > shapefile attributes? > >> does this seem reasonable? > > It all sounds very reasonable, and if you are using mapscript then it > should be all the more easy to do these things. In mapscript if you > didn't want your counties tiled, then you could change the shapefile in > mapscript based on the county you selected. > > There should be example around for most of the pieces mentioned above. > Ask the list for any specific issues and I'm sure you'll get the help > you need. > > -Steve W. > >> thanks! >> >> -- >> Dylan Beaudette >> Soils and Biogeochemistry Graduate Group University of California at >> Davis >> 530.754.7341 >> >> On Wednesday 20 April 2005 11:47 am, Stephen Woodbridge wrote: >> >>> All of your ideas are valid and can work depending on what you are >>> try > >>> to accomplish. I know Ed at Topozone.com is using template mapfile >>> fragments and using the cpp and Makefiles to generate a large number >>> of mapfiles based on change the DEFINES. That way if you need to make >>> a change to a section that is in all your mapfiles you just change >>> one > >>> file and type make. >>> >>> But before you solve the technology, you might want to describe why >>> you need 200 mapfiles and what type of things are changing from one >>> to the other. There might be much better solutions. >>> >>> -Steve W. >>> >>> Dylan Beaudette wrote: >>> >>>> Hi everyone, >>>> >>>> We have been using Mapserver for about a year now with a great deal >>>> of success on small projects (i.e. single map file, single html >>>> template, single query template). >>>> >>>> Now that we are considering a more complicated project with nearly >>>> 200 .map files and their associated html templates and query >>>> templates - quite a bit to manage should any cosmetic changes need >>>> to > >>>> be made in the map files. >>>> >>>> Is there any way to "include" bits of a central map file to >>>> consolidate the configuration of such a large project, or would it >>>> be > >>>> better to use a single .map file, customizing it through the URL > passed to it... >>>> >>>> ...or is phpmapscript a viable option? >>>> >>>> thanks in advancce for any ideas! >>>> >>>> >>>> >>>> -- >>>> Dylan Beaudette >>>> Soils and Biogeochemistry Graduate Group University of California at >>>> Davis >>>> 530.754.7341 >> >> > > -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From cvhackel at YAHOO.COM Fri Apr 22 09:09:59 2005 From: cvhackel at YAHOO.COM (Chris Hackel) Date: Fri, 22 Apr 2005 09:09:59 -0700 Subject: Drawing TIGER file Polygons Message-ID: How does one extract polygon data from TIGER files in a directory? I can't find any good documentation and the only reference I have is the snippet below. I understand the script for the most part, but this is coming from a database, whereas I just have a directory with the RT1, RT2, RT3.. etc files in it. Thanks! LAYER NAME "TIGER/Line Polygons" PROJECTION "proj=latlong" END STATUS DEFAULT CONNECTIONTYPE postgis CONNECTION "dbname=tigertest" DATA "wkb_geometry from sf_poly" TYPE POLYGON CLASSITEM "ZCTA5" CLASS NAME "Water" EXPRESSION /HH$/ COLOR 128 192 255 END CLASS NAME "Land" EXPRESSION /[^H]$/ COLOR 255 255 192 END END From mdieterich at GMAIL.COM Fri Apr 22 09:16:53 2005 From: mdieterich at GMAIL.COM (Mark Dieterich) Date: Fri, 22 Apr 2005 12:16:53 -0400 Subject: state names with national atlas data Message-ID: Hi everyone, I'm trying to use the generalized national atlas data at high zoom levels for my maps. It's working out pretty well, until I get to a zoom level where all I want to display is state names. Two problems: 1) I only want each state name to display once. I can put a really big MINDISTANCE in my mapfile to handle this, but it introduces the next problem. 2) Where mapserver chooses to put the label appears to be random. I'm sure it's not, but it certainly isn't the center of the state. Any idea how I can work around these two issues? Thanks, Mark From fwarmerdam at GMAIL.COM Fri Apr 22 09:19:58 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri, 22 Apr 2005 12:19:58 -0400 Subject: Drawing TIGER file Polygons In-Reply-To: <20050422160959.28714.qmail@web60505.mail.yahoo.com> Message-ID: On 4/22/05, Chris Hackel wrote: > How does one extract polygon data from TIGER files in > a directory? I can't find any good documentation and > the only reference I have is the snippet below. > I understand the script for the most part, but this is > coming from a database, whereas I just have a > directory with the RT1, RT2, RT3.. etc files in it. Chris, The GDAL source distribution includes a tigerpoly.py script that will form polygons from tiger data. Basically the issue with TIGER data via OGR is that OGR gives a very literal view of the tiger data and you need to form the polygons yourself. http://www.gdal.org/srctree/pymod/samples/tigerpoly.py I understand Schyuler (author of Mapping Hacks: http://mappinghacks.com) has also written a similar script that loads the data into PostGIS and does some additinoal transformations on it. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From lfilak at MEDINACO.ORG Fri Apr 22 09:23:21 2005 From: lfilak at MEDINACO.ORG (Lowell Filak) Date: Fri, 22 Apr 2005 12:23:21 -0400 Subject: quering layer using result of the query on another layer using php mapscript Message-ID: The following message was sent by Arunoday Chatterjee on Thu, 21 Apr 2005 23:45:23 -0500. > Can i use the query result from one layer to query another layer. > Basically to display only those data from the other layer that is relevant > with the first layer that is queried on. > Can anyone help on this. > > I'm using php mapscript 4.2.3. Arunoday, That is actually what layer->querybyfeatures is for. HTH Lowell From cvhackel at YAHOO.COM Fri Apr 22 09:28:21 2005 From: cvhackel at YAHOO.COM (Chris Hackel) Date: Fri, 22 Apr 2005 09:28:21 -0700 Subject: Drawing TIGER file Polygons In-Reply-To: 6667 Message-ID: Frank--Thanks very much for the lead. Is there a better (freely available) data source for me to use? One that would make the process simpler? I'm completely new to this and the Census TIGER files were the only option I found. --- Frank Warmerdam wrote: > On 4/22/05, Chris Hackel wrote: > > How does one extract polygon data from TIGER files > in > > a directory? I can't find any good documentation > and > > the only reference I have is the snippet below. > > I understand the script for the most part, but > this is > > coming from a database, whereas I just have a > > directory with the RT1, RT2, RT3.. etc files in > it. > > Chris, > > The GDAL source distribution includes a tigerpoly.py > script > that will form polygons from tiger data. Basically > the issue with > TIGER data via OGR is that OGR gives a very literal > view of the > tiger data and you need to form the polygons > yourself. > > > http://www.gdal.org/srctree/pymod/samples/tigerpoly.py > > I understand Schyuler (author of Mapping Hacks: > http://mappinghacks.com) > has also written a similar script that loads the > data into PostGIS and > does some additinoal transformations on it. > > Best regards, > -- > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank > Warmerdam, warmerdam at pobox.com > light and sound - activate the windows | > http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial > Programmer for Rent > From gireddy at GMAIL.COM Fri Apr 22 09:49:48 2005 From: gireddy at GMAIL.COM (Shashi Gireddy) Date: Fri, 22 Apr 2005 11:49:48 -0500 Subject: Drawing TIGER file Polygons In-Reply-To: <20050422162821.87518.qmail@web60504.mail.yahoo.com> Message-ID: Hi Chris, I am working on Alabama census, I downloaded SF1 shape files from esri downloads http://www.esri.com/data/download/census2000_tigerline/ and modified the backed data with ArcView (or ArcMap of ArcGIS). ESRI provides only SF1 data(initially I did it manually when I don't know that I can edit and add external data), but you can create SF3 tabkes and map them back onto shape files although its alot manual work. hope this will work, thank you, On 4/22/05, Chris Hackel wrote: > Frank--Thanks very much for the lead. > Is there a better (freely available) data source for > me to use? One that would make the process simpler? > I'm completely new to this and the Census TIGER files > were the only option I found. > > > --- Frank Warmerdam wrote: > > On 4/22/05, Chris Hackel wrote: > > > How does one extract polygon data from TIGER files > > in > > > a directory? I can't find any good documentation > > and > > > the only reference I have is the snippet below. > > > I understand the script for the most part, but > > this is > > > coming from a database, whereas I just have a > > > directory with the RT1, RT2, RT3.. etc files in > > it. > > > > Chris, > > > > The GDAL source distribution includes a tigerpoly.py > > script > > that will form polygons from tiger data. Basically > > the issue with > > TIGER data via OGR is that OGR gives a very literal > > view of the > > tiger data and you need to form the polygons > > yourself. > > > > > > > http://www.gdal.org/srctree/pymod/samples/tigerpoly.py > > > > I understand Schyuler (author of Mapping Hacks: > > http://mappinghacks.com) > > has also written a similar script that loads the > > data into PostGIS and > > does some additinoal transformations on it. > > > > Best regards, > > -- > > > ---------------------------------------+-------------------------------------- > > I set the clouds in motion - turn up | Frank > > Warmerdam, warmerdam at pobox.com > > light and sound - activate the windows | > > http://pobox.com/~warmerdam > > and watch the world go round - Rush | Geospatial > > Programmer for Rent > > > -- Shashi Kiran Reddy. Gireddy, Graduate Assistant, CBER, University of Alabama. http://www.cs.ua.edu/shashi Home: 205-752-5137 Cell: 205-657-1438 From steve.lime at DNR.STATE.MN.US Fri Apr 22 10:20:56 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri, 22 Apr 2005 12:20:56 -0500 Subject: box zooming Message-ID: It does if all you did is copy files. Actually an image legend is easier. You just have to create an image where the legend div is and update it's src. Try the attached script, it should be close... Steve >>> Dylan Beaudette 4/22/2005 10:22:27 AM >>> Well... this project is based on a map file where i was using image legends... Looking at this page on HTML legends, it looks like i should be able to cobble something together. Just one question, does the DHTML mapserver interface expect an HTML legend? thanks! On Apr 22, 2005, at 7:58 AM, Steve Lime wrote: > Gee that looks familiar. Are you trying to use image legends or html > legends? > > Steve > >>>> Dylan Beaudette 4/21/2005 5:26:59 PM >>> > Steve, > > Thanks for the quick responses. I started a new thread on this topic, > and > included the link to the actual application there. > > here it is again: > http://169.237.35.250/~dylan/mapserver/dhtml/landview_dhtml_x.html > > thanks! > > On Thursday 21 April 2005 03:15 pm, Steve Lime wrote: >> It would be easier to help if we could see the whole application. > Off >> the top of my head I would think >> there might be a problem with div names, make sure those jive... >> >> Steve >> >>>>> Dylan Beaudette 4/21/2005 1:51:34 PM >>> >> >> Bart, >> >> Wow! you were right - i was able to fix up my old mapserver > application >> with >> the source fromthe UMN site!! >> >> however, i noticed that my legend does not seem to be rendered. >> >> i modified the source of the UMN page, near the legendURL section; >> >> ------------------ >> // update the legend >> var legendURL = >> > "http://169.237.35.250/cgi-bin/mapserv?map=/home/dylan/public_html/ > mapserve > >> r/mapunit/fresno_w.map&mode=legend&layers=" + ms.getlayerlist('+') + >> "&mapext=" + ms.extent[0] + "+" + >> ms.extent[1] + >> "+" + ms.extent[2] + "+" + ms.extent[3] + "&mapsize=" + ms.width + >> "+" + >> ms.height; >> legend.setcontent(legendURL); >> ------------------------------- >> >> i know that the variable 'legendURL' is valid, as it expands to the >> working: >> > http://169.237.35.250/cgi-bin/mapserv?map=/home/dylan/public_html/ > mapserver > >> /mapunit/fresno_w.map&mode=legend&layers=&mapext= >> -2133333.6828213334+-216382 >> .321635+-1954777.1482586667+-82464.920713&mapsize=640+480 >> >> >> ... but somehow the legend image is not drawn... >> >> any ideas on this one? >> >> thanks for the help!! >> >> >> -- >> Dylan Beaudette >> Soils and Biogeochemistry Graduate Group >> University of California at Davis >> 530.754.7341 >> >> On Thursday 21 April 2005 09:05 am, Bart van den Eijnden wrote: >>> Hi Dylan, >>> >>> view source is enough (at least it was for me), you can see the >> >> references >> >>> to the various javascript libraries used and download them, also > how >> >> to >> >>> use them in the HTML page itself. >>> >>> Best regards, >>> Bart >>> >>> On Thu, 21 Apr 2005 08:58:16 -0700, Dylan Beaudette >> >> >> >>> wrote: >>>> is there a place to see tis code, or is the HTML source on that >> >> page >> >>>> enough? >>>> >>>> thanks! >>>> >>>> On Apr 21, 2005, at 1:37 AM, Bart van den Eijnden wrote: >>>>> Have a look at DBox, eg: >>>>> >>>>> http://www.dnr.state.mn.us/maps/landview_dhtml_x.html >>>>> >>>>> Best regards, >>>>> Bart >>>>> >>>>> Bart van den Eijnden >>>>> Syncera-ITSolutions >>>>> Postbus 270 >>>>> 2600 AG DELFT >>>>> >>>>> tel.nr.: 015-7512436 >>>>> email: BEN at Syncera-ITSolutions.nl >>>>> >>>>>>>> Juan Baron 04/21/05 10:35am >>> >>>>> >>>>> Hello: >>>>> >>>>> Is possible to do box zooming without applet? >>>>> >>>>> Thank's >>>> >>>> -- >>>> Dylan Beaudette >>>> Soils and Biogeochemistry Graduate Group >>>> University of California at Davis >>>> 530.754.7341 >>> >>> -- >>> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > > > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group > University of California at Davis > 530.754.7341 > > -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve.lime at DNR.STATE.MN.US Fri Apr 22 10:29:28 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri, 22 Apr 2005 12:29:28 -0500 Subject: state names with national atlas data Message-ID: The problem is the data (ok, and MapServer, but it's easier to address the data). You've got multipolygon states and their order in the shapefile is influencing which part gets labeled. If this is the case you have a couple of options: 1) Turn the multiple polygons into one multipart polygon for each state (except for perhaps Michigan). That way you can only get one label/state. Doing so will require a desktop tool (like arcview) but could also be done using MapScript. 2) use sortshp to sort your shapefile based on area (hopefully you have an area or some size related attribute) in ascending order. This will cause labels for the larger polygons to get priority when labeling (last on the map is labeled first). When combined with MINDISTANCE only the largest part should get labeled. Steve >>> Mark Dieterich 4/22/2005 11:16:53 AM >>> Hi everyone, I'm trying to use the generalized national atlas data at high zoom levels for my maps. It's working out pretty well, until I get to a zoom level where all I want to display is state names. Two problems: 1) I only want each state name to display once. I can put a really big MINDISTANCE in my mapfile to handle this, but it introduces the next problem. 2) Where mapserver chooses to put the label appears to be random. I'm sure it's not, but it certainly isn't the center of the state. Any idea how I can work around these two issues? Thanks, Mark From Michael.Micallef at MTO.GOV.ON.CA Fri Apr 22 10:45:48 2005 From: Michael.Micallef at MTO.GOV.ON.CA (Micallef, Michael (MTO)) Date: Fri, 22 Apr 2005 13:45:48 -0400 Subject: Newbie problems Message-ID: I am trying out the Chameleon examples - trying to add a polygon shape file to one of the existing map files through Mapedit. When testing the map file through the sample apps or mapbrower: I keep getting either a X in the upper left of the map window or if I move away from the area in the map that the data I added is, the map draws. but a soon as I move towards it I get the X box again. The shape file is in UTM different from the map but I specified the projection information in maplab? Any suggestions on where to start? mike From dylan at IICI.NO-IP.ORG Fri Apr 22 11:08:53 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Fri, 22 Apr 2005 11:08:53 -0700 Subject: pass URL arguments to DHTML mapserver interface [fixed] In-Reply-To: <5383fa5e0504221009447e45f4@mail.gmail.com> Message-ID: On Friday 22 April 2005 10:09 am, Matthew Perry wrote: > Dylan, > > When the mapserver CGI is called from the Landview app, it creates > the URL via the ms.* properties. There are two properties, ms.options > and ms.queryoptions, reserved for tacking on additional CGI arguments > to the request URLs. Thanks Matthew and others. i was able to make things work by making some small changes to mapserv_new.js with the 'this.options' and 'this.queryoptions' variables. thanks! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From dylan at IICI.NO-IP.ORG Fri Apr 22 11:10:47 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Fri, 22 Apr 2005 11:10:47 -0700 Subject: DHTML legend problems [fixed] In-Reply-To: Message-ID: On Thursday 21 April 2005 01:50 pm, Luca Manganelli wrote: > On 4/21/05, Dylan Beaudette wrote: > > ... so my first problem, was that Konqueror was not rendering anything. > > Tried with Konqueror 3.4: I can see all. Try to upgrade to KDE 3.4, as > KHTML is improved very much thanks for the tip. turns out that i needed to specify an HTML template for my legend. -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From dylan at IICI.NO-IP.ORG Fri Apr 22 11:13:36 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Fri, 22 Apr 2005 11:13:36 -0700 Subject: box zooming In-Reply-To: Message-ID: Steve, yes, my previous project (where i copied the map file from) was using an image legend. i was able to get a working legend after creating a HTML legend template, as described on the mapserver website. this approach is a little cleaner than what we had before as well. thanks for the tips! Dylan On Friday 22 April 2005 10:20 am, Steve Lime wrote: > It does if all you did is copy files. Actually an image legend is > easier. You just have > to create an image where the legend div is and update it's src. Try the > attached script, > it should be close... > > Steve > > >>> Dylan Beaudette 4/22/2005 10:22:27 AM >>> > > Well... this project is based on a map file where i was using image > legends... > > Looking at this page on HTML legends, it looks like i should be able to > > cobble something together. > > Just one question, does the DHTML mapserver interface expect an HTML > legend? > > thanks! > > On Apr 22, 2005, at 7:58 AM, Steve Lime wrote: > > Gee that looks familiar. Are you trying to use image legends or html > > legends? > > > > Steve > > > >>>> Dylan Beaudette 4/21/2005 5:26:59 PM >>> > > > > Steve, > > > > Thanks for the quick responses. I started a new thread on this > > topic, > > > and > > included the link to the actual application there. > > > > here it is again: > > http://169.237.35.250/~dylan/mapserver/dhtml/landview_dhtml_x.html > > > > thanks! > > > > On Thursday 21 April 2005 03:15 pm, Steve Lime wrote: > >> It would be easier to help if we could see the whole application. > > > > Off > > > >> the top of my head I would think > >> there might be a problem with div names, make sure those jive... > >> > >> Steve > >> > >>>>> Dylan Beaudette 4/21/2005 1:51:34 PM >>> > >> > >> Bart, > >> > >> Wow! you were right - i was able to fix up my old mapserver > > > > application > > > >> with > >> the source fromthe UMN site!! > >> > >> however, i noticed that my legend does not seem to be rendered. > >> > >> i modified the source of the UMN page, near the legendURL section; > >> > >> ------------------ > >> // update the legend > >> var legendURL = > > > > "http://169.237.35.250/cgi-bin/mapserv?map=/home/dylan/public_html/ > > mapserve > > > >> r/mapunit/fresno_w.map&mode=legend&layers=" + ms.getlayerlist('+') > > + > > >> "&mapext=" + ms.extent[0] + "+" + > >> ms.extent[1] + > >> "+" + ms.extent[2] + "+" + ms.extent[3] + "&mapsize=" + ms.width > > + > > >> "+" + > >> ms.height; > >> legend.setcontent(legendURL); > >> ------------------------------- > >> > >> i know that the variable 'legendURL' is valid, as it expands to the > >> working: > > > > http://169.237.35.250/cgi-bin/mapserv?map=/home/dylan/public_html/ > > mapserver > > > >> /mapunit/fresno_w.map&mode=legend&layers=&mapext= > >> -2133333.6828213334+-216382 > >> .321635+-1954777.1482586667+-82464.920713&mapsize=640+480 > >> > >> > >> ... but somehow the legend image is not drawn... > >> > >> any ideas on this one? > >> > >> thanks for the help!! > >> > >> > >> -- > >> Dylan Beaudette > >> Soils and Biogeochemistry Graduate Group > >> University of California at Davis > >> 530.754.7341 > >> > >> On Thursday 21 April 2005 09:05 am, Bart van den Eijnden wrote: > >>> Hi Dylan, > >>> > >>> view source is enough (at least it was for me), you can see the > >> > >> references > >> > >>> to the various javascript libraries used and download them, also > > > > how > > > >> to > >> > >>> use them in the HTML page itself. > >>> > >>> Best regards, > >>> Bart > >>> > >>> On Thu, 21 Apr 2005 08:58:16 -0700, Dylan Beaudette > >> > >> > >> > >>> wrote: > >>>> is there a place to see tis code, or is the HTML source on that > >> > >> page > >> > >>>> enough? > >>>> > >>>> thanks! > >>>> > >>>> On Apr 21, 2005, at 1:37 AM, Bart van den Eijnden wrote: > >>>>> Have a look at DBox, eg: > >>>>> > >>>>> http://www.dnr.state.mn.us/maps/landview_dhtml_x.html > >>>>> > >>>>> Best regards, > >>>>> Bart > >>>>> > >>>>> Bart van den Eijnden > >>>>> Syncera-ITSolutions > >>>>> Postbus 270 > >>>>> 2600 AG DELFT > >>>>> > >>>>> tel.nr.: 015-7512436 > >>>>> email: BEN at Syncera-ITSolutions.nl > >>>>> > >>>>>>>> Juan Baron 04/21/05 10:35am >>> > >>>>> > >>>>> Hello: > >>>>> > >>>>> Is possible to do box zooming without applet? > >>>>> > >>>>> Thank's > >>>> > >>>> -- > >>>> Dylan Beaudette > >>>> Soils and Biogeochemistry Graduate Group > >>>> University of California at Davis > >>>> 530.754.7341 > >>> > >>> -- > >>> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > > > > -- > > Dylan Beaudette > > Soils and Biogeochemistry Graduate Group > > University of California at Davis > > 530.754.7341 > > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group > University of California at Davis > 530.754.7341 -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From bdavis at USGS.GOV Fri Apr 22 11:12:30 2005 From: bdavis at USGS.GOV (Brian Davis) Date: Fri, 22 Apr 2005 13:12:30 -0500 Subject: Version 4.4.1 dependency and/or linux platform dependency? Message-ID: Frank, et. al., I have decided to put the adjust extent fuctionality in my javascript, which calls java to do the actual drawing. I want the java to know the exent as defined in the current context of its invocation, and not have to worry about dynamic adjustments. My .js calls it each time we make a change, so I'll leave it alone, and just send a new set of valid corner coordinates. (assuming I can figure out how to do that based on your example ........) My question is, I can figure out how to do a max in javascript, how do I do a: MS_CELLSIZE? Thanks again. Brian On Thu, 21 Apr 2005 14:33:28 -0500, Brian Davis wrote: >Frank, >Thanks for the info. >I just wanted to make sure of the situation before >I went of and wrote software to do this manually. > >Now you'll know to get ready to duck if you see any more postings by me ... > >Brian > > > >On Thu, 21 Apr 2005 11:58:47 -0400, Frank Warmerdam >wrote: > >>On 4/21/05, Brian Davis wrote: >>> Frank, >>> >>> Thanks for your reply. >>> Yes, you understood my problem correctly. >>> Now, I am trying to understand your response ..... >>> I AM making wms requests, and if I understand your comments correctly, >>> I have to "pre-adjust my bounding box to match the aspect ratio >>> of the image size" .... not sure what this means ...... >>> >>> To avoid this, do I add an entry to my map file like: >>> CONFIG MS_NONSQUARE NO >>> or >>> CONFIG MS_NONSQUARE FALSE >>> ? >> >>Brian, >> >>You cannot override MS_NONSQUARE in WMS mode. The >>GetMap request forces it on for WMS protocol compliance. >>Basically what I am suggesting is that you either need to >>adjust your BBOX to have the same aspect ratio as your >>WIDTH/HEIGHT or you need to adjust the WIDTH/HEIGHT >>of your request. >> >>To get the old behavior, you would need to expand the >>BBOX extent in one dimension or the other till you get the >>same aspect ratio as the image being requested. >> >>The following C code from MapServer essentially does this >>calculation. You may want to adapt this approach. I t >>basically picks the "maximum" cellsize from the two dimensions >>and then recomputes the BBOX around the center of the old >>area with the same cellsize in both directions. >> >>double msAdjustExtent(rectObj *rect, int width, int height) >>{ >> double cellsize, ox, oy; >> >> cellsize = MS_MAX(MS_CELLSIZE(rect->minx, rect->maxx, width), >>MS_CELLSIZE(rect->miny, rect->maxy, height)); >> >> if(cellsize <= 0) /* avoid division by zero errors */ >> return(0); >> >> ox = MS_MAX((width - (rect->maxx - rect->minx)/cellsize)/2,0); /* >>these were width-1 and height-1 */ >> oy = MS_MAX((height - (rect->maxy - rect->miny)/cellsize)/2,0); >> >> rect->minx = rect->minx - ox*cellsize; >> rect->miny = rect->miny - oy*cellsize; >> rect->maxx = rect->maxx + ox*cellsize; >> rect->maxy = rect->maxy + oy*cellsize; >> >> return(cellsize); >>} >> >>I assume you have some JavaScript or Java or something on the >>client where you could adjust your bounds? >> >>> Maybe I can tar up my entire web site, send it to you, go on vacation, >>> have you fix everything while I'm gone, then take credit for it when >>> I get back?????!!!!!! :) >> >>That is what I have consulting rates for! >> >>More seriously, I am weak on real "application building" with MapServer, >>though I can be helpful on input and rendering part of such work. I >>don't generally like working for governments though. Too much >>paperwork. :-) >> >>Best regards, >>-- >>---------------------------------------+---------------------------------- - >--- >>I set the clouds in motion - turn up | Frank Warmerdam, >warmerdam at pobox.com >>light and sound - activate the windows | http://pobox.com/~warmerdam >>and watch the world go round - Rush | Geospatial Programmer for Rent From fwarmerdam at GMAIL.COM Fri Apr 22 11:35:39 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri, 22 Apr 2005 14:35:39 -0400 Subject: Version 4.4.1 dependency and/or linux platform dependency? In-Reply-To: Message-ID: On 4/22/05, Brian Davis wrote: > My question is, I can figure out how to do a max in javascript, > how do I do a: > MS_CELLSIZE? Brian, In map.h, MS_CELLSIZE is defined this way: #define MS_CELLSIZE(min,max,d) ((max - min)/d) So, the horizontal cell size would be (max-min)/width. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From schuyler at NOCAT.NET Fri Apr 22 11:52:10 2005 From: schuyler at NOCAT.NET (Schuyler Erle) Date: Fri, 22 Apr 2005 11:52:10 -0700 Subject: Drawing TIGER file Polygons In-Reply-To: <20050422162821.87518.qmail@web60504.mail.yahoo.com> Message-ID: * On 22-Apr-2005 at 9:28AM PDT, Chris Hackel said: > > Is there a better (freely available) data source for > me to use? One that would make the process simpler? > I'm completely new to this and the Census TIGER files > were the only option I found. I don't know of a free source for this data, but I know that several people on this list have successfully extracted those polys. The scripts I have up at http://mappinghacks.com/projects/tiger2pgsql/ will do it, and I may have some other bits of Python OGR code lying about. SDE From schuyler at NOCAT.NET Fri Apr 22 11:56:02 2005 From: schuyler at NOCAT.NET (Schuyler Erle) Date: Fri, 22 Apr 2005 11:56:02 -0700 Subject: Time Zone Spatial Data In-Reply-To: Message-ID: * On 22-Apr-2005 at 5:29AM PDT, Simpson said: > > I have a requirement to determine timezone offset from GMT given a lat/long. > Does anyone know of a spatial data set, or software solution that would > satisfy this requirement? I guess if spatial data it would have to have > some temporal information to deal with daylight savings times. OpenMap ships a copy of the world's time zone in Shapefile format: http://openmap.bbn.com/data/shape/timezone/ SDE From dmarino at DIGITALGLOBE.COM Fri Apr 22 13:57:30 2005 From: dmarino at DIGITALGLOBE.COM (Donnie Marino) Date: Fri, 22 Apr 2005 14:57:30 -0600 Subject: Trouble with compiling 4.4.2 under MSVC++ Message-ID: I am trying to compile MS 4.4.2 under MSVC++ and I get the following output from nmake /f makefile.vc C:\mapserver_build\mapserver-4.4.2>nmake /f makefile.vc Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl /nologo /MD /W3 /DDEBUG -Ic:/mapserver_build/gdwin32 -Ic:\proj/src -Ic:\mapserver_build\re gex-0.12 -IC:\mapserver_build\gdal-1.2.6/gcore -IC:\mapserver_build\gdal-1.2.6/alg -IC:\mapserver_build\g dal-1.2.6/ogr -IC:\mapserver_build\gdal-1.2.6/port -IC:\mapserver_build\gdal-1.2.6/ogr/ogrsf_frmts -IC:\m apserver_build\gdal-1.2.6/ogr -IC:\mapserver_build\gdal-1.2.6/port -IC:\mapserver_build\libcurl-7.13.1-s sl-zlib-ares\curl-7.13.1/include -DHAVE_STRING_H -DREGEX_MALLOC -DNEED_STRCASECMP -DNEED_STRNCAS ECMP -DNEED_STRLCAT -DWIN32 -D_WIN32 -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_G D_WBMP -DUSE_GD_GIF -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONT -DUSE_OGR -DUSE_WMS_SVR -DUSE_WMS_LYR -DIGNORE_MISSING_DATA -DENABLE_STDERR_DEBUG -DUSE_GDAL -DUSE_WFS_SVR -DUSE_WFS_LYR -DUSE_WCS_SVR -DUSE_GD_ANTIALIAS /c mapserv.c /Fomapserv.obj mapserv.c link mapserv.obj mapserver_i.lib c:/mapserver_build/gdwin32/bgd.lib c:\proj/src/proj_i.li b C:\mapserver_build\gdal-1.2.6/gdal_i.lib C:\mapserver_build\gdal-1.2.6/gdal_i.lib C:\mapserver_build\li bcurl-7.13.1-ssl-zlib-ares\curl-7.13.1/lib/libcurl.lib "C:\Program Files\Microsoft Visual Studio\VC98 \Lib\WSOCK32.LIB" Microsoft (R) Incremental Linker Version 6.00.8168 Copyright (C) Microsoft Corp 1992-1998. All rights reserved. LINK : fatal error LNK1181: cannot open input file "mapserver_i.lib" NMAKE : fatal error U1077: 'link' : return code '0x49d' Stop. Anyone have any clues? I think all the deps are OK, I don't know why this error occurs, but I can't get past it... TIA, Donnie _______________________________________________ Donald Marino Data Systems Digitalglobe, Inc. dmarino at digitalglobe.com 303.684.4331 -------------- next part -------------- An HTML attachment was scrubbed... URL: From arunoday_chatterjee at REDIFFMAIL.COM Fri Apr 22 14:12:09 2005 From: arunoday_chatterjee at REDIFFMAIL.COM (Arunoday Chatterjee) Date: Fri, 22 Apr 2005 16:12:09 -0500 Subject: mapscript example Message-ID: You can check this out, though not comprehensive but good enough to start. There is no definitve examples by methods as we generally look for, atleast i've failed to find one. http://www.mobilegeographics.com/mapserver/ Maybe if you can decipher perl you can get some idea from http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples35 Thanks & Regards, Arunoday From dylan at IICI.NO-IP.ORG Fri Apr 22 14:42:58 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Fri, 22 Apr 2005 14:42:58 -0700 Subject: dynamically change reference map image Message-ID: Hi everyone is it possible to dynamically set the properties of the REFERENCE object in a map file? for example, i would like to adjust my map file based on URL arguments: REFERENCE STATUS ON IMAGE "%file_name%.png" ... however, this does not work. if i manually enter the file name of the reference image into the map file everything works ok... any ideas on this one? -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From arunoday_chatterjee at REDIFFMAIL.COM Fri Apr 22 15:16:33 2005 From: arunoday_chatterjee at REDIFFMAIL.COM (Arunoday Chatterjee) Date: Fri, 22 Apr 2005 17:16:33 -0500 Subject: quering layer using result of the query on another layer using php mapscript Message-ID: Basically i'm displaying the county and city data in the first shot and i want to display streets data as the map is zoomed out. Since the streets data is huge, it is failing to load hence i need to filter the streets data. So i was looking for a solution to fetch and display only street data relevant for the visible region of the map. Can you pls. let me know how to achieve this? Also, i have a dropdown of city with the FIP as the value and i want the map to move to the city location based on user choice. How do i achieve this? Do i use filter or expression, as i'm already using an expression as '[TYPE]' eq 'city' but when i change it to say '[PL_FIP]' eq '00884' nothing comes up, why is it so? Just wanted to let you know that i'm generating the map by querying a dynamic layer with some location content. Any direction would be very helpful, as there are no advanced php mapscript example. From arunoday_chatterjee at REDIFFMAIL.COM Fri Apr 22 15:22:06 2005 From: arunoday_chatterjee at REDIFFMAIL.COM (Arunoday Chatterjee) Date: Fri, 22 Apr 2005 17:22:06 -0500 Subject: Displaying data for only the visible map area using php mapscript Message-ID: How do i tile up the data? Can you pls. let me know. From ken.tanaka at NOAA.GOV Fri Apr 22 16:20:38 2005 From: ken.tanaka at NOAA.GOV (Ken Tanaka) Date: Fri, 22 Apr 2005 18:20:38 -0500 Subject: global mapping issues with orthographic projection Message-ID: We would like to use MapServer to generate continent and country/state outlines for satellite images. Currently we are looking for image overlays from MMS for Geostationary full disk and sub-areas. At the moment we are having some troubles with a "starburst" of stray feature lines that can be seen in this URL: http://gdsg.ngdc.noaa.gov/starburst/ Our current approach is to generate the lines with MMS, and then use a separate step to merge the data (satellite image) with the outlines image, and produce the composite image seen in the above URL. I have seen a couple of references that look like they are describing this problem in http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?WorldMappingIssues see "Linework:" near the bottom of the MapServerWiki page, and http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0401/msg00569.html Does anyone know of any recent work in this area, or hopefully of a new solution I haven't run accross yet? Thanks, Ken Tanaka From dylan at IICI.NO-IP.ORG Fri Apr 22 17:08:59 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Fri, 22 Apr 2005 17:08:59 -0700 Subject: strange shapefile DBF error Message-ID: Greetings, recently installed gdal-1.2.6 and mapserver-4.4.2 on a slackware 10 box. trying to access a simple shapefile with ogrinfo yields an 'illegal instruction' after only 1 record in the shapefile has been processed. i know that this shapefile is in working order. trying to re-create this shapefile (it is a tile index for mapserver) seems to fail as well... ---------------------- tile4ms list test Aborted. Unable to open DBF:o34115d1ne.tif Processed 0 of 1 files ---------------------- here is the output from ogrinfo; ------------------------------ ogrinfo -al doqq_index.shp INFO: Open of `doqq_index.shp' using driver `ESRI Shapefile' successful. Layer name: doqq_index Geometry: Polygon Feature Count: 312 Extent: (-2527391.972465, -374934.820857) - (-2007497.075791, 174428.925500) Layer SRS WKT: PROJCS["North_America_Albers_Equal_Area_Conic", GEOGCS["GCS_North_American_1983", DATUM["North_American_Datum_1983", SPHEROID["GRS_1980",6378137.0,298.257222101]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Albers_Conic_Equal_Area"], PARAMETER["False_Easting",0.0], PARAMETER["False_Northing",0.0], PARAMETER["longitude_of_center",-96.0], PARAMETER["Standard_Parallel_1",20.0], PARAMETER["Standard_Parallel_2",60.0], PARAMETER["latitude_of_center",40.0], UNIT["Meter",1.0]] location: String (255.0) OGRFeature(doqq_index):0 location (String) = o34115d1ne.tif Illegal instruction ^^^^^^^^^^^^^^^^ ---------------------------------------- and here are my compile-time options for gdal: ------------------- export CHOST="i686-pc-linux-gnu" export CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" export CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" ./configure --prefix=/usr --with-png=internal --with-jpeg=internal \ --with-gif=internal --with-libtiff=internal \ --with-geotiff=internal --with-libz=internal\ --without-pg --without-ogdi --with-python \ --with-threads=yes ------------------- any ideas.. ? could this be an issue that is due to some other library not being present? thanks in advance! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From woodbri at SWOODBRIDGE.COM Fri Apr 22 17:49:39 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Fri, 22 Apr 2005 20:49:39 -0400 Subject: strange shapefile DBF error In-Reply-To: <200504221708.59702.dylan@iici.no-ip.org> Message-ID: Dylan Beaudette wrote: > Greetings, > > recently installed gdal-1.2.6 and mapserver-4.4.2 on a slackware 10 box. > > trying to access a simple shapefile with ogrinfo yields an 'illegal > instruction' after only 1 record in the shapefile has been processed. > > i know that this shapefile is in working order. > > trying to re-create this shapefile (it is a tile index for mapserver) seems to > fail as well... > > ---------------------- > tile4ms list test > Aborted. Unable to open DBF:o34115d1ne.tif > Processed 0 of 1 files > ---------------------- OK, tile4ms only works for shapefiles and the file you are trying to open is a tif. You need to be using gdaltindex. -Steve W. > here is the output from ogrinfo; > > ------------------------------ > ogrinfo -al doqq_index.shp > INFO: Open of `doqq_index.shp' > using driver `ESRI Shapefile' successful. > > Layer name: doqq_index > Geometry: Polygon > Feature Count: 312 > Extent: (-2527391.972465, -374934.820857) - (-2007497.075791, 174428.925500) > Layer SRS WKT: > PROJCS["North_America_Albers_Equal_Area_Conic", > GEOGCS["GCS_North_American_1983", > DATUM["North_American_Datum_1983", > SPHEROID["GRS_1980",6378137.0,298.257222101]], > PRIMEM["Greenwich",0.0], > UNIT["Degree",0.0174532925199433]], > PROJECTION["Albers_Conic_Equal_Area"], > PARAMETER["False_Easting",0.0], > PARAMETER["False_Northing",0.0], > PARAMETER["longitude_of_center",-96.0], > PARAMETER["Standard_Parallel_1",20.0], > PARAMETER["Standard_Parallel_2",60.0], > PARAMETER["latitude_of_center",40.0], > UNIT["Meter",1.0]] > location: String (255.0) > OGRFeature(doqq_index):0 > location (String) = o34115d1ne.tif > Illegal instruction > ^^^^^^^^^^^^^^^^ > ---------------------------------------- > > and here are my compile-time options for gdal: > > ------------------- > export CHOST="i686-pc-linux-gnu" > export CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" > export CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" > > ./configure --prefix=/usr --with-png=internal --with-jpeg=internal \ > --with-gif=internal --with-libtiff=internal \ > --with-geotiff=internal --with-libz=internal\ > --without-pg --without-ogdi --with-python \ > --with-threads=yes > ------------------- > > any ideas.. ? could this be an issue that is due to some other library not > being present? > > thanks in advance! > > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group > University of California at Davis > 530.754.7341 > From sgillies at FRII.COM Fri Apr 22 17:56:40 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Fri, 22 Apr 2005 18:56:40 -0600 Subject: global mapping issues with orthographic projection In-Reply-To: Message-ID: On Apr 22, 2005, at 5:20 PM, Ken Tanaka wrote: > We would like to use MapServer to generate continent and country/state > outlines for satellite images. Currently we are looking for image > overlays > from MMS for Geostationary full disk and sub-areas. > > At the moment we are having some troubles with a "starburst" of stray > feature lines that can be seen in this URL: > > http://gdsg.ngdc.noaa.gov/starburst/ > > Our current approach is to generate the lines with MMS, and then use a > separate step to merge the data (satellite image) with the outlines > image, > and produce the composite image seen in the above URL. > > I have seen a couple of references that look like they are describing > this > problem in > > http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?WorldMappingIssues > > see "Linework:" near the bottom of the MapServerWiki page, and > > http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0401/ > msg00569.html > > Does anyone know of any recent work in this area, or hopefully of a new > solution I haven't run accross yet? > > Thanks, > Ken Tanaka > > Ken, Starburst aside, it looks like your states aren't properly overlaid on the GOES imagery. Have you actually processed the vectors into an orthographic projection? If not, you should set the layer projections to (I assume, after looking at your map image) a latlong projection. After doing that, let's see if the starburst problem remains. It may ... see the image at the bottom of http://zcologia.com/news/16 for an example of failure to properly deal with a graticule for an orthographic projection. cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From covariance at SHAW.CA Fri Apr 22 18:24:16 2005 From: covariance at SHAW.CA (Bob Bruce) Date: Fri, 22 Apr 2005 20:24:16 -0500 Subject: UNIX Fonts? Message-ID: I got this explanation from my hosting provider today about how he fixed the font problem on his system: "Hey Bob. Well really, the final solution it isn't that complicated, it was getting to that point that took a lot of messing around. Basically, if you want true type support in PHP/Mapscript you have to have freetype support compiled into PHP. And the only way to get freetype support in PHP is to compile freetype into GD and then compile GD into PHP. Normally you add GD support to PHP with a simple option (--with-gd) and PHP compiles in GD which is included with the PHP distribution. Thats easy except the version of GD which comes with PHP doesn't include freetype. So you have to download and compile GD separately which really shouldn't be that big of a deal except if you want GD to have freetype you have to download and install that first as well! And it also requires a number of other libraries to be installed first (libjpg, libpng, libXpm etc.) The big problem there as that Xpm is old and it won't compile with out a very special compiler (which I don't have). So, in this case I would normally rely on a binary package that comes with the OS (Slackware 9.1 in this case). But, Xpm is only available by installing the entire XWindows system (XFree86). My server doesn't have any need for Xwindows and since its such a large package I didn't really want to install that but I did it anyhow. Unfortunately there was something wrong with the Xpm libraries. Perhaps they might have been the wrong version. I'm not sure. Ultimately I found a binary distribution of just Xpm. I think that allowed Xpm to compile into GD but then when I tried to start PHP it would throw an error complaining about Xpm and die. Finally I gave up on Xpm support and managed to compile GD without it. Then, PHP wouldn't compile anymore but it turned out I had to remove the "--with-xpm" option from PHP's configure and do a "make clean". Finally PHP compiled and I was able to get it installed and Apache started without it complaining. I think there were several other false paths I went down as well but I've forgotten them." this gave me a greater appreciation for the work involved in setting up UNIX servers and I'm glad that someone else is looking after that for me right now. Anyway I copied the basic TTF files from my Windows system, including one that I made up of the Trans-Canada highway symbol, and they are drawing quite nicely now. Bob Bruce, Winnipeg, Manitoba From matthew at PROPERTYRESEARCHPARTNERS.COM Fri Apr 22 18:30:29 2005 From: matthew at PROPERTYRESEARCHPARTNERS.COM (Matthew Haines) Date: Fri, 22 Apr 2005 21:30:29 -0400 Subject: MapServer job available in NYC Message-ID: My company is looking to hire a full time MapServer programmer to work on our web site, propertyshark.com. We are a Linux/Perl/Python shop and we also do a lot of Javascript programming. (We launched our interactive map several months before Google did.) We will consider candidates at all levels of experience and will pay competitively according to experience and skills. The core skills for this job: 1) Be able to write .map files 2) Be able to design useful and nice looking maps and legends 3) Be able to write batch scripts (Perl, Python, Linux shell, etc) to drive shp2img to generate map tiles 4) Be able to use tools such as JUMP to create custom map layers, for example to draw neighborhood outlines Skill in the following areas would be very helpful 1) Perl programming (object oriented) 2) Python programming 3) Javascript (DOM, modern browsers) 4) Experience in real estate or urban planning 5) Experience in obtaining GIS data sets from US city, county, state, and/or federal entities We will consider experienced candidates for telecommuting positions, but we will give strong preference to candidates who can work in our office in Williamsburg, Brooklyn (near the L&G subway stops). You can view our web site at www.propshark.com. We are an established company with a positive cash flow; we are not burning venture capital dollars. Please send resume and salary requirements to matthew at propertyresearchpartners.com. Matthew Haines From unselfishly at GMAIL.COM Fri Apr 22 19:42:43 2005 From: unselfishly at GMAIL.COM (Keerati Inochanon) Date: Fri, 22 Apr 2005 22:42:43 -0400 Subject: Trouble rendering map from PostGIS Message-ID: Hi, I am new, and having problems rendering a layer from PostGIS. Here is the map file: == MAP NAME US_EAST_COAST STATUS ON SIZE 800 500 IMAGETYPE PNG IMAGECOLOR 240 240 240 SHAPEPATH "/home/www/testing/maps/countries" EXTENT -180.0000 -90.0000 180.0000 90.0000 UNITS DD PROJECTION "proj=latlong" "ellps=GRS80" "datum=NAD83" END OUTPUTFORMAT NAME png DRIVER "GD/PNG" MIMETYPE "image/png" IMAGEMODE PC256 EXTENSION "png" END LAYER NAME "countries" TYPE POLYGON STATUS ON DATA "cntry98" CLASS NAME "Countries" COLOR 255 255 180 OUTLINECOLOR 0 0 0 END PROJECTION "proj=latlong" "ellps=GRS80" "datum=NAD83" END END LAYER NAME "cities" TYPE POINT STATUS ON DATA "cities" CLASS NAME "Cities" COLOR 0 0 0 OUTLINECOLOR 0 0 0 END PROJECTION "proj=latlong" "ellps=GRS80" "datum=NAD83" END END LAYER CONNECTIONTYPE postgis NAME "random" CONNECTION "user=xxx password=yyy dbname=testdb host=localhost" DATA "location from gtest" STATUS ON TYPE POINT CLASS NAME "random" COLOR 255 0 0 OUTLINECOLOR 255 0 0 SIZE 50 END PROJECTION "proj=latlong" "ellps=GRS80" "datum=NAD83" END END END == In python, I do == import mapscript mapObject = mapscript.mapObj('/path/to/map/file/mapfile') image = mapObject.draw() image.save('test.png') == The result (test.png) is a map image with only the first two layers (countries and cities), which seem to be rendered correcly. However, I do not see anything from the postgis layer. I have a single entry in the gtest table, which was inserted using the command "insert into gtest (id, location) values (0, GeomFromText('POINT(40.791723 -77.857340)', -1))". The entry was inserted with no error. I can do a select to retrieve the entry back. Please let me know what I have done wrong. Any help or suggestions will be much appreciated. Thank you very much in advance. Best regards, Keerati Inochanon -------------- next part -------------- An HTML attachment was scrubbed... URL: From dylan at IICI.NO-IP.ORG Fri Apr 22 23:07:54 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Fri, 22 Apr 2005 23:07:54 -0700 Subject: strange shapefile DBF error In-Reply-To: <42699BA3.8090604@swoodbridge.com> Message-ID: Steve thanks for the info. here is the output from gdaltileindex: gdaltindex doqq_index.shp *.tif Illegal instruction .... any ideas on that one? ...seems like there is something wrong with my GDAL isntall, will try a re-compile. On Apr 22, 2005, at 5:49 PM, Stephen Woodbridge wrote: > Dylan Beaudette wrote: >> Greetings, >> recently installed gdal-1.2.6 and mapserver-4.4.2 on a slackware 10 >> box. >> trying to access a simple shapefile with ogrinfo yields an 'illegal >> instruction' after only 1 record in the shapefile has been processed. >> i know that this shapefile is in working order. >> trying to re-create this shapefile (it is a tile index for mapserver) >> seems to >> fail as well... >> ---------------------- >> tile4ms list test >> Aborted. Unable to open DBF:o34115d1ne.tif >> Processed 0 of 1 files >> ---------------------- > > OK, tile4ms only works for shapefiles and the file you are trying to > open is a tif. You need to be using gdaltindex. > > -Steve W. > >> here is the output from ogrinfo; >> ------------------------------ >> ogrinfo -al doqq_index.shp >> INFO: Open of `doqq_index.shp' >> using driver `ESRI Shapefile' successful. >> Layer name: doqq_index >> Geometry: Polygon >> Feature Count: 312 >> Extent: (-2527391.972465, -374934.820857) - (-2007497.075791, >> 174428.925500) >> Layer SRS WKT: >> PROJCS["North_America_Albers_Equal_Area_Conic", >> GEOGCS["GCS_North_American_1983", >> DATUM["North_American_Datum_1983", >> SPHEROID["GRS_1980",6378137.0,298.257222101]], >> PRIMEM["Greenwich",0.0], >> UNIT["Degree",0.0174532925199433]], >> PROJECTION["Albers_Conic_Equal_Area"], >> PARAMETER["False_Easting",0.0], >> PARAMETER["False_Northing",0.0], >> PARAMETER["longitude_of_center",-96.0], >> PARAMETER["Standard_Parallel_1",20.0], >> PARAMETER["Standard_Parallel_2",60.0], >> PARAMETER["latitude_of_center",40.0], >> UNIT["Meter",1.0]] >> location: String (255.0) >> OGRFeature(doqq_index):0 >> location (String) = o34115d1ne.tif >> Illegal instruction >> ^^^^^^^^^^^^^^^^ >> ---------------------------------------- >> and here are my compile-time options for gdal: >> ------------------- >> export CHOST="i686-pc-linux-gnu" >> export CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" >> export CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" >> ./configure --prefix=/usr --with-png=internal --with-jpeg=internal \ >> --with-gif=internal --with-libtiff=internal \ >> --with-geotiff=internal --with-libz=internal\ >> --without-pg --without-ogdi --with-python \ >> --with-threads=yes >> ------------------- >> any ideas.. ? could this be an issue that is due to some other >> library not >> being present? >> thanks in advance! >> -- >> Dylan Beaudette >> Soils and Biogeochemistry Graduate Group >> University of California at Davis >> 530.754.7341 > > > -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From aborruso at TIN.IT Sat Apr 23 01:07:10 2005 From: aborruso at TIN.IT (Andrea Borruso) Date: Sat, 23 Apr 2005 03:07:10 -0500 Subject: Pan Extent Message-ID: Dear all, is it possible in same way to limitate the extent of panning around a map? I do not want that some user can pan in area with no data? Thank you, a From fwarmerdam at GMAIL.COM Sat Apr 23 07:54:17 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Sat, 23 Apr 2005 10:54:17 -0400 Subject: global mapping issues with orthographic projection In-Reply-To: Message-ID: On 4/22/05, Ken Tanaka wrote: > At the moment we are having some troubles with a "starburst" of stray > feature lines that can be seen in this URL: > > http://gdsg.ngdc.noaa.gov/starburst/ Ken, I don't *think* you are running into any of the traditional MMS world mapping issues yet. The "starburst" effect is quite odd. It looks like some vertices are "at" 0,0 for some reason. I would suggest: o trying using an OGR connection type in you mapfile, to see if there is some quirk reading your shapefiles with the builtin mapserver code. o If that produces the same results, inspect your dataset with ogrinfo and see if there is anything odd about the vertices. Ideally reviewing a polygon you know is causing problems like Maine. Other points: o As Sean notes, it is hard to believe your data is really in an orthographic projection. If your shapefile is really in geographic latlong then you should declare it appropriately in your mapfile (+proj=latlong +datum=NAD83). o You declare your state and country layer projections without any lat_0, or lon_0 values. This is dangerous because internal defaults will be used and these can be hard to predict. I imagine MapServer is trying to reproject the vectors between two ortho projections but I doubt that is what you really want to happen. > Our current approach is to generate the lines with MMS, and then use a > separate step to merge the data (satellite image) with the outlines image, > and produce the composite image seen in the above URL. Is there a reason you don't have MapServer taking care of the image data as well? Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From unselfishly at GMAIL.COM Sat Apr 23 10:08:37 2005 From: unselfishly at GMAIL.COM (Keerati Inochanon) Date: Sat, 23 Apr 2005 13:08:37 -0400 Subject: Trouble rendering map from PostGIS In-Reply-To: Message-ID: Hi all, Thank you very much everyone who tried to help. I have found the problem. The map was actually rendered correctly, but since it was only a "POINT", it is only 1 pixel big, and thus I did not see it in the map. I defined a 50 pixel circle symbol for the class, and render it again, and things appear correctly. Best regards, Keerati On 4/23/05, Newland wrote: > > Below is an example of how to access a postgis layer. take a careful look > at the DATA parameter. > The general format for the DATA parameter is " from > using UNIQUE using SRID > ". > In my example, > the GEOMETRY_COLUMN_NAME is shape. the TABLE_NAME is stlouis_base. the UNIQUE_ID_COLUMNNAME > is oid. the SRID_OF_LAYER is 4326. > Hope this helps. > -------------------------------Begin > example----------------------------------------------------------- > DATA "shape from stlouis_base using UNIQUE oid USING SRID=4326" > LAYER > NAME "stlouis_roads" > TYPE LINE > CONNECTION "user=john password=doe dbname=stlouis host=192.168.1.111port=5432" > TOLERANCEUNITS pixels > CONNECTIONTYPE postgis > TOLERANCE 5 > CLASS > LABEL > COLOR 0 255 0 > SIZE tiny > ANGLE AUTO > END > NAME "Roads" > COLOR 255 0 0 > SIZE 1 > SYMBOL "circle" > END > LABELITEM "name" > STATUS on > CLASSITEM "frc" > METADATA > WMS_TITLE "St. Louis County Roads" > END > PROJECTION > "init=epsg:4326" > END > DATA "shape from stlouis_base using UNIQUE oid USING SRID=4326" > END > -------------------------------End > example----------------------------------------------------------- > > -----Original Message----- > *From:* UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]*On > Behalf Of *Keerati Inochanon > *Sent:* Friday, April 22, 2005 7:43 PM > *To:* MAPSERVER-USERS at LISTS.UMN.EDU > *Subject:* [UMN_MAPSERVER-USERS] Trouble rendering map from PostGIS > > Hi, > > I am new, and having problems rendering a layer from PostGIS. Here is the > map file: > > == > MAP > NAME US_EAST_COAST > STATUS ON > SIZE 800 500 > IMAGETYPE PNG > IMAGECOLOR 240 240 240 > SHAPEPATH "/home/www/testing/maps/countries" > EXTENT -180.0000 -90.0000 180.0000 90.0000 > UNITS DD > PROJECTION > "proj=latlong" > "ellps=GRS80" > "datum=NAD83" > END > OUTPUTFORMAT > NAME png > DRIVER "GD/PNG" > MIMETYPE "image/png" > IMAGEMODE PC256 > EXTENSION "png" > END > LAYER > NAME "countries" > TYPE POLYGON > STATUS ON > DATA "cntry98" > CLASS > NAME "Countries" > COLOR 255 255 180 > OUTLINECOLOR 0 0 0 > END > PROJECTION > "proj=latlong" > "ellps=GRS80" > "datum=NAD83" > END > END > LAYER > NAME "cities" > TYPE POINT > STATUS ON > DATA "cities" > CLASS > NAME "Cities" > COLOR 0 0 0 > OUTLINECOLOR 0 0 0 > END > PROJECTION > "proj=latlong" > "ellps=GRS80" > "datum=NAD83" > END > END > LAYER > CONNECTIONTYPE postgis > NAME "random" > CONNECTION "user=xxx password=yyy dbname=testdb host=localhost" > DATA "location from gtest" > STATUS ON > TYPE POINT > CLASS > NAME "random" > COLOR 255 0 0 > OUTLINECOLOR 255 0 0 > SIZE 50 > END > PROJECTION > "proj=latlong" > "ellps=GRS80" > "datum=NAD83" > END > END > END > == > > In python, I do > == > import mapscript > mapObject = mapscript.mapObj('/path/to/map/file/mapfile') > image = mapObject.draw() > image.save('test.png') > == > > The result (test.png) is a map image with only the first two layers > (countries and cities), which seem to be rendered correcly. However, I do > not see anything from the postgis layer. I have a single entry in the gtest > table, which was inserted using the command "insert into gtest (id, > location) values (0, GeomFromText('POINT(40.791723 -77.857340)', -1))". > The entry was inserted with no error. I can do a select to retrieve the > entry back. > > Please let me know what I have done wrong. Any help or suggestions will be > much appreciated. Thank you very much in advance. > > Best regards, > Keerati Inochanon > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmanepal at GMAIL.COM Sat Apr 23 13:07:41 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Sat, 23 Apr 2005 16:07:41 -0400 Subject: Centering the image Message-ID: Hello All, I am using php mapscript. I cannot get the image to center when I click on the image and with some zooming factor. I am using image coordinates (not geographical coordinates) for zooming. 1.)Can anyone think of possible reasons? I can provide with any necessary information. 2.) Also, how do I center the image based on my click without zooming? 3.) Finally, does the extent of the map automatically changed by mapscript, when I zoom? I hope, i can get this resolved! Thanks, Giridhar From Nick at STONE-ENV.COM Sat Apr 23 17:44:55 2005 From: Nick at STONE-ENV.COM (Nick Floersch) Date: Sat, 23 Apr 2005 20:44:55 -0400 Subject: Perl Mapscript "issues" Message-ID: Hi All, I recently posted a long bit about my problems getting a newer version of Perl mapscript to work with a perl mapscript app we have here. The question has changed. NOW, I need to know this: Why, when I try to instantiate a map object with any map file other than "" do I get a segfault? v---snip--- #!/usr/bin/perl -w use mapscript; use XBase; my $mapObjFull = new mapscript::mapObj("itasca.map"); warn "Got Here 2.5"; ^---snip--- This gives me a segfault. The itasca.map file is the one found in the mapserver demo "workshop." If I call new mapscript::mapObj with no map, it works fine: v---snip--- #!/usr/bin/perl -w use mapscript; use XBase; my $mapObjFull = new mapscript::mapObj(); warn "Got Here 2.5"; ^---snip--- Will produce the message "Got Here 2.5 at line 6" or something like that. It works fine. Just to rule out the idea that itasca.map had a layer or something that it couldn't access (though it works fine in the workshop demo), I made a copy of it and commented out ALL layers. It still segfaults. In desperation I used the helloworld map from the tutorials thinking I could avoid any issues with non-existent data layers etc. It still segfaults. Someone mentioned looking for libmap.a and see if it is an old version. I don't have libmap.a in any library path. Yet, the old files for perl mapscript work perfectly. It's the new ones that don't. What am I missing here? It isn't the map files. It's something about the perl mapscript build. I am trying to do all of this with Mapserver 4.4.1 or 4.4.2. Neither version has worked right yet (with mapscript at least - everything else works fine). -Nick --- Nicholas E. Floersch (pr. Floorsh) IT Group Manager Direct / 802.229.1872 Cell / 802.249.2516 E-Mail / nfloersch at stone-env.com Stone Environmental, Inc. 535 Stone Cutters Way, Montpelier, Vermont 05602 Tel / 802.229.4541 Fax / 802.229.5417 Web Site / www.stone-env.com From sgillies at FRII.COM Sat Apr 23 18:42:16 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Sat, 23 Apr 2005 19:42:16 -0600 Subject: Perl Mapscript "issues" In-Reply-To: Message-ID: On Apr 23, 2005, at 6:44 PM, Nick Floersch wrote: > Hi All, > > I recently posted a long bit about my problems getting a newer version > of Perl mapscript to work with a perl mapscript app we have here. > > The question has changed. > > NOW, I need to know this: > Why, when I try to instantiate a map object with any map file other > than > "" do I get a segfault? > v---snip--- > #!/usr/bin/perl -w > use mapscript; > use XBase; > > my $mapObjFull =3D new mapscript::mapObj("itasca.map"); > warn "Got Here 2.5"; > ^---snip--- > This gives me a segfault. > > The itasca.map file is the one found in the mapserver demo "workshop." > > If I call new mapscript::mapObj with no map, it works fine: > v---snip--- > #!/usr/bin/perl -w > use mapscript; > use XBase; > > my $mapObjFull =3D new mapscript::mapObj(); > warn "Got Here 2.5"; > ^---snip--- > Will produce the message "Got Here 2.5 at line 6" or something like > that. It works fine. > > Just to rule out the idea that itasca.map had a layer or something that > it couldn't access (though it works fine in the workshop demo), I made > a > copy of it and commented out ALL layers. > > It still segfaults. > > In desperation I used the helloworld map from the tutorials thinking I > could avoid any issues with non-existent data layers etc. > > It still segfaults. > > Someone mentioned looking for libmap.a and see if it is an old version. > I don't have libmap.a in any library path. Yet, the old files for perl > mapscript work perfectly. It's the new ones that don't. > > What am I missing here? It isn't the map files. It's something about > the > perl mapscript build. > > I am trying to do all of this with Mapserver 4.4.1 or 4.4.2. Neither > version has worked right yet (with mapscript at least - everything else > works fine). > > -Nick Nick, Are you certain that you are using your newest mapscript module? Try printing the value of $mapscript::MS_VERSION before you make a new mapObj instance. You should get '4.4.1' or .2. cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From woodbri at SWOODBRIDGE.COM Sat Apr 23 19:13:45 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Sat, 23 Apr 2005 22:13:45 -0400 Subject: Perl Mapscript "issues" In-Reply-To: <9050fb1a5b506d2deb9298731d9aa16f@frii.com> Message-ID: Also check that you do not have an old libmap.a hanging around somewhere. Delete if you do. You might need rebuild stuff if you did and removing it does not resolve things. -Steve Sean Gillies wrote: > On Apr 23, 2005, at 6:44 PM, Nick Floersch wrote: > >> Hi All, >> >> I recently posted a long bit about my problems getting a newer version >> of Perl mapscript to work with a perl mapscript app we have here. >> >> The question has changed. >> >> NOW, I need to know this: >> Why, when I try to instantiate a map object with any map file other >> than >> "" do I get a segfault? >> v---snip--- >> #!/usr/bin/perl -w >> use mapscript; >> use XBase; >> >> my $mapObjFull =3D new mapscript::mapObj("itasca.map"); >> warn "Got Here 2.5"; >> ^---snip--- >> This gives me a segfault. >> >> The itasca.map file is the one found in the mapserver demo "workshop." >> >> If I call new mapscript::mapObj with no map, it works fine: >> v---snip--- >> #!/usr/bin/perl -w >> use mapscript; >> use XBase; >> >> my $mapObjFull =3D new mapscript::mapObj(); >> warn "Got Here 2.5"; >> ^---snip--- >> Will produce the message "Got Here 2.5 at line 6" or something like >> that. It works fine. >> >> Just to rule out the idea that itasca.map had a layer or something that >> it couldn't access (though it works fine in the workshop demo), I made >> a >> copy of it and commented out ALL layers. >> >> It still segfaults. >> >> In desperation I used the helloworld map from the tutorials thinking I >> could avoid any issues with non-existent data layers etc. >> >> It still segfaults. >> >> Someone mentioned looking for libmap.a and see if it is an old version. >> I don't have libmap.a in any library path. Yet, the old files for perl >> mapscript work perfectly. It's the new ones that don't. >> >> What am I missing here? It isn't the map files. It's something about >> the >> perl mapscript build. >> >> I am trying to do all of this with Mapserver 4.4.1 or 4.4.2. Neither >> version has worked right yet (with mapscript at least - everything else >> works fine). >> >> -Nick > > > Nick, > > Are you certain that you are using your newest mapscript module? Try > printing the value of $mapscript::MS_VERSION before you make a new > mapObj instance. You should get '4.4.1' or .2. > > cheers, > Sean > > -- > Sean Gillies > sgillies at frii dot com > http://users.frii.com/sgillies > From paul at SUSTAINABLEGIS.COM Sat Apr 23 19:40:25 2005 From: paul at SUSTAINABLEGIS.COM (Paul Hastings) Date: Sun, 24 Apr 2005 09:40:25 +0700 Subject: Time Zone Spatial Data In-Reply-To: <20050422185602.GD31423@vishnu.tridity.org> Message-ID: if i recall manifold also used to have tz dataset (i think it was shapefile as well): http://www.manifold.net/products/freestuff.html From jacob.delfos at MAUNSELL.COM Sun Apr 24 01:36:58 2005 From: jacob.delfos at MAUNSELL.COM (Jacob Delfos) Date: Sun, 24 Apr 2005 16:36:58 +0800 Subject: Trouble with compiling 4.4.2 under MSVC++ Message-ID: Hi Donnie, I've been compiling mapserver last Friday, and at some stage ran into that same error. I *think* I resolved it by doing a clean build (or by manually removing all newly created .obj and .lib files). I was using the MS SDK's to compile. If that doesn't solve it, I guess try checking if the path where mapserver_i.lib is created, exists in your LIB path (check your LIB path settings in the batchfile, if using one. I have had to modify it). Also, be careful with using backslashes in paths. In some rare situations, they are treated as special 'escape' characters. I tend to change them to forward slashes (which the VC compiler seems to handle just fine) and I try to make sure there are no spaces in my paths. regards, Jacob -----Original Message----- From: UMN MapServer Users List To: MAPSERVER-USERS at LISTS.UMN.EDU Sent: 4/23/2005 4:57 AM Subject: [UMN_MAPSERVER-USERS] Trouble with compiling 4.4.2 under MSVC++ I am trying to compile MS 4.4.2 under MSVC++ and I get the following output from nmake /f makefile.vc C:\mapserver_build\mapserver-4.4.2>nmake /f makefile.vc Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl /nologo /MD /W3 /DDEBUG -Ic:/mapserver_build/gdwin32 -Ic:\proj/src -Ic:\mapserver_build\re gex-0.12 -IC:\mapserver_build\gdal-1.2.6/gcore -IC:\mapserver_build\gdal-1.2.6/alg -IC:\mapserver_build\g dal-1.2.6/ogr -IC:\mapserver_build\gdal-1.2.6/port -IC:\mapserver_build\gdal-1.2.6/ogr/ogrsf_frmts -IC:\m apserver_build\gdal-1.2.6/ogr -IC:\mapserver_build\gdal-1.2.6/port -IC:\mapserver_build\libcurl-7.13.1-s sl-zlib-ares\curl-7.13.1/include -DHAVE_STRING_H -DREGEX_MALLOC -DNEED_STRCASECMP -DNEED_STRNCAS ECMP -DNEED_STRLCAT -DWIN32 -D_WIN32 -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_G D_WBMP -DUSE_GD_GIF -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONT -DUSE_OGR -DUSE_WMS_SVR -DUSE_WMS_LYR -DIGNORE_MISSING_DATA -DENABLE_STDERR_DEBUG -DUSE_GDAL -DUSE_WFS_SVR -DUSE_WFS_LYR -DUSE_WCS_SVR -DUSE_GD_ANTIALIAS /c mapserv.c /Fomapserv.obj mapserv.c link mapserv.obj mapserver_i.lib c:/mapserver_build/gdwin32/bgd.lib c:\proj/src/proj_i.li b C:\mapserver_build\gdal-1.2.6/gdal_i.lib C:\mapserver_build\gdal-1.2.6/gdal_i.lib C:\mapserver_build\li bcurl-7.13.1-ssl-zlib-ares\curl-7.13.1/lib/libcurl.lib "C:\Program Files\Microsoft Visual Studio\VC98 \Lib\WSOCK32.LIB" Microsoft (R) Incremental Linker Version 6.00.8168 Copyright (C) Microsoft Corp 1992-1998. All rights reserved. LINK : fatal error LNK1181: cannot open input file "mapserver_i.lib" NMAKE : fatal error U1077: 'link' : return code '0x49d' Stop. Anyone have any clues? I think all the deps are OK, I don?t know why this error occurs, but I can?t get past it? TIA, Donnie _______________________________________________ Donald Marino Data Systems Digitalglobe, Inc. dmarino at digitalglobe.com 303.684.4331 From lukaslatz at YAHOO.COM Sun Apr 24 04:14:05 2005 From: lukaslatz at YAHOO.COM (Lukas Latz) Date: Sun, 24 Apr 2005 04:14:05 -0700 Subject: Java Mapscript Message-ID: Hi list! I've worked with ESRI ArcIMS Java connector a lot and would be very interested in working with Mapserver in Java (server-side). Recently, I've seen several mentions of "Java Map Script" on this list, and thought, --ooh, there seems to be a new version out that has a Java API. However, I couldn't find much about Java Map Script on the mapserver home page. Is there a place on the web that has some info about how to install(compile) and use Java Map Script? Cheers Lukas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From bartvde at XS4ALL.NL Sun Apr 24 04:38:17 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Sun, 24 Apr 2005 13:38:17 +0200 Subject: Java Mapscript In-Reply-To: <20050424111405.29088.qmail@web41123.mail.yahoo.com> Message-ID: Hi Lukas, Java Mapscript is one the SWIG (www.swig.org) ports of Mapscript. Some info is available from Umberto Nicoletti's site: http://www.unicolet.org/mapserver/compile.html http://www.unicolet.org/mapserver/tomcat.html For examples or an API reference, your best bet is looking at: http://mapserver.gis.umn.edu/doc44/swigmapscript-reference.html or Sean Gillies' reference: http://zcologia.com/mapserver/mapscript Best regards, Bart On Sun, 24 Apr 2005 04:14:05 -0700, Lukas Latz wrote: > Hi list! > > I've worked with ESRI ArcIMS Java connector a lot and would be very > interested in working with Mapserver in Java (server-side). > > Recently, I've seen several mentions of "Java Map Script" on this list, > and thought, --ooh, there seems to be a new version out that has a Java > API. > > However, I couldn't find much about Java Map Script on the mapserver > home page. > > Is there a place on the web that has some info about how to > install(compile) and use Java Map Script? > > > Cheers > > Lukas > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From dabner at OPTUSNET.COM.AU Sun Apr 24 05:38:34 2005 From: dabner at OPTUSNET.COM.AU (Nick Dabner) Date: Sun, 24 Apr 2005 22:38:34 +1000 Subject: Zooming to match a raster scale Message-ID: Hello list, I have a set of raster geotiffs tiled and working on mapserver 4.2 on osx (thanks to william k). When viewing the rasters in mapserver, I find they suffer from some slight scaling and never look anywhere near as good as the original files. I have given dithering and PNG24 a go, but see that I probably need to match my mapserver session's scale as close as possible to the source data scale. Does this sound right? Using CGI mapserver, how can I specify an exact viewing area (to match my calculations)? What argument would I choose. Attemping to pass IMGEXT=2482199.076569 4407814.492404 2484230.3854232 4406291.0107634 just returns an extent error. Oh, I am in Melb Aust, so these are real coords. Any other ideas? The next step would probably be fixed zoom levels for street, area, suburb, municipality and city or similar, with preprocessed rasters for each level. regards, Nick From bartvde at XS4ALL.NL Sun Apr 24 05:45:08 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Sun, 24 Apr 2005 14:45:08 +0200 Subject: Zooming to match a raster scale In-Reply-To: <96d1d0f4688ce03a23d5d4c28b9bcdef@optusnet.com.au> Message-ID: Hi Nick, you can probably use a combination of mapxy and scale. See Mapserver CGI reference: http://mapserver.gis.umn.edu/doc44/cgi-reference.html Best regards, Bart On Sun, 24 Apr 2005 22:38:34 +1000, Nick Dabner wrote: > Hello list, > > I have a set of raster geotiffs tiled and working on mapserver 4.2 on > osx (thanks to william k). > > When viewing the rasters in mapserver, I find they suffer from some > slight scaling and never look anywhere near as good as the original > files. I have given dithering and PNG24 a go, but see that I probably > need to match my mapserver session's scale as close as possible to the > source data scale. Does this sound right? > > Using CGI mapserver, how can I specify an exact viewing area (to match > my calculations)? What argument would I choose. > > Attemping to pass IMGEXT=2482199.076569 4407814.492404 2484230.3854232 > 4406291.0107634 just returns an extent error. Oh, I am in Melb Aust, so > these are real coords. > > Any other ideas? The next step would probably be fixed zoom levels for > street, area, suburb, municipality and city or similar, with > preprocessed rasters for each level. > > regards, > > Nick > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From fwarmerdam at GMAIL.COM Sun Apr 24 07:43:29 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Sun, 24 Apr 2005 10:43:29 -0400 Subject: Trouble with compiling 4.4.2 under MSVC++ In-Reply-To: <426B5AAA.30402@maunsell.com> Message-ID: On 4/24/05, Jacob Delfos wrote: > Hi Donnie, > > I've been compiling mapserver last Friday, and at some stage ran into > that same error. I *think* I resolved it by doing a clean build (or by > manually removing all newly created .obj and .lib files). I was using > the MS SDK's to compile. > > If that doesn't solve it, I guess try checking if the path where > mapserver_i.lib is created, exists in your LIB path (check your LIB path > settings in the batchfile, if using one. I have had to modify it). Jacob / Donnie, The Makefile.vc for MapServer on win32 didn't properly express the dependencies of the exes on the DLL properly so if something went wrong linking the DLL you had to manually delete mapserver.lib to force the right things to get rebuilt. I have corrected this in 4.5 CVS. In the meantime, those using 4.4 may have to delete mapserver.lib to force things to rebuild properly, or do a "nmake /f makefile.vc clean". Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From cvhackel at YAHOO.COM Sun Apr 24 09:05:09 2005 From: cvhackel at YAHOO.COM (Chris Hackel) Date: Sun, 24 Apr 2005 09:05:09 -0700 Subject: SWF single output movie Message-ID: I am currently having no trouble producing labeled SWF files as long as OUTPUT_MOVIE=MULTIPLE. However, as soon as I set it to SINGLE, I get a movie only w/ the IMAGECOLOR of the MAP (no roads, parks, water, etc). I've now tried w/ 4.4.2 as well as the most recent CVS version, & no luck. Any ideas? Anyone get this to work? If someone could send a sample mapfile & data where this works I'd much appreciate it. I'm using TIGER boundary files. Thanks, Chris From Stefan.Schnitter at T-SYSTEMS.COM Sun Apr 24 11:50:23 2005 From: Stefan.Schnitter at T-SYSTEMS.COM (Schnitter, Stefan) Date: Sun, 24 Apr 2005 20:50:23 +0200 Subject: Multiple filters with regular expressions in one layer Message-ID: Hi all, Is there a possibility to have more than one filter with regular expressions in one layer? I understand that one can do like this with logical expressions e.g.: [POPULATION] > 50000 AND '[LANGUAGE]' eq 'FRENCH' but I can only use one reg ex as a filter e.g. FILTERITEM NODE FILTER /%mynodefilter%/ What I'd need would be all objects from the layer where item NODE matches /%mynodefilter%/ and CITY matches /%mycityfilter%/ I use a mapserver-cgi application with simple dbf files as data source. Any hints and ideas are very welcome! Thanx in advance, Stefan. From gmanepal at GMAIL.COM Sun Apr 24 12:49:08 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Sun, 24 Apr 2005 15:49:08 -0400 Subject: mapscript zooming Message-ID: Hello All, I tried to center the image based on a click when I zoom using php/mapscript. For some reason, I am failing to do so. Is it because, the lat long I calculated using javascript is wrong? but it almost matches with 'ArcIMS Author'.? Can anyone write the snippet of php/mapscript code that will zoom to the point i click, provided I have the lat-long of the click? Also, can you explain what the new extent will be? Thanks, Giridhar From armin.burger at GMX.NET Sun Apr 24 14:13:58 2005 From: armin.burger at GMX.NET (Armin Burger) Date: Sun, 24 Apr 2005 23:13:58 +0200 Subject: Multiple filters with regular expressions in one layer Message-ID: Stefan, I guess it's something like FILTER (('[NODE]' =~ /%mynodefilter%/) AND ('[CITY]' =~ /%mycityfilter%/)) Armin > Hi all, > Is there a possibility to have more than one filter with regular expressions > in one layer? > I understand that one can do like this with logical expressions e.g.: > [POPULATION] > 50000 AND '[LANGUAGE]' eq 'FRENCH' > but I can only use one reg ex as a filter e.g. > FILTERITEM NODE > FILTER /%mynodefilter%/ > What I'd need would be all objects from the layer where item NODE matches > /%mynodefilter%/ and CITY matches /%mycityfilter%/ > I use a mapserver-cgi application with simple dbf files as data source. > Any hints and ideas are very welcome! > Thanx in advance, Stefan. From dabner at OPTUSNET.COM.AU Sun Apr 24 14:46:54 2005 From: dabner at OPTUSNET.COM.AU (Nick Dabner) Date: Mon, 25 Apr 2005 07:46:54 +1000 Subject: Zooming to match a raster scale Message-ID: Thanks Bart, So I take it that scale and mapxy are mutually exclusive with mapext? Removing mapext always results in the error: msDrawMap(): Image handling error. Unable to initialize image. msCalculateScale(): General error message. Invalid image extent, minx=-1.000000, miny=-1.000000, maxx=-1.000000, maxy=-1.000000 Any idea what I am doing wrong? Also I found out my scale is current 3.15 on the output map and needs to be 2.59, hence the poor output. Would a resolution tag in the mapfile help? ND On 24/04/2005, at 10:45 PM, Bart van den Eijnden wrote: > Hi Nick, > > you can probably use a combination of mapxy and scale. > > See Mapserver CGI reference: > http://mapserver.gis.umn.edu/doc44/cgi-reference.html > > Best regards, > Bart > > On Sun, 24 Apr 2005 22:38:34 +1000, Nick Dabner > > wrote: > >> Hello list, >> >> I have a set of raster geotiffs tiled and working on mapserver 4.2 on >> osx (thanks to william k). >> >> When viewing the rasters in mapserver, I find they suffer from some >> slight scaling and never look anywhere near as good as the original >> files. I have given dithering and PNG24 a go, but see that I probably >> need to match my mapserver session's scale as close as possible to the >> source data scale. Does this sound right? >> >> Using CGI mapserver, how can I specify an exact viewing area (to match >> my calculations)? What argument would I choose. >> >> Attemping to pass IMGEXT=2482199.076569 4407814.492404 2484230.3854232 >> 4406291.0107634 just returns an extent error. Oh, I am in Melb Aust, >> so >> these are real coords. >> >> Any other ideas? The next step would probably be fixed zoom levels for >> street, area, suburb, municipality and city or similar, with >> preprocessed rasters for each level. >> >> regards, >> >> Nick >> > > > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > From vortex25 at GMX.DE Sun Apr 24 15:10:26 2005 From: vortex25 at GMX.DE (Vortex) Date: Mon, 25 Apr 2005 00:10:26 +0200 Subject: Questions on projections, reference systems, map extents, scales Message-ID: Hello!! I'm quite new to all this mapserver/postgis/proj4/geoinformationsystem stuff. Althought i've played around for a while with it and made many assumptions how it works, i'm unsure if i got it right and have a lot of questions too. Maybe somebody can confirm or disagree my conclusions and answer some questions? * I have to specify the coordinate system for every data source? - At least for shapefiles and postgis layers the coordinate system should be "embedded"? Why i have to specify it anyway? - What happens if they don't match? + Is the lat/lon data simply related to the new reference system? * WGS84 and NAD83 are *nearly* the same? * geographic coordinate system means unprojected latitude/longitude values? * WGS84 and NAD83 are "unprojected" lat/long coordinate systems by definition? * latitude/longitude values are independent of the reference system, they are always the same. But the reference system is getting important if i want to calculate the absolute position of a point in 3d space because the associated height value is based on the surface of the reference ellipsoid? * There are data sources available which does not have a reference system at all and consists of "pure" lat/long data? - If i specify a reference system in the mapfile for such data anyway, the positions of this data source are asumed to be flat on the surface of the specified reference ellipsoid? * To do a projection (like lcc) it is absolutely necessary to have a reference system, because it's necessary to know the 3d positions of all data to perform the projection? - Does mapserver consider the height of any point over the surface of the reference ellipsoid for projection? Probably this is done by proj4 lib anyway. Does it? Is it necessary? * If i specify a latlong output projection and the source data is also in latlong althought there is a reference system specified like NAD83, there is no reprojection done? - Is this faster than output to lcc for example? - Isn't it totally regardless of which reference systems are specified in this case? * The map EXTENTS specified in the mapfile are always related to the result of the output projection? - For lcc they are in meter, for latlong they are in decimal degrees? - In the lcc projection it is quite easy to set the origin of the map by lat_0 lon_0 parameter if i want to zoom to a specific lat/lon position having always the same extents. + Is this the usual way? With lat/long output, the only way to change the origing is changing the EXTENT? - If i set k != 1 for lcc, the scale calculation goes wrong? So zooming should always be done be modifing the map extents? Is the k parameter useful in mapserver anyway? * The SIZE and RESOLUTION paramter in mapfile are used to calculate the real size of the displayed image. The specified map EXTENT is fitted into this "window". Mapserver does not really know about the units of the output projection. Therefore i have to specify the UNITS in the mapfile. With a projection output in meter, the scale can be calculated now. Based on the scale and the resolution, the scalebar is generated. - The documentation says, the scale is "Set most often by the application." Is this really true? I don't know how to set it and i thought it should be calculated by the mapserver itself? - How is it possible for mapserver to calculate a scalbar for lat/long output? I thought it should be even for projections difficult to calculate a scalebar. Isn't it only correct for parts of the map because of distortions? I thought this problem would be even more difficult for unprojected maps? Is this only a rough estimation? * What happens if there is projected INPUT data with units in meters for example? I think it should work too if i specify the correct projection. But is it internally "inverse" projected to latlong coordinates to merge it with other data sources which are maybe naturally in latlong coordinates and then reprojected to the output projection? Wow, that was quite a lot. Hopefully not too much. Sorry for my bad english. Thank you very much! Klaus From Stefan.Schnitter at T-SYSTEMS.COM Sun Apr 24 15:32:24 2005 From: Stefan.Schnitter at T-SYSTEMS.COM (Schnitter, Stefan) Date: Mon, 25 Apr 2005 00:32:24 +0200 Subject: AW: [UMN_MAPSERVER-USERS] Multiple filters with regular expressio ns in one layer Message-ID: Thanx a lot, I'd suggest to add this to the documentation. For those logical expression it currently states: Logical expressions allow you to build fairly complex tests based on one or more attributes and therefore are only available with shapefiles. Logical expressions are delimited by parentheses "(expression)". Attribute names are delimited by square brackets "[ATTRIBUTE]". These names are case sensitive and must match the items in the shapefile. For example: EXPRESSION ([POPULATION] > 50000 AND '[LANGUAGE]' eq 'FRENCH') ... The following logical operators are supported : =,>,<,<=,>=,=,or,and,lt,gt,ge,le,eq,ne. As you might expect this level of complexity is slower to process. Here one should add "=~" to the supported operators. Stefan. > -----Urspr?ngliche Nachricht----- > Von: Armin Burger [mailto:armin.burger at gmx.net] > Gesendet: Sonntag, 24. April 2005 23:14 > An: Schnitter, Stefan; MAPSERVER-USERS at LISTS.UMN.EDU > Betreff: Re: [UMN_MAPSERVER-USERS] Multiple filters with > regular expressions in one layer > > > Stefan, > > I guess it's something like > > FILTER (('[NODE]' =~ /%mynodefilter%/) AND ('[CITY]' =~ > /%mycityfilter%/)) > > Armin > > > > Hi all, > > > Is there a possibility to have more than one filter with regular > > expressions in one layer? > > > I understand that one can do like this with logical > expressions e.g.: > > > [POPULATION] > 50000 AND '[LANGUAGE]' eq 'FRENCH' > > > but I can only use one reg ex as a filter e.g. > > > FILTERITEM NODE > > FILTER /%mynodefilter%/ > > > What I'd need would be all objects from the layer where item NODE > > matches /%mynodefilter%/ and CITY matches /%mycityfilter%/ I use a > > mapserver-cgi application with simple dbf files as data source. > > > Any hints and ideas are very welcome! > > > Thanx in advance, Stefan. > > From dabner at OPTUSNET.COM.AU Sun Apr 24 16:16:54 2005 From: dabner at OPTUSNET.COM.AU (Nick Dabner) Date: Mon, 25 Apr 2005 09:16:54 +1000 Subject: Zooming to match a raster scale In-Reply-To: <2aeba3f2a1c3a600b6599bc408acbd79@optusnet.com.au> Message-ID: Got it. - Thanks Bart. My extents were wrong as IMGEXT do not match the gdalinfo info fo upper-left, lower-right style when applied to Australia. Seems I have to switch the latitude. Ok, so just to finish up this thread, found a solution by taking a point using Mapxy and then applying a scale or buffer. The rasters I am using have a pixel size of (1.26956817,-1.26956817) and a unit of 0.0174532925199433. By matching the scale as returned in the template/html file, as close as possible to this pixel size shown by gdalinfo, the maps start looking pretty good as they have little or no scaling. First question: With a given pixel size and unit (metres) above, what is the formula to work out the scale to input? In the example above, I found a value of .31267 would give me a matching output scale to pixel size to 4 decimal places. Second question: Loading the TIF file up in Apple Preview, it looks jagged for a moment, until it anti-aliases the file. Once anti-aliased, the legibility improves noticeably. I take it mapserver cannot perform any anti-aliasing when scaling rasters. I suspect even nearest neighbour would be a great improvement. Any plans for this? I guess it would require JPEG or PNG24 to provide enough colours. Is it possible for a browser or client app to do this work? regards, Nick On 25/04/2005, at 7:45 AM, Nick Dabner wrote: > Thanks Bart, > > So I take it that scale and mapxy are mutually exclusive with mapext? > Removing mapext always results in the error: > > msDrawMap(): Image handling error. Unable to initialize image. > msCalculateScale(): General error message. Invalid image extent, > minx=-1.000000, miny=-1.000000, maxx=-1.000000, maxy=-1.000000 > > Any idea what I am doing wrong? Also I found out my scale is current > 3.15 on the output map and needs to be 2.59, hence the poor output. > Would a resolution tag in the mapfile help? > > ND > > On 24/04/2005, at 10:45 PM, Bart van den Eijnden wrote: > >> Hi Nick, >> >> you can probably use a combination of mapxy and scale. >> >> See Mapserver CGI reference: >> http://mapserver.gis.umn.edu/doc44/cgi-reference.html >> >> Best regards, >> Bart >> >> On Sun, 24 Apr 2005 22:38:34 +1000, Nick Dabner >> >> wrote: >> >>> Hello list, >>> >>> I have a set of raster geotiffs tiled and working on mapserver 4.2 on >>> osx (thanks to william k). >>> >>> When viewing the rasters in mapserver, I find they suffer from some >>> slight scaling and never look anywhere near as good as the original >>> files. I have given dithering and PNG24 a go, but see that I probably >>> need to match my mapserver session's scale as close as possible to >>> the >>> source data scale. Does this sound right? >>> >>> Using CGI mapserver, how can I specify an exact viewing area (to >>> match >>> my calculations)? What argument would I choose. >>> >>> Attemping to pass IMGEXT=2482199.076569 4407814.492404 >>> 2484230.3854232 >>> 4406291.0107634 just returns an extent error. Oh, I am in Melb Aust, >>> so >>> these are real coords. >>> >>> Any other ideas? The next step would probably be fixed zoom levels >>> for >>> street, area, suburb, municipality and city or similar, with >>> preprocessed rasters for each level. >>> >>> regards, >>> >>> Nick >>> >> >> >> >> -- >> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ >> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 3343 bytes Desc: not available URL: From ed at TOPOZONE.COM Sun Apr 24 18:55:08 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Sun, 24 Apr 2005 21:55:08 -0400 Subject: Zooming to match a raster scale Message-ID: Nick - I'm not sure what your "unit" is supposed to mean, but I can describe the process for taking the pixel size and finding the right MINSCALE/MAXSCALE values. The MINSCALE and MAXSCALE values are the denominators of scale ratios, like 1:10,000 scale. MINSCALE 10000 means "a minimum scale of 1:10,000", where one meter on the map equals 10,000 meters on the ground. The problem becomes, "what's one meter on the map"? The RESOLUTION statement answers that question. The default value is 72, meaning that 72 pixels in a MapServer output image are presumed to occupy one inch on the screen. This is actually unlikely to be an accurate value unless you're running a 20-year-old Macintosh, but it often doesn't matter - it's mostly used for internal calculations. So, if 72 pixels are presumed to cover one inch on the screen, and your image has a source resolution of 1.26956817 meters per pixel, then one inch on the screen will show 72 * 1.26956817 meters or 91.40890824 meters of image. Since 91.40890824 meters equals 3598.7687 inches, this means one inch on the screen shows 3598.7687 inches on the ground - a scale ratio of 1:3598.7687 If you displayed that image at the "scale" of 3598.7687 you should get a pixel-for-pixel replica of your source image. If you use a different RESOLUTION statement, you need to adjust accordingly. For calculating the IMGEXT values, you simply need to make the X extent and Y extent equal the number of (X or Y) pixels in the image times 1.26956817. Yes, there are better-quality ways of resampling images, but - as you saw in Preview - they're slow. MapServer doesn't use them, but you can use various tools (including gdalwarp, from the GDAL distribution) to resample images offline and create "pyramids" of varying resolutions. This will improve the display quality of your images while keeping the performance fast - at the expense of extra disk space and preprocessing work. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com ________________________________ From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Nick Dabner Sent: Sunday, April 24, 2005 7:17 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Zooming to match a raster scale Got it. - Thanks Bart. My extents were wrong as IMGEXT do not match the gdalinfo info fo upper-left, lower-right style when applied to Australia. Seems I have to switch the latitude. Ok, so just to finish up this thread, found a solution by taking a point using Mapxy and then applying a scale or buffer. The rasters I am using have a pixel size of (1.26956817,-1.26956817) and a unit of 0.0174532925199433. By matching the scale as returned in the template/html file, as close as possible to this pixel size shown by gdalinfo, the maps start looking pretty good as they have little or no scaling. First question: With a given pixel size and unit (metres) above, what is the formula to work out the scale to input? In the example above, I found a value of .31267 would give me a matching output scale to pixel size to 4 decimal places. Second question: Loading the TIF file up in Apple Preview, it looks jagged for a moment, until it anti-aliases the file. Once anti-aliased, the legibility improves noticeably. I take it mapserver cannot perform any anti-aliasing when scaling rasters. I suspect even nearest neighbour would be a great improvement. Any plans for this? I guess it would require JPEG or PNG24 to provide enough colours. Is it possible for a browser or client app to do this work? regards, Nick On 25/04/2005, at 7:45 AM, Nick Dabner wrote: Thanks Bart, So I take it that scale and mapxy are mutually exclusive with mapext? Removing mapext always results in the error: msDrawMap(): Image handling error. Unable to initialize image. msCalculateScale(): General error message. Invalid image extent, minx=-1.000000, miny=-1.000000, maxx=-1.000000, maxy=-1.000000 Any idea what I am doing wrong? Also I found out my scale is current 3.15 on the output map and needs to be 2.59, hence the poor output. Would a resolution tag in the mapfile help? ND On 24/04/2005, at 10:45 PM, Bart van den Eijnden wrote: Hi Nick, you can probably use a combination of mapxy and scale. See Mapserver CGI reference: http://mapserver.gis.umn.edu/doc44/cgi-reference.html Best regards, Bart On Sun, 24 Apr 2005 22:38:34 +1000, Nick Dabner wrote: Hello list, I have a set of raster geotiffs tiled and working on mapserver 4.2 on osx (thanks to william k). When viewing the rasters in mapserver, I find they suffer from some slight scaling and never look anywhere near as good as the original files. I have given dithering and PNG24 a go, but see that I probably need to match my mapserver session's scale as close as possible to the source data scale. Does this sound right? Using CGI mapserver, how can I specify an exact viewing area (to match my calculations)? What argument would I choose. Attemping to pass IMGEXT=2482199.076569 4407814.492404 2484230.3854232 4406291.0107634 just returns an extent error. Oh, I am in Melb Aust, so these are real coords. Any other ideas? The next step would probably be fixed zoom levels for street, area, suburb, municipality and city or similar, with preprocessed rasters for each level. regards, Nick -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ed at TOPOZONE.COM Sun Apr 24 19:08:57 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Sun, 24 Apr 2005 22:08:57 -0400 Subject: Questions on projections, reference systems, map extents, scales Message-ID: Klaus - "Vortex" is a good choice - you're certainly spinning around rapidly! I'm not going to try to give you a complete GIS tutorial, but you should try to get one. Try to learn about datums, projections, etc. OUTSIDE of MapServer, then learn how to use those concepts INSIDE MapServer. That way you're not trying to do two things at once, and you might be able to ask questions in the most appropriate places. For example, there is a separate mailing list for PROJ and that's the best place to ask questions about it. If all the input and output data in a MapServer map use the same coordinate system, then you do not have to specify any coordinate system at all. If that is not the case, you should really specify ALL input AND output coordinate systems. Coordinate systems are not "embedded" as often as you seem to think - you need to specify them. WGS84 and NAD83 can be treated as identical - for the portion of the globe where NAD83 is defined. Do not try to use coordinates in Mozambique and call them "NAD83". Yes, the "geographic" coordinate system refers to longitude/latitude coordinates. Longitude and latitude are NOT "always the same" and must be expressed relative to a datum; 30 degrees North, 90 degrees West is NOT the same location in the NAD27 datum as it is in NAD83. WGS83 and NAD83 are datums - they are not coordinate systems. Cartographic coordinate systems are based on datums. If you have "pure" (most people would say "unprojected") longitude/latitude data you still need to know what datum is used. You're worrying too much about height/altitude - ignore it. The ellipsoid/datum parameters for your projections know how big the Earth is (or at least, how big it is defined to be for that ellipsoid). If the output and input projections are identical there is no reprojection done. Yes, this is faster, but vector reprojection is VERY fast and not worth worrying about (at least, not now). The map EXTENTS are expressed in the units of the output projection being used by MapServer (as defined in your MAP file). You will have MUCH better luck getting answers if you limit your postings to one or a few related questions. Long laundry lists of questions tend to make readers (a) feel they don't have time to answer all those questions and/or (b) don't know how to answer ALL of them, so they might as well not answer ANY of them. And please always reply to the whole list, not just to the person who replied to you - thanks! - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Vortex Sent: Sunday, April 24, 2005 6:10 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] Questions on projections, reference systems, map extents, scales Hello!! I'm quite new to all this mapserver/postgis/proj4/geoinformationsystem stuff. Althought i've played around for a while with it and made many assumptions how it works, i'm unsure if i got it right and have a lot of questions too. Maybe somebody can confirm or disagree my conclusions and answer some questions? * I have to specify the coordinate system for every data source? - At least for shapefiles and postgis layers the coordinate system should be "embedded"? Why i have to specify it anyway? - What happens if they don't match? + Is the lat/lon data simply related to the new reference system? * WGS84 and NAD83 are *nearly* the same? * geographic coordinate system means unprojected latitude/longitude values? * WGS84 and NAD83 are "unprojected" lat/long coordinate systems by definition? * latitude/longitude values are independent of the reference system, they are always the same. But the reference system is getting important if i want to calculate the absolute position of a point in 3d space because the associated height value is based on the surface of the reference ellipsoid? * There are data sources available which does not have a reference system at all and consists of "pure" lat/long data? - If i specify a reference system in the mapfile for such data anyway, the positions of this data source are asumed to be flat on the surface of the specified reference ellipsoid? * To do a projection (like lcc) it is absolutely necessary to have a reference system, because it's necessary to know the 3d positions of all data to perform the projection? - Does mapserver consider the height of any point over the surface of the reference ellipsoid for projection? Probably this is done by proj4 lib anyway. Does it? Is it necessary? * If i specify a latlong output projection and the source data is also in latlong althought there is a reference system specified like NAD83, there is no reprojection done? - Is this faster than output to lcc for example? - Isn't it totally regardless of which reference systems are specified in this case? * The map EXTENTS specified in the mapfile are always related to the result of the output projection? - For lcc they are in meter, for latlong they are in decimal degrees? - In the lcc projection it is quite easy to set the origin of the map by lat_0 lon_0 parameter if i want to zoom to a specific lat/lon position having always the same extents. + Is this the usual way? With lat/long output, the only way to change the origing is changing the EXTENT? - If i set k != 1 for lcc, the scale calculation goes wrong? So zooming should always be done be modifing the map extents? Is the k parameter useful in mapserver anyway? * The SIZE and RESOLUTION paramter in mapfile are used to calculate the real size of the displayed image. The specified map EXTENT is fitted into this "window". Mapserver does not really know about the units of the output projection. Therefore i have to specify the UNITS in the mapfile. With a projection output in meter, the scale can be calculated now. Based on the scale and the resolution, the scalebar is generated. - The documentation says, the scale is "Set most often by the application." Is this really true? I don't know how to set it and i thought it should be calculated by the mapserver itself? - How is it possible for mapserver to calculate a scalbar for lat/long output? I thought it should be even for projections difficult to calculate a scalebar. Isn't it only correct for parts of the map because of distortions? I thought this problem would be even more difficult for unprojected maps? Is this only a rough estimation? * What happens if there is projected INPUT data with units in meters for example? I think it should work too if i specify the correct projection. But is it internally "inverse" projected to latlong coordinates to merge it with other data sources which are maybe naturally in latlong coordinates and then reprojected to the output projection? Wow, that was quite a lot. Hopefully not too much. Sorry for my bad english. Thank you very much! Klaus From gmanepal at GMAIL.COM Sun Apr 24 20:01:06 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Sun, 24 Apr 2005 23:01:06 -0400 Subject: Zooming and Centering Question: Second Run In-Reply-To: <6d675eda05042412496b10d737@mail.gmail.com> Message-ID: Hello All, I am using php mapscript. I cannot get the image to center when I click on the image and with some zooming factor. I am using image coordinates (not geographical coordinates) for zooming. 1.)Can anyone think of possible reasons? I can provide with any necessary information. 2.) Also, how do I center the image based on my click without zooming? 3.) Finally, does the extent of the map automatically changed by mapscript, when I zoom? I hope, i can get this resolved! Thanks, Giridhar Hello All, I tried to center the image based on a click when I zoom using php/mapscript. For some reason, I am failing to do so. Is it because, the lat long I calculated using javascript is wrong? but it almost matches with 'ArcIMS Author'.? Can anyone write the snippet of php/mapscript code that will zoom to the point i click, provided I have the lat-long of the click? Also, can you explain what the new extent will be? Thanks, Giridhar From bill at BINKO.NET Sun Apr 24 20:25:13 2005 From: bill at BINKO.NET (Bill Binko) Date: Sun, 24 Apr 2005 23:25:13 -0400 Subject: HPGN Datum? Message-ID: Hi everyone, I found an excellent site for Florida map data: http://www.fgdl.org/ Some of their data is a bit out of date, but there is a nice selection, and it's all in the same projection, even from a wide variety of sources. My problem is that they use a datum that I haven't seen before "HPGN". Here is the projection info from their metadata: MAP PROJECTION PARAMETERS: Projection ALBERS Units METERS Datum HPGN Spheroid GRS1980 1st standard parallel 24 0 0.000 2nd standard parallel 31 30 0.000 Central meridian -84 0 0.000 Latitude of projection's origin 24 0 0.000 False easting (meters) 400000.00000 False northing (meters) 0.00000 After some looking around, and some advice from the board a few weeks ago, I used these projection instructions in Mapserver (CVS Head): PROJECTION "+proj=aea" "+lat_1=24" "+lat_2=31.5" "+lat_0=24" "+lon_0=-84" "+x_0=400000" "+y_0=0" "+ellps=GRS80" "+datum=NAD83" "+units=m" "+no_defs" END It seemed the "NAD83" was close enough to the "HPGN" datam. Now I'm seeing small problem when combining any of the data from this source with others that are in the Florida West projection (espg:26759), and I'm suspecting that the bad datum is the problem. Actually, I'm hoping that's it because if it is, I'm confident someone here can help me get it right: if not, it means the data's bad :-( An example of the "wrongness" can be seen at: http://www.binko.net/badProj.png The roads should line up within the parcels. The roads are in HPGN, and the parcels are in espg:26759 Any help would as always be appreciated. Bill PS: Paul R: you did say you loved projection problems, right? :-b From woodbri at SWOODBRIDGE.COM Sun Apr 24 20:23:26 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Sun, 24 Apr 2005 23:23:26 -0400 Subject: Perl Mapscript 4.4 Issues Message-ID: Hi all, I'm looking at the SWIGMapScript doc and have run into a few problems. $mapObj->setExtent($minx, $miny, $maxx, $maxy); and throws an error: Can't locate auto/mapscript/mapObj/setExtent.al in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/local/lib/perl/5.8.0 /usr/local/share/perl/5.8.0 .) at index.cgi line 255 Also looking at the document it looks like there is an $layerObj->setExtent(...) which doesn't seem to be correct. The classObj doc says it "Provides access to all class parameters (color, symbol, label, & etc...)." but there is no doc to indicate there is a symbol property, nor is there any of doc/properties for color, overlaycolor, size, overlaysize. I think these were moved to styleObjs so it might be appropriate to comment on that. -Steve W. From covariance at SHAW.CA Sun Apr 24 22:06:50 2005 From: covariance at SHAW.CA (Bob Bruce) Date: Mon, 25 Apr 2005 00:06:50 -0500 Subject: Problems with WIN32 Build Message-ID: I was just trying to build MapServer on my Windows 2000 system and got the following errors near the end of my build: link mapserv.obj mapserver_i.lib c:/projects/gdwin32/bgd.lib c:\projects\proj-4.4.9/src/proj_i.lib c:\projects\gdal-1.2.5/gdal_i.lib c:/projects/curl-7.13.0/lib/libcurl.lib "C:\Program Files\Microsoft Visual S tudio .NET 2003\Vc7\PlatformSDK\Lib\WSOCK32.LIB" Microsoft (R) Incremental Linker Version 7.10.3077 Copyright (C) Microsoft Corporation. All rights reserved. mapserv.obj : error LNK2019: unresolved external symbol _msForceTmpFileBase referenced in function _main mapserv.exe : fatal error LNK1120: 1 unresolved externals NMAKE : fatal error U1077: 'link' : return code '0x460' Stop. The only place in the build that I can find a reference to msForceTmpFileBase is up in the build output at: maputil.c c:\Projects\mapserver_dev\mapproject.h(41) : warning C4005: 'USE_PROJ_API_H' : macro redefinition command-line arguments : see previous definition of 'USE_PROJ_API_H' maputil.c(1027) : warning C4098: 'msForceTmpFileBase' : 'void' function returning a value cl /nologo /MD /W3 /DDEBUG -Ic:/projects/gdwin32 -Ic:\projects\proj-4.4.9/src -IC:\php-4.3.11/regex -DP HP_NO_ALIASES -Ic:\projects\gdal-1.2.5/gcore -Ic:\projects\gdal-1.2.5/alg -Ic:\projects\gdal-1.2.5/ogr -Ic:\project s\gdal-1.2.5/port -Ic:/projects/curl-7.13.0/include -DHAVE_STRING_H -DREGEX_MALLOC -DNEED_STRCASECMP -D NEED_STRNCASECMP -DNEED_STRLCAT -DWIN32 -D_WIN32 -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE _GD_WBMP -DUSE_GD_GIF -DGD_HAS_GDIMAGEGIFPTR -DUSE_GD_FT -DGD_HAS_GETBITMAPFONT -DUSE_WMS_SVR -DUSE_WMS_LYR -DIG NORE_MISSING_DATA -DENABLE_STDERR_DEBUG -DUSE_GDAL -DUSE_WFS_SVR -DUSE_WFS_LYR -DUSE_GD_ANTIALIAS /c ma pscale.c /Fomapscale.obj I see that there was a note in maputil.c that msForceTmpFileBase was added - 2005/02/09 21:51:17 frank - so I don't understand why I am getting an unresolved external reference. I am using Visual Studio .NET 2003 Standard Edition to do this build. Can someone out there tell me what I need to do to fix this problem? thanks, Bob Bruce, Winnipeg, Manitoba From dcmikkelsen at SHAW.CA Sun Apr 24 21:56:42 2005 From: dcmikkelsen at SHAW.CA (Dean C. Mikkelsen) Date: Sun, 24 Apr 2005 21:56:42 -0700 Subject: HPGN Datum? In-Reply-To: Message-ID: Hi Bill, Here is some information for you about HPGN and HARN. HPGN and HARN HPGN (High Precision Geodetic Network) and HARN (High Accuracy Reference Network) are synonymous. They are both names for the same project that is focused on readjusting the NAD83 datum to a higher level of accuracy state by state. HARN/HPGN is more accurate form of the North American Datum. What you are experiencing in Florida is that network of points that defines the HPGN/HARN is based on NAD83, but that local states often try to make denser grids and hence come up with better transformation parameters. The EPSG data model does incorporate the HARN information for Florida - based also on the SPCS zones. Looking at the files found in the PROJ.4 library, it appears as though the code you are using epsg:26759 is based on NAD27. This is where I would say the problem is occurring. If you use epsg:26959 this should solve the problem and will match with the HARN/HPGN. Cheers, Dean Dean C. Mikkelsen,B.Sc.,P.Eng. Principal Consultant Terra ETL Ltd. - Consultants on GIS & Geodesy Vancouver, B.C., Canada Phone: 604-929-8630 E-mail: dcmikkelsen at shaw.ca -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Bill Binko Sent: April 24, 2005 8:25 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] HPGN Datum? Hi everyone, I found an excellent site for Florida map data: http://www.fgdl.org/ Some of their data is a bit out of date, but there is a nice selection, and it's all in the same projection, even from a wide variety of sources. My problem is that they use a datum that I haven't seen before "HPGN". Here is the projection info from their metadata: MAP PROJECTION PARAMETERS: Projection ALBERS Units METERS Datum HPGN Spheroid GRS1980 1st standard parallel 24 0 0.000 2nd standard parallel 31 30 0.000 Central meridian -84 0 0.000 Latitude of projection's origin 24 0 0.000 False easting (meters) 400000.00000 False northing (meters) 0.00000 After some looking around, and some advice from the board a few weeks ago, I used these projection instructions in Mapserver (CVS Head): PROJECTION "+proj=aea" "+lat_1=24" "+lat_2=31.5" "+lat_0=24" "+lon_0=-84" "+x_0=400000" "+y_0=0" "+ellps=GRS80" "+datum=NAD83" "+units=m" "+no_defs" END It seemed the "NAD83" was close enough to the "HPGN" datam. Now I'm seeing small problem when combining any of the data from this source with others that are in the Florida West projection (espg:26759), and I'm suspecting that the bad datum is the problem. Actually, I'm hoping that's it because if it is, I'm confident someone here can help me get it right: if not, it means the data's bad :-( An example of the "wrongness" can be seen at: http://www.binko.net/badProj.png The roads should line up within the parcels. The roads are in HPGN, and the parcels are in espg:26759 Any help would as always be appreciated. Bill PS: Paul R: you did say you loved projection problems, right? :-b From fwarmerdam at GMAIL.COM Sun Apr 24 22:12:59 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Mon, 25 Apr 2005 01:12:59 -0400 Subject: Problems with WIN32 Build In-Reply-To: Message-ID: On 4/25/05, Bob Bruce wrote: > I was just trying to build MapServer on my Windows 2000 system and got the > following errors near the end of my build: > > I see that there was a note in maputil.c that msForceTmpFileBase was added - > 2005/02/09 21:51:17 frank - so I don't understand why I am getting an > unresolved external reference. > > I am using Visual Studio .NET 2003 Standard Edition to do this build. Bob, Could you be a bit more specific about what version of mapserver you are building? You are sure you don't have the implementation of msForceTmpFileBase() in maputil.c? It seems to be in CVS currently. Any chance you tried to use a mapserver 4.5 mapserv.c with 4.4 libraries? Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From bill at BINKO.NET Sun Apr 24 22:16:47 2005 From: bill at BINKO.NET (Bill Binko) Date: Mon, 25 Apr 2005 01:16:47 -0400 Subject: HPGN Datum? In-Reply-To: <000b01c54953$2c5728f0$0e7e5218@mikkedcoffice> Message-ID: On Sun, 24 Apr 2005, Dean C. Mikkelsen wrote: > Hi Bill, > > Here is some information for you about HPGN and HARN. > Thank you for the info! This explains alot > > What you are experiencing in Florida is that network of points that > defines the HPGN/HARN is based on NAD83, but that local states often try > to make denser grids and hence come up with better transformation > parameters. That sounds right: the parcel data comes from a local county (pinellas). > Looking at the files found in the PROJ.4 library, it appears as though > the code you are using epsg:26759 is based on NAD27. This is where I > would say the problem is occurring. If you use epsg:26959 this should > solve the problem and will match with the HARN/HPGN. I'm glad you're pointing me in the right direction, but that simple change blew my parcels out of the screen. Would it help if I posted the .prj files for the two datasets? Thanks for the input. Bill From dabner at OPTUSNET.COM.AU Sun Apr 24 22:58:17 2005 From: dabner at OPTUSNET.COM.AU (Nick Dabner) Date: Mon, 25 Apr 2005 15:58:17 +1000 Subject: Zooming to match a raster scale In-Reply-To: <4BF377919225F449BB097CB76FFE9BC818837B@ptolemy.topozone.com> Message-ID: Ed, Thanks for the quick response. Followed your workings and got what is a near perfect match for another scale. In doing so, I can see how is resolution is used, which was some explanation I hadn't found detailed elsewhere. Kept it at 72 dpi. Yes, preview is slow, but the results are nice. Gdalwarp changes projections if I am not mistaken. Do you mean gdal_translate to create the raster pyramids? Will have to give this a try later today as my rasters do vary, especially with inner-city areas. It loooks like I would supply the output size in pixels (x,y) to get the the desired scale. Definately info like this is helpful for us non-geo-versed. Need this kind of info in the --verbose docs! Cheers, Nick On 25/04/2005, at 11:55 AM, Ed McNierney wrote: > Nick - > ? > I'm not sure what your "unit" is supposed to mean, but I can describe > the process for taking the pixel size and finding the right > MINSCALE/MAXSCALE values. > ? > The MINSCALE and MAXSCALE values are the denominators of scale ratios, > like 1:10,000 scale.? MINSCALE 10000 means "a minimum scale of > 1:10,000", where one meter on the map equals 10,000 meters on the > ground.? The problem becomes, "what's one meter on the map"? > ? > The RESOLUTION statement answers that question.? The default value is > 72, meaning that 72 pixels in a MapServer output image are presumed to > occupy one inch on the screen.? This is actually unlikely to be an > accurate value unless you're running a 20-year-old Macintosh, but it > often doesn't matter?- it's mostly used for internal calculations. > ? > So, if 72 pixels are presumed to cover one inch on the screen, and > your image has a source resolution of 1.26956817 meters per pixel, > then one inch on the screen will show 72 * 1.26956817 meters or > 91.40890824 meters of image.? Since 91.40890824 meters equals > 3598.7687 inches, this means one inch on the screen shows 3598.7687 > inches on the ground - a scale ratio of 1:3598.7687 > ? > If you displayed that image at the "scale" of 3598.7687 you should get > a pixel-for-pixel replica of your source image.? If you use a > different RESOLUTION statement, you need to adjust accordingly. > ? > For calculating the IMGEXT values, you simply need to make the X > extent and Y extent equal the number of (X or Y) pixels in the image > times 1.26956817. > Yes, there are better-quality ways of resampling images, but - as you > saw in Preview - they're slow.? MapServer doesn't use them, but you > can use various tools (including gdalwarp, from the GDAL distribution) > to resample images offline and create "pyramids" of varying > resolutions.? This will improve the display quality of your images > while keeping the performance fast - at the expense of extra disk > space and preprocessing work. > ? > ??? - Ed > > Ed McNierney -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 3766 bytes Desc: not available URL: From dabner at OPTUSNET.COM.AU Sun Apr 24 23:03:48 2005 From: dabner at OPTUSNET.COM.AU (Nick Dabner) Date: Mon, 25 Apr 2005 16:03:48 +1000 Subject: Mac OS Tiger / Gcc4.0 support Message-ID: Hi List, Wondering if anyone has attempted using mapserver on Mac OS Tiger? It is out in a few days, but I haven't seen any notes on using Mapserver with it. One of the main changes is gcc 4.0 as opposed to gcc 3.3, but there is likely more things under the hood. Any reason known why it wouldn't work? Using the panther binaries posted on this list earlier in the month, which work really well. regards, Nick From gavin.simpson at UCL.AC.UK Sun Apr 24 23:37:20 2005 From: gavin.simpson at UCL.AC.UK (Gavin Simpson) Date: Mon, 25 Apr 2005 07:37:20 +0100 Subject: Zooming and Centering Question: Second Run In-Reply-To: <6d675eda05042420016d7263d7@mail.gmail.com> Message-ID: Giridhar Manepalli wrote: > Hello All, > I am using php mapscript. I cannot get the image to center when I > click on the image and with some zooming factor. > > I am using image coordinates (not geographical coordinates) for zooming. > > 1.)Can anyone think of possible reasons? I can provide with any > necessary information. > > 2.) Also, how do I center the image based on my click without zooming? > > 3.) Finally, does the extent of the map automatically changed by > mapscript, when I zoom? > > I hope, i can get this resolved! > > Thanks, > Giridhar > Repeatedly posting the same question to the list is not the best way to go about securing help! Try the example in the PHPMapscript part of the Mapserver WIKI: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScript Which is listed in the support page of the website... G From vortex25 at GMX.DE Mon Apr 25 00:54:11 2005 From: vortex25 at GMX.DE (Vortex) Date: Mon, 25 Apr 2005 09:54:11 +0200 Subject: Questions on projections, reference systems, map extents, scales In-Reply-To: <4BF377919225F449BB097CB76FFE9BC818837C@ptolemy.topozone.com> Message-ID: Hello Ed! On Sun, 24 Apr 2005 22:08:57 -0400 Ed McNierney wrote: > "Vortex" is a good choice - you're certainly spinning around rapidly! :-] > ask questions in the most appropriate places. For example, there is a > separate mailing list for PROJ and that's the best place to ask > questions about it. I'm afraid you are right. Your answers helped me a lot anyway and i try to write some short comments. > Yes, the "geographic" coordinate system refers to longitude/latitude > coordinates. Longitude and latitude are NOT "always the same" and must > be expressed relative to a datum; 30 degrees North, 90 degrees West is > NOT the same location in the NAD27 datum as it is in NAD83. WGS83 and Ok! So i suppose this comes from different equator/meridian definitions inside the datums or something like that? (But you don't need to answer this because i will follow your advice :-) > NAD83 are datums - they are not coordinate systems. Cartographic > coordinate systems are based on datums. Ok! I think i got this. > If you have "pure" (most people would say "unprojected") > longitude/latitude data you still need to know what datum is used. Ok, i understand this now. > If the output and input projections are identical there is no > reprojection done. Yes, this is faster, but vector reprojection is VERY > fast and not worth worrying about (at least, not now). Ok! > You will have MUCH better luck getting answers if you limit your > postings to one or a few related questions. Long laundry lists of > questions tend to make readers (a) feel they don't have time to answer > all those questions and/or (b) don't know how to answer ALL of them, so > they might as well not answer ANY of them. Ok, i will consider this for my next posting. Thank you for having the patience! Klaus -- ====================================================== " WWW: http://db0fhn.efi.fh-nuernberg.de/~dg1nav?vo " LOCAL: klaus at castle.kwsnet " EMAIL: vortex25 at gmx.de " AX.25: dg1nav at db0fhn.#bay.deu.eu From lfilak at MEDINACO.ORG Mon Apr 25 05:18:22 2005 From: lfilak at MEDINACO.ORG (Lowell Filak) Date: Mon, 25 Apr 2005 08:18:22 -0400 Subject: Perl Mapscript 4.4 Issues Message-ID: The following message was sent by Stephen Woodbridge on Sun, 24 Apr 2005 23:23:26 -0400. > Hi all, > > I'm looking at the SWIGMapScript doc and have run into a few problems. > > $mapObj->setExtent($minx, $miny, $maxx, $maxy); > > and throws an error: > > Can't locate auto/mapscript/mapObj/setExtent.al in @INC (@INC contains: > /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 > /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 > /usr/local/lib/site_perl /usr/local/lib/perl/5.8.0 > /usr/local/share/perl/5.8.0 .) at index.cgi line 255 > > Also looking at the document it looks like there is an > $layerObj->setExtent(...) which doesn't seem to be correct. > > The classObj doc says it "Provides access to all class parameters > (color, symbol, label, & etc...)." but there is no doc to indicate there > is a symbol property, nor is there any of doc/properties for color, > overlaycolor, size, overlaysize. I think these were moved to styleObjs > so it might be appropriate to comment on that. Steve, What version are you using? I just double checked and there is most certainly a 'setExtent' for the mapObj in the mapscript.pm. You are correct on the classObj not. It is an old note that needs to be deleted. Sorry for the confusion. Lowell From covariance at SHAW.CA Mon Apr 25 05:37:16 2005 From: covariance at SHAW.CA (Bob Bruce) Date: Mon, 25 Apr 2005 07:37:16 -0500 Subject: Problems with WIN32 Build Message-ID: On Mon, 25 Apr 2005 01:12:59 -0400, Frank Warmerdam wrote: >On 4/25/05, Bob Bruce wrote: >> I was just trying to build MapServer on my Windows 2000 system and got the >> following errors near the end of my build: >> >> I see that there was a note in maputil.c that msForceTmpFileBase was added - >> 2005/02/09 21:51:17 frank - so I don't understand why I am getting an >> unresolved external reference. >> >> I am using Visual Studio .NET 2003 Standard Edition to do this build. > >Bob, > >Could you be a bit more specific about what version of mapserver >you are building? You are sure you don't have the implementation >of msForceTmpFileBase() in maputil.c? It seems to be in CVS >currently. Any chance you tried to use a mapserver 4.5 mapserv.c >with 4.4 libraries? > >Best regards, > >-- >---------------------------------------+-------------------------------------- >I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com >light and sound - activate the windows | http://pobox.com/~warmerdam >and watch the world go round - Rush | Geospatial Programmer for Rent Frank: my History.txt file tells me that I am working with version 4.5. I was just trying to rebuild my MapServer installation and when I was deleting all of the temporary files I mistakenly deleted my nmake.opt file and am trying to redo it. When I look in the code for maputil.c I certainly do see code for the msForceTmpFileBase funtion. Perhaps I don't have the nmake.opt set up quite right but at this time I don't see where I am going wrong. Bob From woodbri at SWOODBRIDGE.COM Mon Apr 25 05:42:26 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Mon, 25 Apr 2005 08:42:26 -0400 Subject: Perl Mapscript 4.4 Issues In-Reply-To: <20050425121818.E68671A65AF@mail.medinaco.org> Message-ID: Oops, My bad! The machine I was working on needs to be upgraded. It had an old version loaded: MapServer version 4.0 OUTPUT=PNG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Sorry, -Steve W. Lowell Filak wrote: > The following message was sent by Stephen Woodbridge > on Sun, 24 Apr 2005 23:23:26 -0400. > > >>Hi all, >> >>I'm looking at the SWIGMapScript doc and have run into a few problems. >> >>$mapObj->setExtent($minx, $miny, $maxx, $maxy); >> >>and throws an error: >> >>Can't locate auto/mapscript/mapObj/setExtent.al in @INC (@INC contains: >>/etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 >>/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 >>/usr/local/lib/site_perl /usr/local/lib/perl/5.8.0 >>/usr/local/share/perl/5.8.0 .) at index.cgi line 255 >> >>Also looking at the document it looks like there is an >>$layerObj->setExtent(...) which doesn't seem to be correct. >> >>The classObj doc says it "Provides access to all class parameters >>(color, symbol, label, & etc...)." but there is no doc to indicate there >>is a symbol property, nor is there any of doc/properties for color, >>overlaycolor, size, overlaysize. I think these were moved to styleObjs >>so it might be appropriate to comment on that. > > > Steve, > > What version are you using? > I just double checked and there is most certainly a 'setExtent' for the > mapObj in the mapscript.pm. > You are correct on the classObj not. It is an old note that needs to be > deleted. Sorry for the confusion. > > Lowell > From covariance at SHAW.CA Mon Apr 25 05:47:26 2005 From: covariance at SHAW.CA (Bob Bruce) Date: Mon, 25 Apr 2005 07:47:26 -0500 Subject: Problems with WIN32 Build Message-ID: On Mon, 25 Apr 2005 01:12:59 -0400, Frank Warmerdam wrote: >On 4/25/05, Bob Bruce wrote: >> I was just trying to build MapServer on my Windows 2000 system and got the >> following errors near the end of my build: >> >> I see that there was a note in maputil.c that msForceTmpFileBase was added - >> 2005/02/09 21:51:17 frank - so I don't understand why I am getting an >> unresolved external reference. >> >> I am using Visual Studio .NET 2003 Standard Edition to do this build. > >Bob, > >Could you be a bit more specific about what version of mapserver >you are building? You are sure you don't have the implementation >of msForceTmpFileBase() in maputil.c? It seems to be in CVS >currently. Any chance you tried to use a mapserver 4.5 mapserv.c >with 4.4 libraries? > >Best regards, > >-- >---------------------------------------+-------------------------------------- >I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com >light and sound - activate the windows | http://pobox.com/~warmerdam >and watch the world go round - Rush | Geospatial Programmer for Rent Sorry, Frank but in my last email, I should have mentioned that in my nmake.opt file I have the following lines to point to my MapServer source: # Set the following to point to the current directory. MS_BASE = C:\projects\mapserver_dev thanks for your help, Bob Bruce From lfilak at MEDINACO.ORG Mon Apr 25 06:06:10 2005 From: lfilak at MEDINACO.ORG (Lowell Filak) Date: Mon, 25 Apr 2005 09:06:10 -0400 Subject: Perl Mapscript "issues" Message-ID: The following message was sent by Nick Floersch on Sat, 23 Apr 2005 20:44:55 -0400. > Hi All, > > I recently posted a long bit about my problems getting a newer version > of Perl mapscript to work with a perl mapscript app we have here. > > The question has changed. > > NOW, I need to know this: > Why, when I try to instantiate a map object with any map file other than > "" do I get a segfault? > v---snip--- > #!/usr/bin/perl -w > use mapscript; > use XBase; > > my $mapObjFull = new mapscript::mapObj("itasca.map"); > warn "Got Here 2.5"; > ^---snip--- > This gives me a segfault. > > The itasca.map file is the one found in the mapserver demo "workshop." > > If I call new mapscript::mapObj with no map, it works fine: > v---snip--- > #!/usr/bin/perl -w > use mapscript; > use XBase; > > my $mapObjFull = new mapscript::mapObj(); > warn "Got Here 2.5"; > ^---snip--- > Will produce the message "Got Here 2.5 at line 6" or something like > that. It works fine. > > Just to rule out the idea that itasca.map had a layer or something that > it couldn't access (though it works fine in the workshop demo), I made a > copy of it and commented out ALL layers. > > It still segfaults. > > In desperation I used the helloworld map from the tutorials thinking I > could avoid any issues with non-existent data layers etc. > > It still segfaults. > > Someone mentioned looking for libmap.a and see if it is an old version. > I don't have libmap.a in any library path. Yet, the old files for perl > mapscript work perfectly. It's the new ones that don't. > > What am I missing here? It isn't the map files. It's something about the > perl mapscript build. > > I am trying to do all of this with Mapserver 4.4.1 or 4.4.2. Neither > version has worked right yet (with mapscript at least - everything else > works fine). Nick, The libmap.a that is being referred to is probably not in a library path but still causing the problem because it is accessible during compile time. Lowell From ed at TOPOZONE.COM Mon Apr 25 06:15:20 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Mon, 25 Apr 2005 09:15:20 -0400 Subject: Zooming to match a raster scale Message-ID: Nick - Gdalwarp "warps" an image from one representation to another. That can be a change in projection, or a change in spatial resolution, or both (or neither, I suppose ). I wasn't specifically talking about creating pyramids, although that is another option you should investigate. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed at topozone.com (978) 251-4242 ________________________________ From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Nick Dabner Sent: Monday, April 25, 2005 1:58 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Zooming to match a raster scale Ed, Thanks for the quick response. Followed your workings and got what is a near perfect match for another scale. In doing so, I can see how is resolution is used, which was some explanation I hadn't found detailed elsewhere. Kept it at 72 dpi. Yes, preview is slow, but the results are nice. Gdalwarp changes projections if I am not mistaken. Do you mean gdal_translate to create the raster pyramids? Will have to give this a try later today as my rasters do vary, especially with inner-city areas. It loooks like I would supply the output size in pixels (x,y) to get the the desired scale. Definately info like this is helpful for us non-geo-versed. Need this kind of info in the --verbose docs! Cheers, Nick On 25/04/2005, at 11:55 AM, Ed McNierney wrote: Nick - I'm not sure what your "unit" is supposed to mean, but I can describe the process for taking the pixel size and finding the right MINSCALE/MAXSCALE values. The MINSCALE and MAXSCALE values are the denominators of scale ratios, like 1:10,000 scale. MINSCALE 10000 means "a minimum scale of 1:10,000", where one meter on the map equals 10,000 meters on the ground. The problem becomes, "what's one meter on the map"? The RESOLUTION statement answers that question. The default value is 72, meaning that 72 pixels in a MapServer output image are presumed to occupy one inch on the screen. This is actually unlikely to be an accurate value unless you're running a 20-year-old Macintosh, but it often doesn't matter - it's mostly used for internal calculations. So, if 72 pixels are presumed to cover one inch on the screen, and your image has a source resolution of 1.26956817 meters per pixel, then one inch on the screen will show 72 * 1.26956817 meters or 91.40890824 meters of image. Since 91.40890824 meters equals 3598.7687 inches, this means one inch on the screen shows 3598.7687 inches on the ground - a scale ratio of 1:3598.7687 If you displayed that image at the "scale" of 3598.7687 you should get a pixel-for-pixel replica of your source image. If you use a different RESOLUTION statement, you need to adjust accordingly. For calculating the IMGEXT values, you simply need to make the X extent and Y extent equal the number of (X or Y) pixels in the image times 1.26956817. Yes, there are better-quality ways of resampling images, but - as you saw in Preview - they're slow. MapServer doesn't use them, but you can use various tools (including gdalwarp, from the GDAL distribution) to resample images offline and create "pyramids" of varying resolutions. This will improve the display quality of your images while keeping the performance fast - at the expense of extra disk space and preprocessing work. - Ed Ed McNierney -------------- next part -------------- An HTML attachment was scrubbed... URL: From asimpson at I-55.COM Mon Apr 25 06:47:59 2005 From: asimpson at I-55.COM (Simpson) Date: Mon, 25 Apr 2005 08:47:59 -0500 Subject: Perl Mapscript "issues" In-Reply-To: <9CAD6BBFE34A214A8C0597CED6B1BF3B0F614C@mail.stone-env.com> Message-ID: Nick, Is it possible the Perl install is not functioning properly? From woklist at CHARTER.NET Mon Apr 25 07:09:04 2005 From: woklist at CHARTER.NET (William K) Date: Mon, 25 Apr 2005 09:09:04 -0500 Subject: Mac OS Tiger / Gcc4.0 support In-Reply-To: Message-ID: Not me yet. Or anyone else that can say - developers that have advance copies of Tiger are probably under NDAs on how things work (tho developers can probably update their software to work on Tiger, they just can't say how). I'll probably be waiting a couple weeks to get and install Tiger, just to see where everyone else has problems. Also depends on when I have time next month - kinda busy. But I'll try to get a binary package as soon as I can. Of course, if the current one works on Tiger, that's less pressure, and good to know. GCC 3.3 vs 4.0 shouldn't be too hard - even now Apple has a way to switch versions, so if there are major problems with 4.0 and MapServer, one can just switch to 3.3 which works. If you have Tiger now, as a non-dev, you're lucky. I heard there was a screwup at some online retailers and they shipped some early. I guess those people that got it early wouldn't have an NDA problem. On Apr 25, 2005, at 1:03 AM, Nick Dabner wrote: > Hi List, > > Wondering if anyone has attempted using mapserver on Mac OS Tiger? It > is out in a few days, but I haven't seen any notes on using Mapserver > with it. One of the main changes is gcc 4.0 as opposed to gcc 3.3, but > there is likely more things under the hood. Any reason known why it > wouldn't work? Using the panther binaries posted on this list earlier > in the month, which work really well. > > regards, > > Nick > > ----- William Kyngesburye http://www.kyngchaos.com/ "Mon Dieu! but they are all alike. Cheating, murdering, lying, fighting, and all for things that the beasts of the jungle would not deign to possess - money to purchase the effeminate pleasures of weaklings. And yet withal bound down by silly customs that make them slaves to their unhappy lot while firm in the belief that they be the lords of creation enjoying the only real pleasures of existence.... - the wisdom of Tarzan From chaumic at NETVIGATOR.COM Mon Apr 25 07:11:37 2005 From: chaumic at NETVIGATOR.COM (Michael) Date: Mon, 25 Apr 2005 14:11:37 +0000 Subject: Label Isse Message-ID: Hello, I'm new to MapServer. My question is how to access each label by Mapscript so that I could format the text before it dispaly ? e.g. fix the decimal places. Thanks Michael From Wolfgang.Qual at MUENCHEN.DE Mon Apr 25 08:05:48 2005 From: Wolfgang.Qual at MUENCHEN.DE (Wolfgang Qual) Date: Mon, 25 Apr 2005 17:05:48 +0200 Subject: How can I smoothen the (GIF)-output of the mapserver Message-ID: Hello list, When I create a mapserver-map, I sometimes have the impression that the maps look quite square-edged. Especially, if the color contrast of certain themes is high (b/w.). That's the reason why I am looking for a way to smoothen the output-GIFs of the mapserver - just something like the blur-filtering in Photoshop or GIMP... Thanks, Wolfgang From cdaily at GMAIL.COM Mon Apr 25 08:04:53 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Mon, 25 Apr 2005 10:04:53 -0500 Subject: How can I smoothen the (GIF)-output of the mapserver In-Reply-To: <426D074C.5030502@muenchen.de> Message-ID: I believe what you're looking for is antialiasing, in order to make things like lines less pixelated. Antialiasing is available for text and a few of the symbol types, but I had more luck taking the advise of some on the listserve and using php/mapscript to actually draw the maps at a larger scale and then letting php resample the image down to the final size, antialiasing in the process. If you're interested in some of the details for that method, let me know and I'll post some stuff. -Camden Daily Prudential Preferred Properties http://www.prupref.com On 4/25/05, Wolfgang Qual wrote: > Hello list, > When I create a mapserver-map, I sometimes have the impression that the > maps look quite square-edged. Especially, if the color contrast of > certain themes is high (b/w.). That's the reason why I am looking for a > way to smoothen the output-GIFs of the mapserver - just something like > the blur-filtering in Photoshop or GIMP... > > Thanks, > > Wolfgang > From bill at BINKO.NET Mon Apr 25 08:34:44 2005 From: bill at BINKO.NET (Bill Binko) Date: Mon, 25 Apr 2005 11:34:44 -0400 Subject: HPGN Datum? (fwd) Message-ID: Once again forgot to cc the list: sorry ---------- Forwarded message ---------- Date: Mon, 25 Apr 2005 11:21:27 -0400 (EDT) From: Bill Binko To: Dean C. Mikkelsen Subject: RE: [UMN_MAPSERVER-USERS] HPGN Datum? On Sun, 24 Apr 2005, Dean C. Mikkelsen wrote: > > Hi Bill, > > Sure, feel free to post them to the board. I'll take a look. > > Cheers, > Dean > Here are the two projections that are giving me fits (from the shapefile .prj files). When I place them on the same map, they simply don't line up. From Michael.Smith at ERDC.USACE.ARMY.MIL Mon Apr 25 08:38:29 2005 From: Michael.Smith at ERDC.USACE.ARMY.MIL (Smith, Michael ERDC-CRREL-NH) Date: Mon, 25 Apr 2005 10:38:29 -0500 Subject: LAYERS parameter on WMS GetFeatureInfo Message-ID: All, Why is the LAYERS paremeter part of the WMS GetFeatureInfo request required? I think from looking at the WMS spec that it is optional, although this is based on just a quick look through the specs. Right now, ArcGIS WMS does not send the LAYERS parameter and therefore can't query a Mapserver WMS map. Is Mapserver being overly restrictive or ArcGIS not fully following the spec? Mike Smith GIS Specialist/Physical Scientist/Oracle Developer Remote Sensing/GIS Center of Expertise Army Engineer Research & Development Center Hanover, NH (603) 646-4765 michael.smith at erdc.usace.army.mil From Tom.Kralidis at EC.GC.CA Mon Apr 25 08:42:39 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Mon, 25 Apr 2005 11:42:39 -0400 Subject: LAYERS parameter on WMS GetFeatureInfo Message-ID: For WMS 1.1.1, LAYERS is a REQUIRED parameter of the GetMap request (see section 7.2.2, table 8). See also section 7.3.3.4 on the explanation on how most of the GetMap parameters are repeated in a GetFeatureInfo request. ..Tom > -----Original Message----- > From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Smith, > Michael ERDC-CRREL-NH > Sent: Monday, 25 April, 2005 11:38 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: [UMN_MAPSERVER-USERS] LAYERS parameter on WMS GetFeatureInfo > > > All, > > Why is the LAYERS paremeter part of the WMS GetFeatureInfo > request required? I think from looking at the WMS spec that > it is optional, although this is based on just a quick look > through the specs. Right now, ArcGIS WMS does not send the > LAYERS parameter and therefore can't query a Mapserver WMS > map. Is Mapserver being overly restrictive or ArcGIS not > fully following the spec? > > Mike Smith > GIS Specialist/Physical Scientist/Oracle Developer > Remote Sensing/GIS Center of Expertise > Army Engineer Research & Development Center > Hanover, NH > (603) 646-4765 > michael.smith at erdc.usace.army.mil > From BEN at SYNCERA-ITSOLUTIONS.NL Mon Apr 25 08:44:24 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Mon, 25 Apr 2005 17:44:24 +0200 Subject: LAYERS parameter on WMS GetFeatureInfo Message-ID: I don't think so, it is required if you read the spec, so in my opinion ArcGIS is in the wrong. Only version and request may be omitted. From jms4 at PO.CWRU.EDU Mon Apr 25 08:50:38 2005 From: jms4 at PO.CWRU.EDU (James Sohr) Date: Mon, 25 Apr 2005 10:50:38 -0500 Subject: Path-following labels function (MapScript) Message-ID: As part of a larger project to help implement a high-quality labeling system for MapServer, I've written an alpha-level Mapscript function, label_layer_wpft(), which will draw path-following text labels, returning it as a GD true color image which you can then overlay onto your map image. Here are some sample images of it in action: The good: http://img171.echo.cx/img171/7012/good13fx.gif http://img191.echo.cx/img191/8636/good21nf.gif The bad: http://img152.echo.cx/img152/4066/bad0yq.gif And the ugly: http://img152.echo.cx/img152/2049/ugly3uq.gif To use the function, include it in your main mapscript routine. The format for it's use is as follows: $mylabelimage = label_layer_wpft( MAP, LAYER_NAME, LABEL_FORMAT); where MAP is a map object, LAYER_NAME is a string containing the name of the layer you wish to label, and LABEL_FORMAT is a string containing the format of the label (similiar to the TEXTITEM field in a map file). For instance, to create a label image for a layer called "anno_roads", with labels comprised of the street name (STNAME) and street type (STTYPE) fields, use: $road_labels = label_layer_wpft($map, "anno_roads", "[STNAME] [STTYPE]"); You can then overlay this image onto your map image using the appropriate GD functions. It creates labels for a single layer by performing a query for the current map extent against that layer, and then comparing each result to each class within the layer. It then uses each class's label attributes (such as font, font size, and color) to draw the path-following label. To optimize labeling, the function will automatically combine features with common endpoints and common labels into a single feature. Currently, there are quite a few limiations with this function: First of all, it only recongizes classes within a layer using the CLASSITEM feature only (i.e. each expression must be a regular epxression which is compared to the CLASSITEM). It only uses the class label's font, font size, and font color attributes -- it ignores all of the other label attributes (such as position, background color, border color, antialias, buffer, etc.) The function only does a rudimentary check to see if the label will fit on the feature. Currently, the label is automatically centered along the feature's length, and no collision detection is done with other labels. The font name used in the labeling does not use the map's font file-- hence the font name used for each class must be the actual true-type font filename (without the .ttf). For instance, to label with the font arial bold, use "FONT arialbd" in your map file. Like I said, the function is pretty basic so far... but I plan to make a lot of improvements as time allows. If you make any improvements you'd like to share, or have any questions about the function or how to use it, feel free to let me know. Without further adieu, here are the functions: /////////////////////////////////////////////////////////////// // // function label_layer_wpft() // // Draws path following text labels for a given layer. // function label_layer_wpft($map, $layername,$text){ $im = imagecreatetruecolor($map->width, $map->height); $scale=1; $layer=$map->getLayerByName($layername); $rect=$map->extent; $layer->set(template,"dummy"); $void=@$layer->queryByRect( $rect); $mystring=$text; $f=0; while(preg_match("/\[/", $mystring) > 0){ if (strpos($mystring,"[")> 0){ $text_array[$f]=substr($mystring,0,strpos($mystring,"[")); $mystring=substr($mystring,strpos($mystring,"[")); $f++; } $g=strpos($mystring,"]"); $text_array[$f]=substr($mystring,0, $g + 1); $f++; $mystring=substr($mystring,$g + 1); } $text_array[$f]=$mystring; $layer->open(); $uroads = 0; for ($i=0;$i<$layer->numclasses;$i++){ $class = $layer->getclass($i); $label = $class->label; $label->set(minfeaturesize,99999999); } for ($g=0;$g<$layer->getNumResults();$g++) { $result = $layer->getResult($g); $feature = $layer->getShape(-1,$result->shapeindex); $classvalue = $feature->values[$layer->classitem]; $sname = $feature->values["FENAME"]; for ($i=0;$i<$layer->numclasses;$i++){ $class = $layer->getclass($i); $label = $class->label; if (preg_match($class->getExpression(), $classvalue) || $class- >getExpression() == '') { $textlabel = ""; for ($z=0;$zvalues[substr ($text_array[$z], 1, strlen($text_array[$z])-2)]; } else { $textlabel = $textlabel.$text_array[$z]; } } for ($h=0;$h< $feature->numlines;$h++){ $line = $feature->line($h); $line->project(ms_newprojectionobj($layer->getProjection ()),ms_newprojectionobj($map->getProjection())); $myx=array(); $myy=array(); for ($j=0; $j< $line->numpoints;$j++){ $point = $line->point($j); $px = ($point->x - $rect->minx) / ($rect->maxx - $rect->minx) * $map- >width / $scale; $py = $map->height / $scale - ($point->y - $rect->miny) / ($rect- >maxy - $rect->miny) * $map->height / $scale ; $myx[$j]=$px; $myy[$j]=$py; } $fnode = (int)($myx[0])."-".(int)($myy[0]); $tnode = (int)$myx[count($myx)-1]."-".(int)($myy[count($myx)-1]); $fename = $textlabel; $xarray = $myx; $yarray = $myy; for ($m=0;$m<$uroads; $m++) { // Coallate features with matching endpoints and labels if ($tnode == $FNODES[$m] && $fename == $FENAMES[$m]) { $tnode = $TNODES[$m]; $xarray = array_merge($xarray, $XARRAYS[$m]); $yarray = array_merge($yarray, $YARRAYS[$m]); $FNODES = array_trim($FNODES, $m); $FENAMES = array_trim($FENAMES, $m); $TNODES = array_trim($TNODES, $m); $XARRAYS = array_trim($XARRAYS, $m); $YARRAYS = array_trim($YARRAYS, $m); $FNARRAYS= array_trim($FNARRAYS, $m); $FSARRAYS = array_trim($FSARRAYS, $m); $FCARRAYS = array_trim($FCARRAYS, $m); $uroads = $uroads - 1; } if ($fnode == $TNODES[$m] && $fename == $FENAMES[$m]) { $fnode = $FNODES[$m]; $xarray = array_merge($XARRAYS[$m], $xarray); $yarray = array_merge($YARRAYS[$m], $yarray); $FNODES = array_trim($FNODES, $m); $FENAMES = array_trim($FENAMES, $m); $TNODES = array_trim($TNODES, $m); $XARRAYS = array_trim($XARRAYS, $m); $YARRAYS = array_trim($YARRAYS, $m); $FNARRAYS= array_trim($FNARRAYS, $m); $FSARRAYS = array_trim($FSARRAYS, $m); $FCARRAYS = array_trim($FCARRAYS, $m); $uroads = $uroads - 1; } if ($fnode == $FNODES[$m] && $fename == $FENAMES[$m]) { $fnode = $tnode; $tnode = $TNODES[$m]; $xarray = array_merge( array_reverse($xarray), $XARRAYS[$m]); $yarray = array_merge( array_reverse($yarray),$YARRAYS[$m]); $FNODES = array_trim($FNODES, $m); $FENAMES = array_trim($FENAMES, $m); $TNODES = array_trim($TNODES, $m); $XARRAYS = array_trim($XARRAYS, $m); $YARRAYS = array_trim($YARRAYS, $m); $FNARRAYS= array_trim($FNARRAYS, $m); $FSARRAYS = array_trim($FSARRAYS, $m); $FCARRAYS = array_trim($FCARRAYS, $m); $uroads = $uroads - 1; } if ($tnode == $TNODES[$m] && $fename == $FENAMES[$m]) { $tnode = $fnode; $fnode = $FNODES[$m]; $xarray = array_merge($XARRAYS[$m], array_reverse($xarray)); $yarray = array_merge($YARRAYS[$m], array_reverse($yarray)); $FNODES = array_trim($FNODES, $m); $FENAMES = array_trim($FENAMES, $m); $TNODES = array_trim($TNODES, $m); $XARRAYS = array_trim($XARRAYS, $m); $YARRAYS = array_trim($YARRAYS, $m); $FNARRAYS= array_trim($FNARRAYS, $m); $FSARRAYS = array_trim($FSARRAYS, $m); $FCARRAYS = array_trim($FCARRAYS, $m); $uroads = $uroads - 1; } } // Add the current entry to the list $TNODES[$uroads] = $tnode; $FNODES[$uroads] = $fnode; $XARRAYS[$uroads] = $xarray; $YARRAYS[$uroads] = $yarray; $FENAMES[$uroads] = $fename; $FNARRAYS[$uroads] = $label->font; $FSARRAYS[$uroads] = $label->size; $FCARRAYS[$uroads] = $label->color; $uroads++; } $i = $layer->numclasses; } } } for ($m=0;$m<$uroads;$m++){ label_path($im, $XARRAYS[$m], $YARRAYS[$m], $FNARRAYS[$m].".ttf", $FSARRAYS[$m] , $FCARRAYS[$m], $FENAMES[$m]); } return $im; } /////////////////////////////////////////////////////////////// // // function label_Path() // // Takes a single feature and path, and writes a label fitted to that path. // No collision detection is used, and only a rudimentary method is used to // determine whether it fits or not. // // using this function, all labels must be drawn as seperate annotation layers. // // the .map file should be configured to output as png for transparency. // /////////////////////////////////////////////////////////////// function label_path($im, $px, $py, $font, $fontsize, $color, $label){ $SMOOTH_LEVEL=2; // Sets number of "smoothing steps" for text angles $TEXT_SPACING=1.3; // Set spacing multiplier for text $imcolor = imagecolorallocate($im, $color->red,$color->green,$color->blue); $numpoints = count($px); // If line endpoint is horizontally before start point, reverse order // This helps prevent (but doesn't completely eliminate) upside down and backward labels if ($px[0] > $px[$numpoints - 1]){ $px = array_reverse($px); $py = array_reverse($py); } $pathlength=0; $textsz = imagettfbbox($fontsize, 0, $font, $label); $labelength = ($textsz[2] - $textsz[0]) * $TEXT_SPACING; for ($i=0;$i<$numpoints - 1;$i++){ $pathlength = $pathlength + sqrt( ($px[$i + 1] - $px[$i]) * ($px[$i + 1] - $px[$i]) + ($py[$i + 1] - $py[$i]) * ($py[$i + 1] - $py[$i])); } // If length of label exceeds length of path to draw on, doing nothing if ($labelength > $pathlength) { return; } $s= ($pathlength - $labelength)/2 - 10; // Start value $curlength = sqrt( ($px[1] - $px[0]) * ($px[1] - $px[0]) + ($py[1] - $py [0]) * ($py[1] - $py[0]) ); if ($px[0] == $px[1]){ if($py[0] < $py[1]) { $angle = 90;} else { $angle = -90;}} else { $angle = rad2deg(atan2(($py[1] - $py[0]),($px[1] - $px[0]))) ; } $i=0; $curp=0; $labelx=array(); $labely=array(); $angles=array(); while ($i < strlen($label) && $curp < $numpoints - 1) { if ( $s < $curlength ) { $textsz = imagettfbbox($fontsize, 0, $font, $label[$i]); $pcwid = $cwid; $cwid = $textsz[2] - $textsz[0]; $chgt = $textsz[5] - $textsz[1]; $labelx[$i] = $px[$curp] + ($px[$curp + 1] - $px[$curp]) * ($s / $curlength); $labely[$i] = $py[$curp] + ($py[$curp + 1] - $py[$curp]) * ($s / $curlength); $angles[$i] = $angle; $placement_ok = 1; for ($g=0; $g < $i; $g++){ if ( ($labelx[$i] - $labelx[$g]) * ($labelx[$i] - $labelx[$g]) + ($labely[$i] - $labely[$g]) * ($labely[$i] - $labely[$g]) < ($cwid * $cwid) ) { $placement_ok = 0; } } $angles[$i] = $angle; if ($placement_ok == 1){ $s = $s + $TEXT_SPACING * $cwid ; $i++; } else { $s = $s + 1; } } else { $curp++; if ($curp < $numpoints - 1 ){ $s = $s - $curlength; $curlength = sqrt( ($px[$curp + 1] - $px[$curp]) * ($px[$curp + 1] - $px[$curp]) + ($py[$curp + 1] - $py[$curp]) * ($py[$curp + 1] - $py [$curp]) ); if ($px[$curp] == $px[$curp + 1]){ if($py[$curp] < $py[$curp + 1]) { $angle = 90;} else { $angle = -90;}} else { $angle = rad2deg(atan2(($py[$curp + 1] - $py[$curp]),($px [$curp + 1] - $px[$curp]))) ; } } // END IF of $curp < $numpoints } // END ELSE } // END WHILE for ($i=0; $i<$SMOOTH_LEVEL;$i++){ $tangles=$angles; $angles[0]=(2 * $tangles[0] + $tangles[1]) / 3; $angles[strlen($label) - 1] = (2 * $tangles[strlen($label) - 1] + $tangles [strlen($label) - 2]) / 3; for ( $j=1; $j< strlen($label)-1;$j++){ $angles[$j] = ($tangles[$j - 1] + 2 * $tangles[$j] + $tangles[$j + 1]) / 4; } } for ( $i=0; $i< strlen($label);$i++){ imagettftext($im, $fontsize, -$angles[$i] , $labelx[$i] - 4 * sin (deg2rad($angles[$i])), $labely[$i] + 4 * cos(deg2rad($angles[$i])), $imcolor, $font, $label[$i]); } return; } /////////////////////////////////////////////////////////////////////////// //////// /////////////////////////////////////////////////////////////////////////// /////// function array_trim ( $array, $index ) { if ( is_array ( $array ) ) { unset ( $array[$index] ); array_unshift ( $array, array_shift ( $array ) ); return $array; } else { return false; } } From gireddy at GMAIL.COM Mon Apr 25 09:55:21 2005 From: gireddy at GMAIL.COM (Shashi Gireddy) Date: Mon, 25 Apr 2005 11:55:21 -0500 Subject: Label Isse In-Reply-To: Message-ID: here is a sample mapscript code... // create new class object $pop_undr_1500 = ms_newClassObj($layer); $pop_undr_1500->set(status, MS_ON); $pop_undr_1500->set(name, "POP2000 < 1500"); $pop_undr_1500->setexpression('([POP2000]< 1500)'); // create style $style = ms_newStyleObj($pop_undr_1500); $style->color->setRGB(255, 185, 15); $style->outlinecolor->setRGB(0, 0, 0); //let label properties $pop_undr_1500->label->set(type, MS_BITMAP); $pop_undr_1500->label->color->setRGB(255, 10 ,10); $pop_undr_1500->label->set(size, MS_LARGE); $pop_undr_1500->label->set(offsetx, 10); $pop_undr_1500->label->set(offsety, 10); Hope this helps you, see label object for more attributes. shashi. On 4/25/05, Michael wrote: > Hello, > I'm new to MapServer. My question is how to access each label by Mapscript so > that I could format the text before it dispaly ? e.g. fix the decimal places. > > Thanks > > Michael > -- Shashi Kiran Reddy. Gireddy, Graduate Assistant, CBER, University of Alabama. http://www.cs.ua.edu/shashi Home: 205-752-5137 Cell: 205-657-1438 From covariance at SHAW.CA Mon Apr 25 10:11:07 2005 From: covariance at SHAW.CA (Bob Bruce) Date: Mon, 25 Apr 2005 12:11:07 -0500 Subject: Compiling MapScript.dll for C# (SWIG) Message-ID: On Thu, 17 Feb 2005 10:09:48 +0100, Morten Nielsen wrote: >I'm trying to compile the mapscript.dll using SWIG, and have a problem >during linking. Compiling generates three compile warnings, which prevents >the linker from linking the obj-files. Does anyone have an idea for a >workaround or know how to resolve this? > > > >Regards >/Morten Nielsen >www.dotnetgis.net > >------------------------------------------------------------------------ >---------------------------------- > >C:\GIS\Mapserver\4.4.1\source\mapscript\csharp>nmake /f makefile.vc > >Microsoft (R) Program Maintenance Utility Version 7.10.3077 Copyright (C) >Microsoft Corporation. All rights reserved. > >c:/GIS/Mapserver/SWIG-1.3.24/swig -csharp -o mapscript_wrap.c ../mapscript.i >cl /nologo /Zi /W3 /DDEBUG -DWIN32 -D_WIN32 >-Ic:/GIS/Mapserver/RequiredLibraries/gdwin32 >-Ic:\GIS\Mapserver\RequiredLibraries\proj-4.4.9/src >-Ic:\GIS\Mapserver\RequiredLibraries\regex-0.12 -DHAVE_STRING_H >-DREGEX_MALLOC -DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRLCAT >-DWIN32 -D_WIN32 -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_GD_PNG -DUSE_GD_JPEG >-DUSE_GD_WBMP -DUSE_GD_GIF -DGD_HAS_GDIMAGEGIFPTR -DUSE_GD_FT >-DGD_HAS_GETBITMAPFONT -DUSE_WMS_SVR -D IGNORE_MISSING_DATA >-DENABLE_STDERR_DEBUG -DUSE_GD_ANTIALIAS -I../.. >/DCOMPILE_DL=1 /c mapscript_wrap.c /Fomapscript_wrap.obj mapscript_wrap.c >mapscript_wrap.c(766) : warning C4013: 'msSLDApplySLD' undefined; assuming >extern returning int >mapscript_wrap.c(769) : warning C4013: 'msSLDApplySLDURL' undefined; >assuming extern returning int >mapscript_wrap.c(772) : warning C4013: 'msSLDGenerateSLD' undefined; >assuming extern returning int > >link /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libcd /dll /debug /out:mapscript.dll >mapscript_wrap.obj ../../mapserver_i.lib c:/GIS/Mapserver/RequiredLibraries >/gdwin32/bgd.lib >c:\GIS\Mapserver\RequiredLibraries\proj-4.4.9/src/proj_i.lib > >Microsoft (R) Incremental Linker Version 7.10.3077 Copyright (C) Microsoft >Corporation. All rights reserved. > >Creating library mapscript.lib and object mapscript.expmapscript_wrap.obj : >error LNK2019: unresolved external symbol _msSLDApplySLD referenced in >function _layerObj_applySLD mapscript_wrap.obj : error LNK2019: unresolved >external symbol _msSLDApplySLDURL referenced in function >_layerObj_applySLDURL mapscript_wrap.obj : error LNK2019: unresolved >external symbol _msSLDGenerateSLD referenced in function >_layerObj_generateSLD mapscript.dll : fatal error LNK1120: 3 unresolved >externals NMAKE : fatal error U1077: 'link' : return code '0x460' >Stop. Hi Morten: I am trying to build PHP MapScript and am getting the same errors. Have you managed to solve this problem? Could you let us know what you have done on this problem? thanks, Bob Bruce, Winnipeg, Manitoba From carloseduardo at COSTARRICENSE.CR Mon Apr 25 09:24:59 2005 From: carloseduardo at COSTARRICENSE.CR (Carlos Eduardo Sibaja Salazar) Date: Mon, 25 Apr 2005 10:24:59 -0600 Subject: To Remy Baud, about print option.!! Message-ID: Hi Remy. Thanks for the help about de print option. Your code looks very well but i have some problems to make it work. I added a print button in my application that opens the printmap.php file, and the code in the other file was added in my gmap.inc.php file. But nothing happend when i click the 'Imprimer' button in the new window. What is supposed to happend? I installed pdflib and a pdf table appears when i execute phpinfo(). I supposed that it means that pdflib is working fine. Probably i need a little explanation of how the code works. What happend when i click the print button in my application and what happend when i click the Imprimer button in the new window. I edited some lines in the checkprint() function but i need to know if i have to edit something else. Thanks again for your help, and i'll be waiting your response. _______________________________________ Yo me registr? en www.costarricense.cr From Ken.Tanaka at NOAA.GOV Mon Apr 25 11:11:07 2005 From: Ken.Tanaka at NOAA.GOV (Ken Tanaka) Date: Mon, 25 Apr 2005 12:11:07 -0600 Subject: global mapping issues with orthographic projection In-Reply-To: <931f8ea9050423075479c4795c@mail.gmail.com> Message-ID: Frank and Sean, Thanks for the prompt replies. I'll let you know how things go in trying other projections and parameters. I'm actually one step removed from the problem--I am assisting someone else on our development team. The projection is a little off, when we set the lat_0 and the lon_0 to 0 and -75 respectively (as that is basically GOES EAST's subsatellite point and i think this is where the orthographic projection for that satellite should be generated from) we get no map at all or any errors. Frank Warmerdam wrote: >On 4/22/05, Ken Tanaka wrote: > > >>At the moment we are having some troubles with a "starburst" of stray >>feature lines that can be seen in this URL: >> >>http://gdsg.ngdc.noaa.gov/starburst/ >> >> > >Ken, > >I don't *think* you are running into any of the traditional MMS world mapping >issues yet. > > > ... >>Our current approach is to generate the lines with MMS, and then use a >>separate step to merge the data (satellite image) with the outlines image, >>and produce the composite image seen in the above URL. >> >> > >Is there a reason you don't have MapServer taking care of the image data >as well? > > I think having MapServer handle the image data would be a good approach as well. We are currently trying MapServer out by replacing older software in an existing system. I'll need to find out why the merging is done separately, there may be a performance issue there. Thanks, Ken -- = Enterprise Data Services Division =============== | CIRES, National Geophysical Data Center / NOAA | | 303-497-6221 | = Ken.Tanaka(@)noaa.gov =========================== From dylan at IICI.NO-IP.ORG Mon Apr 25 11:19:04 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Mon, 25 Apr 2005 11:19:04 -0700 Subject: [Gdal-dev] strange shapefile DBF error [fixed] In-Reply-To: <200504221708.59702.dylan@iici.no-ip.org> Message-ID: sorry for the false alarm - a re-compile without some CFLAGS resulted in a working GDAL installation. Dylan On Friday 22 April 2005 05:08 pm, Dylan Beaudette wrote: > Greetings, > > recently installed gdal-1.2.6 and mapserver-4.4.2 on a slackware 10 box. > > trying to access a simple shapefile with ogrinfo yields an 'illegal > instruction' after only 1 record in the shapefile has been processed. > > i know that this shapefile is in working order. > > trying to re-create this shapefile (it is a tile index for mapserver) seems > to fail as well... > > ---------------------- > tile4ms list test > Aborted. Unable to open DBF:o34115d1ne.tif > Processed 0 of 1 files > ---------------------- > > here is the output from ogrinfo; > > ------------------------------ > ogrinfo -al doqq_index.shp > INFO: Open of `doqq_index.shp' > using driver `ESRI Shapefile' successful. > > Layer name: doqq_index > Geometry: Polygon > Feature Count: 312 > Extent: (-2527391.972465, -374934.820857) - (-2007497.075791, > 174428.925500) Layer SRS WKT: > PROJCS["North_America_Albers_Equal_Area_Conic", > GEOGCS["GCS_North_American_1983", > DATUM["North_American_Datum_1983", > SPHEROID["GRS_1980",6378137.0,298.257222101]], > PRIMEM["Greenwich",0.0], > UNIT["Degree",0.0174532925199433]], > PROJECTION["Albers_Conic_Equal_Area"], > PARAMETER["False_Easting",0.0], > PARAMETER["False_Northing",0.0], > PARAMETER["longitude_of_center",-96.0], > PARAMETER["Standard_Parallel_1",20.0], > PARAMETER["Standard_Parallel_2",60.0], > PARAMETER["latitude_of_center",40.0], > UNIT["Meter",1.0]] > location: String (255.0) > OGRFeature(doqq_index):0 > location (String) = o34115d1ne.tif > Illegal instruction > ^^^^^^^^^^^^^^^^ > ---------------------------------------- > > and here are my compile-time options for gdal: > > ------------------- > export CHOST="i686-pc-linux-gnu" > export CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" > export CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" > > ./configure --prefix=/usr --with-png=internal --with-jpeg=internal \ > --with-gif=internal --with-libtiff=internal \ > --with-geotiff=internal --with-libz=internal\ > --without-pg --without-ogdi --with-python \ > --with-threads=yes > ------------------- > > any ideas.. ? could this be an issue that is due to some other library not > being present? > > thanks in advance! From covariance at SHAW.CA Mon Apr 25 14:44:01 2005 From: covariance at SHAW.CA (Bob Bruce) Date: Mon, 25 Apr 2005 16:44:01 -0500 Subject: Zooming and Centering Question: Second Run Message-ID: On Sun, 24 Apr 2005 23:01:06 -0400, Giridhar Manepalli wrote: >Hello All, >I am using php mapscript. I cannot get the image to center when I >click on the image and with some zooming factor. > >I am using image coordinates (not geographical coordinates) for zooming. > >1.)Can anyone think of possible reasons? I can provide with any >necessary information. > >2.) Also, how do I center the image based on my click without zooming? > >3.) Finally, does the extent of the map automatically changed by >mapscript, when I zoom? > >I hope, i can get this resolved! > >Thanks, >Giridhar > > >Hello All, >I tried to center the image based on a click when I zoom using >php/mapscript. For some reason, I am failing to do so. > >Is it because, the lat long I calculated using javascript is wrong? >but it almost matches with 'ArcIMS Author'.? > >Can anyone write the snippet of php/mapscript code that will zoom to >the point i click, provided I have the lat-long of the click? Also, >can you explain what the new extent will be? > >Thanks, >Giridhar Giridhar: here's a code snippet that I use for zooming in: } elseif($_POST['mode'] == "ZoomInAtPT" ) { $new_point = ms_newPointObj(); $new_point->setXY(floatval($_POST['mapimage_x']),floatval($_POST['mapimage_y'])); $map->zoomscale($mapscale/$mapScaleZoomFactor, $new_point, $map->width, $map->width, $mapRect, $maxmapRect); the post variables are the image coordinates of the mouse click. You should have those anyway and it shouldn't be necessary to convert them to Lat/Long. I get $mapscale using the statement: $mapscale = isset($_POST['mapscale']) ? floatval($_POST['mapscale']) : $maxscale; and I set the post value of mapscale using the following statements: // now set up some web page display values $currentscale = round($map->scale); $char_scale = number_format($currentscale); and this is my code to re-center the draw: } elseif($_POST['mode'] == "recenter" ) { $new_point = ms_newPointObj(); $new_point->setXY(floatval($_POST['mapimage_x']),floatval($_POST['mapimage_y'])); $map->zoomscale($mapscale, $new_point, $map->width, $map->width, $mapRect, $maxmapRect); (notice that I don't change the scale in this call) and this is the code to set the last two values of the above call: if(isset($_POST['mapextent'])) { $extents = explode("+",$_POST['mapextent']); $mapRect = ms_newRectObj(); $mapRect->setextent(floatval($extents[0]),floatval($extents[1]),floatval($extents[2]),floatval($extents[3])); $maxmapextent = $_POST['maxmapextent']; // save this for the hidden form variable } else { // set this for the hidden form variable using the values from the map file $maxmapextent = $map->extent->minx . "+" . $map->extent->miny . "+" . $map->extent->maxx . "+" . $map->extent->maxy; } if(isset($_POST['maxmapextent'])) { $maxextents = explode("+",$_POST['maxmapextent']); $maxmapRect = ms_newRectObj(); $maxmapRect->setextent(floatval($maxextents[0]),floatval($maxextents[1]),floatval($maxextents[2]),floatval($maxextents[3])); } hopefully there is enough here to get you going. Bob Bruce From arunoday_chatterjee at REDIFFMAIL.COM Mon Apr 25 15:16:18 2005 From: arunoday_chatterjee at REDIFFMAIL.COM (Arunoday Chatterjee) Date: Mon, 25 Apr 2005 17:16:18 -0500 Subject: Displaying selected zip code area based on selection Message-ID: I'd like to offer user a selction of zipcode (using a select box) and when the user selects one i'd like the map to move to the location of the zip code and display the same on the map. Basically plot user selection on the map or to put it move the map to the location user has selcted from an option on the select box. How do i achieve this, i've got the latitude and longitude of the zip code but how do i zoom to that location based on the selection. Do i need any more data or lat long will suffice. Any help. If some code snippet in PHP Mapscript is provided that'd be real good. Thanks. From dabner at OPTUSNET.COM.AU Mon Apr 25 16:30:13 2005 From: dabner at OPTUSNET.COM.AU (Nick Dabner) Date: Tue, 26 Apr 2005 09:30:13 +1000 Subject: Mac OS Tiger / Gcc4.0 support In-Reply-To: Message-ID: William K, Thinking of ordering a copy this week (bound to do it sooner or later), so should be able to do a test in the next fortnight. I am no unix expert, but at least it gets a run to identify any hurdles. Was hoping a list member might have been an ADC select member and can enlighten us this week. BTW - noticed the mac binary link directs to your old webpage. Perhaps the mapserver webmaster can update the link to your download pages? Nick On 26/04/2005, at 12:09 AM, William K wrote: > Not me yet. Or anyone else that can say - developers that have advance > copies of Tiger are probably under NDAs on how things work (tho > developers can probably update their software to work on Tiger, they > just can't say how). > > I'll probably be waiting a couple weeks to get and install Tiger, just > to see where everyone else has problems. Also depends on when I have > time next month - kinda busy. But I'll try to get a binary package as > soon as I can. Of course, if the current one works on Tiger, that's > less pressure, and good to know. > > GCC 3.3 vs 4.0 shouldn't be too hard - even now Apple has a way to > switch versions, so if there are major problems with 4.0 and MapServer, > one can just switch to 3.3 which works. > > If you have Tiger now, as a non-dev, you're lucky. I heard there was a > screwup at some online retailers and they shipped some early. I guess > those people that got it early wouldn't have an NDA problem. > > > On Apr 25, 2005, at 1:03 AM, Nick Dabner wrote: > >> Hi List, >> >> Wondering if anyone has attempted using mapserver on Mac OS Tiger? It >> is out in a few days, but I haven't seen any notes on using Mapserver >> with it. One of the main changes is gcc 4.0 as opposed to gcc 3.3, but >> there is likely more things under the hood. Any reason known why it >> wouldn't work? Using the panther binaries posted on this list earlier >> in the month, which work really well. >> >> regards, >> >> Nick >> >> > ----- > William Kyngesburye > http://www.kyngchaos.com/ > > "Mon Dieu! but they are all alike. Cheating, murdering, lying, > fighting, and all for things that the beasts of the jungle would not > deign to possess - money to purchase the effeminate pleasures of > weaklings. And yet withal bound down by silly customs that make them > slaves to their unhappy lot while firm in the belief that they be the > lords of creation enjoying the only real pleasures of existence.... > > - the wisdom of Tarzan > From dabner at OPTUSNET.COM.AU Mon Apr 25 16:32:30 2005 From: dabner at OPTUSNET.COM.AU (Nick Dabner) Date: Tue, 26 Apr 2005 09:32:30 +1000 Subject: Zooming to match a raster scale In-Reply-To: <4BF377919225F449BB097CB76FFE9BC8188382@ptolemy.topozone.com> Message-ID: Ah, yes. I see. Shame I can't specify I want 2.59 metres per pixel rather than xpixels and ypixels. This would allow conversion of a folder of various sizes images to a consistent scale. Cheers, Nick On 25/04/2005, at 11:15 PM, Ed McNierney wrote: > Nick - > ? > Gdalwarp "warps" an image from one representation to another.? That > can be a change in projection, or a change in spatial resolution, or > both (or neither, I suppose ).? I wasn't specifically talking about > creating pyramids, although that is another option you should > investigate. > ? > ???? - Ed > ? > > Ed McNierney > President and Chief Mapmaker > TopoZone.com / Maps a la carte, Inc. > 73 Princeton Street, Suite 305 > North Chelmsford, MA? 01863 > ed at topozone.com > (978) 251-4242 > > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] > On Behalf Of Nick Dabner > Sent: Monday, April 25, 2005 1:58 AM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Zooming to match a raster scale > > Ed, > > Thanks for the quick response. Followed your workings and got what is > a near perfect match for another scale. In doing so, I can see how is > resolution is used, which was some explanation I hadn't found detailed > elsewhere. Kept it at 72 dpi. > > Yes, preview is slow, but the results are nice. Gdalwarp changes > projections if I am not mistaken. Do you mean gdal_translate to create > the raster pyramids? Will have to give this a try later today as my > rasters do vary, especially with inner-city areas. It loooks like I > would supply the output size in pixels (x,y) to get the the desired > scale. > > Definately info like this is helpful for us non-geo-versed. Need this > kind of info in the --verbose docs! > > Cheers, > > Nick > > On 25/04/2005, at 11:55 AM, Ed McNierney wrote: > >> Nick - >> I'm not sure what your "unit" is supposed to mean, but I can describe >> the process for taking the pixel size and finding the right >> MINSCALE/MAXSCALE values. >> The MINSCALE and MAXSCALE values are the denominators of scale >> ratios, like 1:10,000 scale.? MINSCALE 10000 means "a minimum scale >> of 1:10,000", where one meter on the map equals 10,000 meters on the >> ground.? The problem becomes, "what's one meter on the map"? >> The RESOLUTION statement answers that question.? The default value is >> 72, meaning that 72 pixels in a MapServer output image are presumed >> to occupy one inch on the screen.? This is actually unlikely to be an >> accurate value unless you're running a 20-year-old Macintosh, but it >> often doesn't matter?- it's mostly used for internal calculations. >> So, if 72 pixels are presumed to cover one inch on the screen, and >> your image has a source resolution of 1.26956817 meters per pixel, >> then one inch on the screen will show 72 * 1.26956817 meters or >> 91.40890824 meters of image.? Since 91.40890824 meters equals >> 3598.7687 inches, this means one inch on the screen shows 3598.7687 >> inches on the ground - a scale ratio of 1:3598.7687 >> If you displayed that image at the "scale" of 3598.7687 you should >> get a pixel-for-pixel replica of your source image.? If you use a >> different RESOLUTION statement, you need to adjust accordingly. >> For calculating the IMGEXT values, you simply need to make the X >> extent and Y extent equal the number of (X or Y) pixels in the image >> times 1.26956817. >> Yes, there are better-quality ways of resampling images, but - as you >> saw in Preview - they're slow.? MapServer doesn't use them, but you >> can use various tools (including gdalwarp, from the GDAL >> distribution) to resample images offline and create "pyramids" of >> varying resolutions.? This will improve the display quality of your >> images while keeping the performance fast - at the expense of extra >> disk space and preprocessing work. >> ??? - Ed >> >> Ed McNierney -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 6422 bytes Desc: not available URL: From dcmikkelsen at SHAW.CA Mon Apr 25 17:26:42 2005 From: dcmikkelsen at SHAW.CA (Dean C. Mikkelsen) Date: Mon, 25 Apr 2005 17:26:42 -0700 Subject: HPGN Datum? (fwd) In-Reply-To: Message-ID: Hi Bill, Have you applied the PROJECTION to the LAYER level on the .map file? What we are experiencing is the old NAD27/NAD83 problem. If PROJ.4 is installed correctly, with the NADCON files, there should be no problem. What does your .map file look like? Cheers, Dean Dean C. Mikkelsen,B.Sc.,P.Eng. Principal Consultant Terra ETL Ltd. - Consultants on GIS & Geodesy Vancouver, B.C., Canada Phone: 604-929-8630 E-mail: dcmikkelsen at shaw.ca -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Bill Binko Sent: April 25, 2005 8:35 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] HPGN Datum? (fwd) Once again forgot to cc the list: sorry ---------- Forwarded message ---------- Date: Mon, 25 Apr 2005 11:21:27 -0400 (EDT) From: Bill Binko To: Dean C. Mikkelsen Subject: RE: [UMN_MAPSERVER-USERS] HPGN Datum? On Sun, 24 Apr 2005, Dean C. Mikkelsen wrote: > > Hi Bill, > > Sure, feel free to post them to the board. I'll take a look. > > Cheers, > Dean > Here are the two projections that are giving me fits (from the shapefile .prj files). When I place them on the same map, they simply don't line up. From lukaslatz at YAHOO.COM Mon Apr 25 17:38:50 2005 From: lukaslatz at YAHOO.COM (Lukas Latz) Date: Mon, 25 Apr 2005 17:38:50 -0700 Subject: Java Mapscript In-Reply-To: 6667 Message-ID: Hi Bart, Thanks for those excellent pointers. Much appreciated! Best regards Lukas --- Bart van den Eijnden wrote: > Hi Lukas, > > Java Mapscript is one the SWIG (www.swig.org) ports of Mapscript. > > Some info is available from Umberto Nicoletti's site: > > http://www.unicolet.org/mapserver/compile.html > http://www.unicolet.org/mapserver/tomcat.html > > For examples or an API reference, your best bet is looking at: > > http://mapserver.gis.umn.edu/doc44/swigmapscript-reference.html > > or Sean Gillies' reference: > > http://zcologia.com/mapserver/mapscript > > Best regards, > Bart > > On Sun, 24 Apr 2005 04:14:05 -0700, Lukas Latz > wrote: > > > Hi list! > > > > I've worked with ESRI ArcIMS Java connector a lot and would be very > > interested in working with Mapserver in Java (server-side). > > > > Recently, I've seen several mentions of "Java Map Script" on this > list, > > and thought, --ooh, there seems to be a new version out that has a > Java > > API. > > > > However, I couldn't find much about Java Map Script on the > mapserver > > home page. > > > > Is there a place on the web that has some info about how to > > install(compile) and use Java Map Script? > > > > > > Cheers > > > > Lukas > > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > > > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From bill at BINKO.NET Mon Apr 25 19:40:23 2005 From: bill at BINKO.NET (Bill Binko) Date: Mon, 25 Apr 2005 22:40:23 -0400 Subject: HPGN Datum? (fwd) In-Reply-To: <000701c549f6$9eea60f0$0e7e5218@mikkedcoffice> Message-ID: On Mon, 25 Apr 2005, Dean C. Mikkelsen wrote: > Hi Bill, > > Have you applied the PROJECTION to the LAYER level on the .map file? I have, but I've been using the init=epsg instead of the actual parameters... > > What we are experiencing is the old NAD27/NAD83 problem. If PROJ.4 is > installed correctly, with the NADCON files, there should be no problem. > > What does your .map file look like? The relavent portions (I believe) are below. There are several layers of each projection (as well as some others). However, these two are the ones that I'm having trouble with. I'm beginning to wonder if that epsg:26759 really lines up with the parameters: perhaps I should put them in "by hand". Thanks Bill MAP ... UNITS METERS EXTENT -83.16 27.62 -81.81 28.18 PROJECTION "init=epsg:26759" END ... LAYER PROJECTION "init=epsg:26759" END NAME "AllParcels" TYPE POLYGON STATUS DEFAULT MAXSCALE 150000 DATA "Parcel_polygons_NAD27" CLASS NAME "Parcels" OUTLINECOLOR 150 150 150 COLOR 220 220 200 SYMBOL 0 END END LAYER NAME "Roads" TYPE LINE STATUS ON PROJECTION "+proj=aea" "+lat_1=24" "+lat_2=31.5" "+lat_0=24" "+lon_0=-84" "+x_0=400000" "+y_0=0" "+ellps=GRS80" "+datum=NAD83" "+units=m" "+no_defs" END DATA "tgrr0052" LABELITEM "FENAME" CLASS NAME "Roads" COLOR 200 200 200 SYMBOL 0 LABEL TYPE TRUETYPE ANGLE AUTO #ANTIALIAS true color 0 0 0 OUTLINECOLOR 255 255 255 FONT arial SIZE 10 MINFEATURESIZE 40 END END END END > > Cheers, > Dean > > > Dean C. Mikkelsen,B.Sc.,P.Eng. > Principal Consultant > Terra ETL Ltd. - Consultants on GIS & Geodesy > Vancouver, B.C., Canada > Phone: 604-929-8630 > E-mail: dcmikkelsen at shaw.ca > > > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On > Behalf Of Bill Binko > Sent: April 25, 2005 8:35 AM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] HPGN Datum? (fwd) > > Once again forgot to cc the list: sorry > > ---------- Forwarded message ---------- > Date: Mon, 25 Apr 2005 11:21:27 -0400 (EDT) > From: Bill Binko > To: Dean C. Mikkelsen > Subject: RE: [UMN_MAPSERVER-USERS] HPGN Datum? > > On Sun, 24 Apr 2005, Dean C. Mikkelsen wrote: > > > > Hi Bill, > > > > Sure, feel free to post them to the board. I'll take a look. > > > > Cheers, > > Dean > > > > Here are the two projections that are giving me fits (from the shapefile > .prj files). When I place them on the same map, they simply don't line > up. > > From FGDL (HARN projection): > > PROJCS["Albers Conical Equal Area (Florida Geographic Data Library)", > GEOGCS["GCS_North_American_1983_HARN",DATUM["D_North_American_1983_HARN" > , > SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0], > UNIT["Degree",0.0174532925199433]],PROJECTION["Albers"], > PARAMETER["False_Easting",400000.0],PARAMETER["False_Northing",0.0], > PARAMETER["Central_Meridian",-84.0],PARAMETER["Standard_Parallel_1",24.0 > ], > PARAMETER["Standard_Parallel_2",31.5],PARAMETER["Central_Parallel",24.0] > ,UNIT["Meter",1.0]] > > From the Pinellas County Data ("Florida West") which I've been using > epsg:26759: > > PROJCS["NAD27 Florida State Planes, Western Zone, US Foot", > GEOGCS["North_American_Datum_1927",DATUM["D_North_American_1927", > SPHEROID["Clarke - > 1866",6378206.4,294.9786982139006]],PRIMEM["Greenwich",0], > UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"], > PARAMETER["latitude_of_origin",24.3333333333333],PARAMETER["central_meri > dian",-82], > PARAMETER["scale_factor",0.9999411765],PARAMETER["false_easting",500000] > , > PARAMETER["false_northing",0],UNIT["Foot_US",0.3048006]] > > Thanks > Bill > > From bill at BINKO.NET Mon Apr 25 19:49:46 2005 From: bill at BINKO.NET (Bill Binko) Date: Mon, 25 Apr 2005 22:49:46 -0400 Subject: HPGN Datum? (fwd) In-Reply-To: Message-ID: On Mon, 25 Apr 2005, Bill Binko wrote: > On Mon, 25 Apr 2005, Dean C. Mikkelsen wrote: > > > Hi Bill, > > > > Have you applied the PROJECTION to the LAYER level on the .map file? > > I have, but I've been using the init=epsg instead of the actual > parameters... > > > > What we are experiencing is the old NAD27/NAD83 problem. If PROJ.4 is > > installed correctly, with the NADCON files, there should be no problem. > > > > What does your .map file look like? > > The relavent portions (I believe) are below. There are several layers of > each projection (as well as some others). However, these two are the ones > that I'm having trouble with. > > I'm beginning to wonder if that epsg:26759 really lines up with the > parameters: perhaps I should put them in "by hand". > After looking into this, I'm a bit concerned: the .prj file has a false easting of 500000, but the espg file from proj.4 has this: <26759> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs no_defs <> Shouldn't the false easting and the x_0 match up? Here's the .prj file: PROJCS["NAD27 Florida State Planes, Western Zone, US Foot", GEOGCS["North_American_Datum_1927",DATUM["D_North_American_1927", SPHEROID["Clarke - 1866",6378206.4,294.9786982139006]], PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",24.3333333333333], PARAMETER["central_meridian",-82], PARAMETER["scale_factor",0.9999411765], PARAMETER["false_easting",500000], PARAMETER["false_northing",0],UNIT["Foot_US",0.3048006]] Thanks again Bill From woklist at CHARTER.NET Mon Apr 25 19:55:46 2005 From: woklist at CHARTER.NET (William K) Date: Mon, 25 Apr 2005 21:55:46 -0500 Subject: Mac OS Tiger / Gcc4.0 support In-Reply-To: Message-ID: If you or someone is able (and brave enough) to test my current MapServer package on Tiger before I get to it, I'd like to hear about it. On Apr 25, 2005, at 6:30 PM, Nick Dabner wrote: > Thinking of ordering a copy this week (bound to do it sooner or later), > so should be able to do a test in the next fortnight. I am no unix > expert, but at least it gets a run to identify any hurdles. Was hoping So, your first message implied that you had tried my MapServer on Tiger, though it wasn't clear? I guess not, huh? Hopefully my boss will remember to order a copy this week. When I see my fav tools updated for Tiger, I'll be wrestling with the new cat. > BTW - noticed the mac binary link directs to your old webpage. Perhaps > the mapserver webmaster can update the link to your download pages? I'm waiting until I get more comfy in my new home. The old page will still be there (as long as I stay with my current ISP), it just redirects to the new domain. ----- William Kyngesburye http://www.kyngchaos.com/ "Those people who most want to rule people are, ipso-facto, those least suited to do it." - A rule of the universe, from the HitchHiker's Guide to the Galaxy From fwarmerdam at GMAIL.COM Mon Apr 25 20:00:54 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Mon, 25 Apr 2005 23:00:54 -0400 Subject: HPGN Datum? (fwd) In-Reply-To: Message-ID: On 4/25/05, Bill Binko wrote: > After looking into this, I'm a bit concerned: the .prj file has a false > easting of 500000, but the espg file from proj.4 has this: > > <26759> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 > +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 > +to_meter=0.3048006096012192 +no_defs no_defs <> > > Shouldn't the false easting and the x_0 match up? Bill, I believe that PROJ.4 +x_0 and +y_0 values are always in meters, while the WKT (.prj) file has the false easting and northing in the units of the projected coordinate systems .. feet in this case. In any event, if you error is on the order of 100m then the problem is likely not the false northing being off by 350000 (meters or feet). That level of error is mostly likely related to the datum shifting not being applied or possibly a mixup between different kinds of feet. I am doubtful it is related to HPGN since my understanding is that the difference between NAD83 and HPGN is small (less than 5 meters say), though I am not too sure about that part. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From ed at TOPOZONE.COM Mon Apr 25 20:20:30 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Mon, 25 Apr 2005 23:20:30 -0400 Subject: Zooming to match a raster scale Message-ID: Nick - gdalwarp lets you specify the desired output resolution with the -tr parameter, so you can say you want the output image to be 2.59 m/p. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com ________________________________ From: Nick Dabner [mailto:dabner at optusnet.com.au] Sent: Monday, April 25, 2005 7:33 PM To: Ed McNierney Cc: MAPSERVER-USERS at lists.umn.edu Subject: Re: [UMN_MAPSERVER-USERS] Zooming to match a raster scale Ah, yes. I see. Shame I can't specify I want 2.59 metres per pixel rather than xpixels and ypixels. This would allow conversion of a folder of various sizes images to a consistent scale. Cheers, Nick On 25/04/2005, at 11:15 PM, Ed McNierney wrote: Nick - Gdalwarp "warps" an image from one representation to another. That can be a change in projection, or a change in spatial resolution, or both (or neither, I suppose ). I wasn't specifically talking about creating pyramids, although that is another option you should investigate. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed at topozone.com (978) 251-4242 From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Nick Dabner Sent: Monday, April 25, 2005 1:58 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Zooming to match a raster scale Ed, Thanks for the quick response. Followed your workings and got what is a near perfect match for another scale. In doing so, I can see how is resolution is used, which was some explanation I hadn't found detailed elsewhere. Kept it at 72 dpi. Yes, preview is slow, but the results are nice. Gdalwarp changes projections if I am not mistaken. Do you mean gdal_translate to create the raster pyramids? Will have to give this a try later today as my rasters do vary, especially with inner-city areas. It loooks like I would supply the output size in pixels (x,y) to get the the desired scale. Definately info like this is helpful for us non-geo-versed. Need this kind of info in the --verbose docs! Cheers, Nick On 25/04/2005, at 11:55 AM, Ed McNierney wrote: Nick - I'm not sure what your "unit" is supposed to mean, but I can describe the process for taking the pixel size and finding the right MINSCALE/MAXSCALE values. The MINSCALE and MAXSCALE values are the denominators of scale ratios, like 1:10,000 scale. MINSCALE 10000 means "a minimum scale of 1:10,000", where one meter on the map equals 10,000 meters on the ground. The problem becomes, "what's one meter on the map"? The RESOLUTION statement answers that question. The default value is 72, meaning that 72 pixels in a MapServer output image are presumed to occupy one inch on the screen. This is actually unlikely to be an accurate value unless you're running a 20-year-old Macintosh, but it often doesn't matter - it's mostly used for internal calculations. So, if 72 pixels are presumed to cover one inch on the screen, and your image has a source resolution of 1.26956817 meters per pixel, then one inch on the screen will show 72 * 1.26956817 meters or 91.40890824 meters of image. Since 91.40890824 meters equals 3598.7687 inches, this means one inch on the screen shows 3598.7687 inches on the ground - a scale ratio of 1:3598.7687 If you displayed that image at the "scale" of 3598.7687 you should get a pixel-for-pixel replica of your source image. If you use a different RESOLUTION statement, you need to adjust accordingly. For calculating the IMGEXT values, you simply need to make the X extent and Y extent equal the number of (X or Y) pixels in the image times 1.26956817. Yes, there are better-quality ways of resampling images, but - as you saw in Preview - they're slow. MapServer doesn't use them, but you can use various tools (including gdalwarp, from the GDAL distribution) to resample images offline and create "pyramids" of varying resolutions. This will improve the display quality of your images while keeping the performance fast - at the expense of extra disk space and preprocessing work. - Ed Ed McNierney -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill at BINKO.NET Mon Apr 25 20:43:33 2005 From: bill at BINKO.NET (Bill Binko) Date: Mon, 25 Apr 2005 23:43:33 -0400 Subject: HPGN Datum? (fwd) In-Reply-To: <931f8ea905042520006a95d1c9@mail.gmail.com> Message-ID: On Mon, 25 Apr 2005, Frank Warmerdam wrote: > I believe that PROJ.4 +x_0 and +y_0 values are always in meters, > while the WKT (.prj) file has the false easting and northing in the > units of the projected coordinate systems .. feet in this case. Fair enough... > > In any event, if you error is on the order of 100m then the > problem is likely not the false northing being off by 350000 > (meters or feet). That level of error is mostly likely related to > the datum shifting not being applied or possibly a mixup between > different kinds of feet. I am doubtful it is related to HPGN since > my understanding is that the difference between NAD83 and HPGN > is small (less than 5 meters say), though I am not too sure about that > part. Ok, well, I'm putting a stripped down version of my mapfile below. It has only two layers: one in each of the two projections. I tried replacing the "init=espg:27659" with the actual contents of my /usr/share/proj/espg in both the MAP level and the LAYER level, but it came back very messed up! So I thought that perhaps I'm going at this wrong: I created these mapfiles before I had any clue and haven't come back to them in a while. Would you guys mind checking my setup on these? I'd send the data, but it's 49MB, and I'm not sure how to extract a subset without messing it up and/or removing the problem. I'd appreciate it. Bill MAP NAME BadProj STATUS ON SIZE 800 500 IMAGETYPE PNG SHAPEPATH "/var/www/binko.net/maps/data/" UNITS METERS #I found these by trial and error EXTENT 269734.497070 1356039.428711 276082.153320 1360006.713867 PROJECTION #the closed entry in the epsg file "init=epsg:26759" END WEB TEMPLATE "/var/www/binko.net/maps/template1.html" IMAGEPATH "/var/www/binko.net/maps/tmp/" IMAGEURL "/maps/tmp/" LOG "/var/www/binko.net/maps/error.log" END SCALEBAR STATUS ON STYLE 1 INTERVALS 4 SIZE 200 2 COLOR 0 0 0 OUTLINECOLOR 0 0 0 UNITS miles LABEL COLOR 0 0 0 SIZE small END END LAYER NAME "AllParcels" PROJECTION "init=epsg:26759" END TYPE POLYGON STATUS DEFAULT DATA "Parcel_polygons_NAD27" DEBUG on CLASS NAME "Parcels" OUTLINECOLOR 50 50 50 SYMBOL 0 END END LAYER NAME "Roads" TYPE LINE STATUS DEFAULT PROJECTION "+proj=aea" "+lat_1=24" "+lat_2=31.5" "+lat_0=24" "+lon_0=-84" "+x_0=400000" "+y_0=0" "+ellps=GRS80" "+datum=NAD83" "+units=m" "+no_defs" END DATA "tgrr0052" CLASS NAME "Roads" COLOR 200 0 0 SYMBOL 0 END END END From fwarmerdam at GMAIL.COM Mon Apr 25 20:50:48 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Mon, 25 Apr 2005 23:50:48 -0400 Subject: HPGN Datum? (fwd) In-Reply-To: Message-ID: On 4/25/05, Bill Binko wrote: > Ok, well, I'm putting a stripped down version of my mapfile below. It has > only two layers: one in each of the two projections. I tried replacing > the "init=espg:27659" with the actual contents of my /usr/share/proj/espg > in both the MAP level and the LAYER level, but it came back very messed > up! So I thought that perhaps I'm going at this wrong: I created these > mapfiles before I had any clue and haven't come back to them in a while. > Would you guys mind checking my setup on these? Bill, Your declarations look fine from what I know of your problem (I hadn't been following the discussion closely). But my guess is that the Roads layer is just not being converted back to NAD27 properly. Do you have the file /usr/local/share/proj/conus on your system? One way of testing would be to change the roads declaration to be NAD27 and see if that makes any difference. If there is no noticable effect, then it likely means that the datum shift file is not being found and applied. PROJECTION "+proj=aea" "+lat_1=24" "+lat_2=31.5" "+lat_0=24" "+lon_0=-84" "+x_0=400000" "+y_0=0" "+datum=NAD27" "+units=m" "+no_defs" END > I'd send the data, but it's 49MB, and I'm not sure how to extract a subset > without messing it up and/or removing the problem. If you still can't get things working, bundle stuff up and let me know where to grab it and I'll take a crack at the problem. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From elshayal at SMARTWEBONLINE.COM Mon Apr 25 22:19:19 2005 From: elshayal at SMARTWEBONLINE.COM (Mohamed Elshayal) Date: Tue, 26 Apr 2005 07:19:19 +0200 Subject: Fw: First Egyptian GIS Software Beta version is available now for free Message-ID: Download Now For Free Beta 1.1 Elshayal Smart Web On Line Software http://www.smartwebonline.com elshayal at smartwebonline.com Download Now For Free Beta 1.1 Concept / Idea EgyInfoGIS? package is an almost First Egyptian GIS software? which completely developed by Egyptian developers team ( Mohamed ElShayal & Fahima Abou ElGheit ) and independent of any commercial software package. The software is capable of developing GIS standalone applications that Create & Edit & Publish Shape and Data base files and works on PC ,or Internet Server , or on smart devices like PDAs, and pocket PCs. It is a new software that can work directly on the digital maps installed on the device or through a communication module and it can read from GPS recievers. It cantains of the following programes ?EgyGISEditor? for Editding and publishing Maps? , and ?EgyGISNet? for internet browsing maps?., and ?EgyGISMobile? for PDA browsing maps?. Thank you in advance Awaiting for your feedback Mohamed Elshayal. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Egypt.gif Type: image/gif Size: 30880 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: FirstGIS.gif Type: image/gif Size: 15433 bytes Desc: not available URL: From dcmikkelsen at SHAW.CA Mon Apr 25 22:33:35 2005 From: dcmikkelsen at SHAW.CA (Dean C. Mikkelsen) Date: Mon, 25 Apr 2005 22:33:35 -0700 Subject: HPGN Datum? (fwd) In-Reply-To: <931f8ea905042520502716f729@mail.gmail.com> Message-ID: Hi Frank and Bill, Frank you are on the right track I do believe. I will gladly take a look at it as well if you want someone to hit ideas back and forth with. HPGN and NAD83 are virtually equivalent for mapping purposes. Allow me to ask a dumb question. I'm pretty new to MapServer (just started playing with it this month - but have been doing geodesy consulting for 10+ years), but should the Layer (Roads) not have the values of NAD27, as that is what we want it converted to? Hence the map shows up in the same datum. The assumption here is that MapServer Mapscript reads the .prj file, which is defined in HPGN, but we want the data converted to NAD27 for this layer. Or does having the projection defined at the top take care of this and we have to define what the layer's datum is? Sorry if this sounded confusing, but it looks like a datum definition problem and the solution is finding out where it should be defined for a mixed datum dataset (two files w/different datum's) and whether the CONUS files (as Frank mentioned) are being read to do the conversion. Kind regards, Dean Dean C. Mikkelsen,B.Sc.,P.Eng. Principal Consultant Terra ETL Ltd. - Consultants on GIS & Geodesy Vancouver, B.C., Canada Phone: 604-929-8630 E-mail: dcmikkelsen at shaw.ca -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Frank Warmerdam Sent: April 25, 2005 8:51 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] HPGN Datum? (fwd) On 4/25/05, Bill Binko wrote: > Ok, well, I'm putting a stripped down version of my mapfile below. It has > only two layers: one in each of the two projections. I tried replacing > the "init=espg:27659" with the actual contents of my /usr/share/proj/espg > in both the MAP level and the LAYER level, but it came back very messed > up! So I thought that perhaps I'm going at this wrong: I created these > mapfiles before I had any clue and haven't come back to them in a while. > Would you guys mind checking my setup on these? Bill, Your declarations look fine from what I know of your problem (I hadn't been following the discussion closely). But my guess is that the Roads layer is just not being converted back to NAD27 properly. Do you have the file /usr/local/share/proj/conus on your system? One way of testing would be to change the roads declaration to be NAD27 and see if that makes any difference. If there is no noticable effect, then it likely means that the datum shift file is not being found and applied. PROJECTION "+proj=aea" "+lat_1=24" "+lat_2=31.5" "+lat_0=24" "+lon_0=-84" "+x_0=400000" "+y_0=0" "+datum=NAD27" "+units=m" "+no_defs" END > I'd send the data, but it's 49MB, and I'm not sure how to extract a subset > without messing it up and/or removing the problem. If you still can't get things working, bundle stuff up and let me know where to grab it and I'll take a crack at the problem. Best regards, -- ---------------------------------------+-------------------------------- ------ I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From dcmikkelsen at SHAW.CA Mon Apr 25 22:45:33 2005 From: dcmikkelsen at SHAW.CA (Dean C. Mikkelsen) Date: Mon, 25 Apr 2005 22:45:33 -0700 Subject: HPGN Datum? (fwd) In-Reply-To: <000a01c54a21$7e2b99d0$0e7e5218@mikkedcoffice> Message-ID: Hi Frank and Bill, I found this interesting thread, a similar problem. http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0307/msg00822.h tml It looks like the PROJECTION at the layer level has to have the datum defined for the file, while the PROJECTION for the whole .map file can be different, hence the transformation between NAD27/NAD83 can occur. MapServer cannot read from the .prj file according to the thread. I'd be leaning towards Frank's solution that the CONUS files are not being found. Let me know what happens. Kind regards, Dean -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Dean C. Mikkelsen Sent: April 25, 2005 10:34 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] HPGN Datum? (fwd) Hi Frank and Bill, Frank you are on the right track I do believe. I will gladly take a look at it as well if you want someone to hit ideas back and forth with. HPGN and NAD83 are virtually equivalent for mapping purposes. Allow me to ask a dumb question. I'm pretty new to MapServer (just started playing with it this month - but have been doing geodesy consulting for 10+ years), but should the Layer (Roads) not have the values of NAD27, as that is what we want it converted to? Hence the map shows up in the same datum. The assumption here is that MapServer Mapscript reads the .prj file, which is defined in HPGN, but we want the data converted to NAD27 for this layer. Or does having the projection defined at the top take care of this and we have to define what the layer's datum is? Sorry if this sounded confusing, but it looks like a datum definition problem and the solution is finding out where it should be defined for a mixed datum dataset (two files w/different datum's) and whether the CONUS files (as Frank mentioned) are being read to do the conversion. Kind regards, Dean Dean C. Mikkelsen,B.Sc.,P.Eng. Principal Consultant Terra ETL Ltd. - Consultants on GIS & Geodesy Vancouver, B.C., Canada Phone: 604-929-8630 E-mail: dcmikkelsen at shaw.ca -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Frank Warmerdam Sent: April 25, 2005 8:51 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] HPGN Datum? (fwd) On 4/25/05, Bill Binko wrote: > Ok, well, I'm putting a stripped down version of my mapfile below. It has > only two layers: one in each of the two projections. I tried replacing > the "init=espg:27659" with the actual contents of my /usr/share/proj/espg > in both the MAP level and the LAYER level, but it came back very messed > up! So I thought that perhaps I'm going at this wrong: I created these > mapfiles before I had any clue and haven't come back to them in a while. > Would you guys mind checking my setup on these? Bill, Your declarations look fine from what I know of your problem (I hadn't been following the discussion closely). But my guess is that the Roads layer is just not being converted back to NAD27 properly. Do you have the file /usr/local/share/proj/conus on your system? One way of testing would be to change the roads declaration to be NAD27 and see if that makes any difference. If there is no noticable effect, then it likely means that the datum shift file is not being found and applied. PROJECTION "+proj=aea" "+lat_1=24" "+lat_2=31.5" "+lat_0=24" "+lon_0=-84" "+x_0=400000" "+y_0=0" "+datum=NAD27" "+units=m" "+no_defs" END > I'd send the data, but it's 49MB, and I'm not sure how to extract a subset > without messing it up and/or removing the problem. If you still can't get things working, bundle stuff up and let me know where to grab it and I'll take a crack at the problem. Best regards, -- ---------------------------------------+-------------------------------- ------ I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From dpinte at ITAE.BE Mon Apr 25 23:22:48 2005 From: dpinte at ITAE.BE (Didrik Pinte) Date: Tue, 26 Apr 2005 08:22:48 +0200 Subject: HPGN Datum? (fwd) In-Reply-To: <931f8ea905042520006a95d1c9@mail.gmail.com> Message-ID: Le lundi 25 avril 2005 ? 23:00 -0400, Frank Warmerdam a ?crit : > In any event, if you error is on the order of 100m then the > problem is likely not the false northing being off by 350000 > (meters or feet). That level of error is mostly likely related to > the datum shifting not being applied or possibly a mixup between > different kinds of feet. I am doubtful it is related to HPGN since > my understanding is that the difference between NAD83 and HPGN > is small (less than 5 meters say), though I am not too sure about that > part. I did not follow all the thread but it seems I have the same problem here. I have a layer with rasters in epsg:27572 (France NTF II) and some GPS points in WGS84. The error in reprojection of the points to epsg:27572 is less than 100 meters. I really don't know how to solve this but there must be a solution. Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From Wolfgang.Qual at MUENCHEN.DE Tue Apr 26 00:07:41 2005 From: Wolfgang.Qual at MUENCHEN.DE (Wolfgang Qual) Date: Tue, 26 Apr 2005 09:07:41 +0200 Subject: How can I smoothen the (GIF)-output of the mapserver In-Reply-To: <16264e070504250804671fd86c@mail.gmail.com> Message-ID: Devinitively! If you could give some examples / how-to's I would be very glad. I am curious about it. Regards, Wolfgang Camden Daily schrieb: > I believe what you're looking for is antialiasing, in order to make > things like lines less pixelated. Antialiasing is available for text > and a few of the symbol types, but I had more luck taking the advise > of some on the listserve and using php/mapscript to actually draw the > maps at a larger scale and then letting php resample the image down to > the final size, antialiasing in the process. > > If you're interested in some of the details for that method, let me > know and I'll post some stuff. > > -Camden Daily > Prudential Preferred Properties > http://www.prupref.com > > On 4/25/05, Wolfgang Qual wrote: > >>Hello list, >>When I create a mapserver-map, I sometimes have the impression that the >>maps look quite square-edged. Especially, if the color contrast of >>certain themes is high (b/w.). That's the reason why I am looking for a >>way to smoothen the output-GIFs of the mapserver - just something like >>the blur-filtering in Photoshop or GIMP... >> >>Thanks, >> >>Wolfgang >> > > -- Wolfgang Qual Landeshauptstadt M?nchen Referat f?r Gesundheit und Umwelt RGU-UW 11 Sg. 1 Gesundheits- und Umweltberichterstattung, Energie und Klimaschutz Bayerstr. 28a, 80335 M?nchen Tel.: +49 (0)89 233-477 17 Fax.: +49 (0)89 233-477 05 E-Mail: wolfgang.qual at muenchen.de From dpinte at ITAE.BE Tue Apr 26 00:05:42 2005 From: dpinte at ITAE.BE (Didrik Pinte) Date: Tue, 26 Apr 2005 09:05:42 +0200 Subject: HPGN Datum? (fwd) In-Reply-To: <1114496568.11839.15.camel@geru-itea> Message-ID: Le mardi 26 avril 2005 ? 08:22 +0200, Didrik Pinte a ?crit : > Le lundi 25 avril 2005 ? 23:00 -0400, Frank Warmerdam a ?crit : > > In any event, if you error is on the order of 100m then the > > problem is likely not the false northing being off by 350000 > > (meters or feet). That level of error is mostly likely related to > > the datum shifting not being applied or possibly a mixup between > > different kinds of feet. I am doubtful it is related to HPGN since > > my understanding is that the difference between NAD83 and HPGN > > is small (less than 5 meters say), though I am not too sure about that > > part. > > I did not follow all the thread but it seems I have the same problem > here. > > I have a layer with rasters in epsg:27572 (France NTF II) and some GPS > points in WGS84. The error in reprojection of the points to epsg:27572 > is less than 100 meters. > > I really don't know how to solve this but there must be a solution. > > Didrik Here is the related .map file (without symbol definition and all the rasters) MAP IMAGETYPE PNG24 DEBUG ON EXTENT 347839 1.7954e+06 402109 1.83667e+06 IMAGECOLOR 255 255 255 SIZE 500 300 STATUS ON SHAPEPATH "/var/www/mapserver/maps" RESOLUTION 81.28 PROJECTION "init=epsg:27572" END OUTPUTFORMAT NAME png24 DRIVER "GD/PNG" MIMETYPE "image/png" IMAGEMODE PC256 EXTENSION "png" FORMATOPTION "INTERLACE=OFF" END WEB LOG "/tmp/mapserver.log" IMAGEPATH "/var/www/mapserver/tmp/" IMAGEURL "/tmp/" #Template file used for the base map TEMPLATE "templates/followap.html" #Header of the query window HEADER "templates/header.html" #Template used if nothing is found in the query EMPTY "../mapserver/templates/empty.html" END LAYER NAME "europe" DATA "shape/europe3.shp" STATUS DEFAULT TYPE POLYGON CLASS COLOR 255 255 255 OUTLINECOLOR 0 0 0 END PROJECTION "init=epsg:27572" END END LAYER NAME "Regions" DATA "shape/franceNTF_France2.shp" STATUS DEFAULT TYPE POLYGON CLASS COLOR 255 255 255 OUTLINECOLOR 0 0 0 END PROJECTION "init=epsg:27572" END END LAYER NAME "moved" CONNECTION "user=postgres password=***** dbname=test host=localhost port=5432" CONNECTIONTYPE postgis DATA "the_geom from gpsdata" STATUS ON TYPE POINT DEBUG ON TOLERANCE 5 TEMPLATE "templates/filling.html" CLASS NAME "Objet r?cemment d?plac?es" EXPRESSION ([moved] >= 1) COLOR 255 0 0 OUTLINECOLOR 255 0 0 SIZE 10 SYMBOL "circle" END CLASS NAME "Objet non d?plac?es" EXPRESSION ([moved] < 1) COLOR 0 255 0 OUTLINECOLOR 0 255 0 SIZE 10 SYMBOL "circle" END PROJECTION "init=epsg:4326" END END LAYER -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From dcmikkelsen at SHAW.CA Tue Apr 26 00:57:45 2005 From: dcmikkelsen at SHAW.CA (Dean C. Mikkelsen) Date: Tue, 26 Apr 2005 00:57:45 -0700 Subject: HPGN Datum? (fwd) In-Reply-To: <1114499142.11839.27.camel@geru-itea> Message-ID: Hi Didrik, In the epsg file, for NTF II, I get the following: # NTF (Paris) / France II # Unable to translate coordinate system into PROJ.4 format. I could not find your code 27572. Let me suggest a work-around. It may not be popular, but it should solve the problem for you. In the epsg file, add the following line of code: <27572> +proj=lcc +lat_0=18.000000000 +lon_0=-77.000000000 +k=0.99987742 +x_0=600000 +y_0=2200000 +ellps=clrk66 +towgs84=-168,-60,320,0,0,0,0 +units=m no_defs <> This should resolve the problem. Let me know what happens. Kind regards, Dean Dean C. Mikkelsen,B.Sc.,P.Eng. Principal Consultant Terra ETL Ltd. - Consultants on GIS & Geodesy Vancouver, B.C., Canada Phone: 604-929-8630 E-mail: dcmikkelsen at shaw.ca -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Didrik Pinte Sent: April 26, 2005 12:06 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] HPGN Datum? (fwd) Le mardi 26 avril 2005 ? 08:22 +0200, Didrik Pinte a ?crit : > Le lundi 25 avril 2005 ? 23:00 -0400, Frank Warmerdam a ?crit : > > In any event, if you error is on the order of 100m then the > > problem is likely not the false northing being off by 350000 > > (meters or feet). That level of error is mostly likely related to > > the datum shifting not being applied or possibly a mixup between > > different kinds of feet. I am doubtful it is related to HPGN since > > my understanding is that the difference between NAD83 and HPGN > > is small (less than 5 meters say), though I am not too sure about that > > part. > > I did not follow all the thread but it seems I have the same problem > here. > > I have a layer with rasters in epsg:27572 (France NTF II) and some GPS > points in WGS84. The error in reprojection of the points to epsg:27572 > is less than 100 meters. > > I really don't know how to solve this but there must be a solution. > > Didrik Here is the related .map file (without symbol definition and all the rasters) MAP IMAGETYPE PNG24 DEBUG ON EXTENT 347839 1.7954e+06 402109 1.83667e+06 IMAGECOLOR 255 255 255 SIZE 500 300 STATUS ON SHAPEPATH "/var/www/mapserver/maps" RESOLUTION 81.28 PROJECTION "init=epsg:27572" END OUTPUTFORMAT NAME png24 DRIVER "GD/PNG" MIMETYPE "image/png" IMAGEMODE PC256 EXTENSION "png" FORMATOPTION "INTERLACE=OFF" END WEB LOG "/tmp/mapserver.log" IMAGEPATH "/var/www/mapserver/tmp/" IMAGEURL "/tmp/" #Template file used for the base map TEMPLATE "templates/followap.html" #Header of the query window HEADER "templates/header.html" #Template used if nothing is found in the query EMPTY "../mapserver/templates/empty.html" END LAYER NAME "europe" DATA "shape/europe3.shp" STATUS DEFAULT TYPE POLYGON CLASS COLOR 255 255 255 OUTLINECOLOR 0 0 0 END PROJECTION "init=epsg:27572" END END LAYER NAME "Regions" DATA "shape/franceNTF_France2.shp" STATUS DEFAULT TYPE POLYGON CLASS COLOR 255 255 255 OUTLINECOLOR 0 0 0 END PROJECTION "init=epsg:27572" END END LAYER NAME "moved" CONNECTION "user=postgres password=***** dbname=test host=localhost port=5432" CONNECTIONTYPE postgis DATA "the_geom from gpsdata" STATUS ON TYPE POINT DEBUG ON TOLERANCE 5 TEMPLATE "templates/filling.html" CLASS NAME "Objet r?cemment d?plac?es" EXPRESSION ([moved] >= 1) COLOR 255 0 0 OUTLINECOLOR 255 0 0 SIZE 10 SYMBOL "circle" END CLASS NAME "Objet non d?plac?es" EXPRESSION ([moved] < 1) COLOR 0 255 0 OUTLINECOLOR 0 255 0 SIZE 10 SYMBOL "circle" END PROJECTION "init=epsg:4326" END END LAYER From dpinte at ITAE.BE Tue Apr 26 01:01:56 2005 From: dpinte at ITAE.BE (Didrik Pinte) Date: Tue, 26 Apr 2005 10:01:56 +0200 Subject: HPGN Datum? (fwd) In-Reply-To: <003f01c54a35$a18fdfd0$0e7e5218@mikkedcoffice> Message-ID: Le mardi 26 avril 2005 ? 00:57 -0700, Dean C. Mikkelsen a ?crit : > Hi Didrik, > > In the epsg file, for NTF II, I get the following: > > # NTF (Paris) / France II > # Unable to translate coordinate system into PROJ.4 format. > > I could not find your code 27572. > > Let me suggest a work-around. It may not be popular, but it should solve > the problem for you. > > In the epsg file, add the following line of code: > > <27572> +proj=lcc +lat_0=18.000000000 +lon_0=-77.000000000 +k=0.99987742 > +x_0=600000 +y_0=2200000 +ellps=clrk66 +towgs84=-168,-60,320,0,0,0,0 > +units=m no_defs <> > > This should resolve the problem. > > Let me know what happens. > > Kind regards, > Dean What version of proj do you use ? Here is the output of my /usr/share/proj/epsg file : # NTF (Paris) / Lambert zone II (corrected by DP : +pm=paris is wrong) <27572> +proj=lcc +lat_1=46.7999999999999997 +lat_0=46.7999999999999997 +lon_0=2.3372291666666669 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2000000002 +b=6356514.9999041939 +towgs84=-168,-60,320,0,0,0,0 +units=m +no_defs <> What is the difference with the parameters you propose ? Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From dcmikkelsen at SHAW.CA Tue Apr 26 01:12:41 2005 From: dcmikkelsen at SHAW.CA (Dean C. Mikkelsen) Date: Tue, 26 Apr 2005 01:12:41 -0700 Subject: HPGN Datum? (fwd) In-Reply-To: <1114502516.11839.31.camel@geru-itea> Message-ID: Hi Didrik, Try setting the pm (Prime Meridian) back to Paris. This projection was originally defined using Paris as the PM. Keep all the other values the same as you have....I'm checking my numbers on the values again. This projection is defined with Clarke 1880 (IGN), where Clarke's values for a and b using his 1865 ratio of 39.370432 inches per metre to convert axes to metres. I had a typo with CLRK66. Your axes definitions are correct. I will check what version of PROJ.4 I am using. Dean -----Original Message----- From: Didrik Pinte [mailto:dpinte at itae.be] Sent: April 26, 2005 1:02 AM To: Dean C. Mikkelsen Cc: MAPSERVER-USERS at LISTS.UMN.EDU Subject: RE: [UMN_MAPSERVER-USERS] HPGN Datum? (fwd) Le mardi 26 avril 2005 ? 00:57 -0700, Dean C. Mikkelsen a ?crit : > Hi Didrik, > > In the epsg file, for NTF II, I get the following: > > # NTF (Paris) / France II > # Unable to translate coordinate system into PROJ.4 format. > > I could not find your code 27572. > > Let me suggest a work-around. It may not be popular, but it should solve > the problem for you. > > In the epsg file, add the following line of code: > > <27572> +proj=lcc +lat_0=18.000000000 +lon_0=-77.000000000 +k=0.99987742 > +x_0=600000 +y_0=2200000 +ellps=clrk66 +towgs84=-168,-60,320,0,0,0,0 > +units=m no_defs <> > > This should resolve the problem. > > Let me know what happens. > > Kind regards, > Dean What version of proj do you use ? Here is the output of my /usr/share/proj/epsg file : # NTF (Paris) / Lambert zone II (corrected by DP : +pm=paris is wrong) <27572> +proj=lcc +lat_1=46.7999999999999997 +lat_0=46.7999999999999997 +lon_0=2.3372291666666669 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2000000002 +b=6356514.9999041939 +towgs84=-168,-60,320,0,0,0,0 +units=m +no_defs <> What is the difference with the parameters you propose ? Didrik From chaumic at NETVIGATOR.COM Tue Apr 26 01:31:03 2005 From: chaumic at NETVIGATOR.COM (Michael Chau) Date: Tue, 26 Apr 2005 08:31:03 +0000 Subject: =?utf-8?b?W1VNTl9NQVBTRVJWRVItVVNFUlNd?= Label Isse Message-ID: Dear Shashi, Thank you for your advise. If my label field is of float/ double type, could I format the text before it was displayed such as truncate the value to 3 decimal places, etc ? Cheers, Michael From dpinte at ITAE.BE Tue Apr 26 02:08:32 2005 From: dpinte at ITAE.BE (Didrik Pinte) Date: Tue, 26 Apr 2005 11:08:32 +0200 Subject: HPGN Datum? (fwd) Message-ID: > Hi Didrik, > Did it work with making Paris the PM? Hi, No it did not. When using the paris PM with the original coordinates, the points are 400 km on the right side of the original coordinates ... Do you think I have to update the epsg:27252 definition using the table you attached to the previous e-mail ? Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From dcmikkelsen at SHAW.CA Tue Apr 26 02:20:51 2005 From: dcmikkelsen at SHAW.CA (Dean C. Mikkelsen) Date: Tue, 26 Apr 2005 02:20:51 -0700 Subject: HPGN Datum? (fwd) In-Reply-To: <1114506512.23408.2.camel@geru-itea> Message-ID: Hi Didrik, I would say change the two parallels for the latitudes for NTF II, remove +lon_0 since we've set Paris as the PM, and then keep everything else the same. Dean -----Original Message----- From: Didrik Pinte [mailto:dpinte at itae.be] Sent: April 26, 2005 2:09 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Cc: Dean C. Mikkelsen Subject: RE: [UMN_MAPSERVER-USERS] HPGN Datum? (fwd) > Hi Didrik, > Did it work with making Paris the PM? Hi, No it did not. When using the paris PM with the original coordinates, the points are 400 km on the right side of the original coordinates ... Do you think I have to update the epsg:27252 definition using the table you attached to the previous e-mail ? Didrik From fanenji63 at LIBERO.IT Tue Apr 26 03:36:57 2005 From: fanenji63 at LIBERO.IT (Stefano Parodi) Date: Tue, 26 Apr 2005 05:36:57 -0500 Subject: configuring mapserver to output baseline jpeg Message-ID: Hi. I?m Stefano Parodi from Italy. I work for Datasiel S.p.a. and I develop WebGis applications for the Regional Government of ?Regione Liguria? (http://www.regione.liguria.it). I?m currently developing a propotype application using MapServer with Macromedia Flash all based upon OGC standard (WMS/WFS). The first step should be to develop a simple WMS client but I'm having problems: actually Flash support only standard baseline JPEG while Mapserver output is progressive JPEG. I'm using the MS4W package from DM solution version 1.0.1 How can I configure MapServer output to standard baseline JPEG? Thank you in advance Stefano From kristjan at TARKVARASTUUDIO.EE Tue Apr 26 04:02:06 2005 From: kristjan at TARKVARASTUUDIO.EE (Kristjan Annus) Date: Tue, 26 Apr 2005 14:02:06 +0300 Subject: configuring mapserver to output baseline jpeg In-Reply-To: Message-ID: Hi I had the same problem about a month ago and was helped by another Mapserver user Richard Duivanvoorde, I'll send you the output of his mail: OUTPUTFORMAT NAME jpeg MIMETYPE "image/jpeg" DRIVER "GD/JPEG" IMAGEMODE RGB FORMATOPTION "QUALITY=80" FORMATOPTION "INTERLACE=OFF" END (actually the line FORMATOPTION "INTERLACE=OFF") makes mapserver producing non-progressive aka non interlaced output which can be used in flash. Kristjan >Hi. > >I?m Stefano Parodi from Italy. >I work for Datasiel S.p.a. and I develop WebGis applications for the >Regional Government of ?Regione Liguria? (http://www.regione.liguria.it). >I?m currently developing a propotype application using MapServer with >Macromedia Flash all based upon OGC standard (WMS/WFS). > >The first step should be to develop a simple WMS client but I'm having >problems: actually Flash support only standard baseline JPEG while Mapserver >output is progressive JPEG. > >I'm using the MS4W package from DM solution version 1.0.1 > >How can I configure MapServer output to standard baseline JPEG? > >Thank you in advance > >Stefano > > From ferencik.ioan at PERSONAL.RO Tue Apr 26 04:14:54 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Tue, 26 Apr 2005 14:14:54 +0300 Subject: does raster layers have legend icon? Message-ID: _____________________________________________ Cinefil?Castiga o excursie la Venetia http://www.cineplus.ro/concurs From ferencik.ioan at PERSONAL.RO Tue Apr 26 04:17:29 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Tue, 26 Apr 2005 14:17:29 +0300 Subject: does raster layers have legend icon? Message-ID: I wonder if there is some way to create legend icon for raster layers from mapserver. Thanks _____________________________________________ Cinefil?Castiga o excursie la Venetia http://www.cineplus.ro/concurs From speiser.ferenc at FREEMAIL.HU Tue Apr 26 03:57:00 2005 From: speiser.ferenc at FREEMAIL.HU (Speiser Ferenc) Date: Tue, 26 Apr 2005 12:57:00 +0200 Subject: Virtual Data Source and wkbLineString In-Reply-To: Message-ID: Dear List, I try to get to work an ogrvrtDataSource layer in my Mapserver to show as a line-layer. Althogh the ogrinfo says of the ovf file it is a line geometry type file, but the rendered mapimage doesn't show anything of the line. ogrinfo -so -all measurement2.ovf ERROR 4: Update access not supported for VRT datasources. Had to open data source read-only. INFO: Open of `measurement2.ovf' using driver `VRT' successful. Layer name: mylayer Geometry: Line String Feature Count: 20 ERROR 1: SetAttributeFilter() not supported on ExecuteSQL() results. Extent: (562781.155556, 83754.050000) - (847169.890000, 305903.830000) Layer SRS WKT: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AXIS["Lat",NORTH], AXIS["Long",EAST], AUTHORITY["EPSG","4326"]] x: Real (0.0) y: Real (0.0) value: Real (0.0) desc: String (50.0) co2: Real (0.0) nox: Real (0.0) datum: String (19.0) Could you give me some example of having a line layer in my mapimage with the use of an ovf file? Thanks in advance! Feri Speiser Ferenc P?ter University of Veszpr?m Department of Automation Phone: (00 36) 88 624 888 > -----Original Message----- > From: L-Soft list server at University of Minnesota (1.8e) > [mailto:LISTSERV at lists.umn.edu] > Sent: Tuesday, April 26, 2005 11:25 AM > To: Ferenc Speiser > Subject: Command confirmation request (377B4C88) > > Your command: > > PW REP XXXXXXXX > > requires confirmation. To confirm the execution of your command, simply > point your browser to the following URL: > > http://lists.umn.edu/cgi-bin/wa?OK=377B4C88 > > Alternatively, if you have no WWW access, you can reply to the present > message and type "ok" (without the quotes) as the text of your message. > Just the word "ok" - do not retype the command. This procedure will work > with any mail program that fully conforms to the Internet standards for > electronic mail. If you receive an error message, try sending a new > message to LISTSERV at LISTS.UMN.EDU (without using the "reply" function - > this is very important) and type "ok 377B4C88" as the text of your > message. > > Finally, your command will be cancelled automatically if LISTSERV does > not receive your confirmation within 48h. After that time, you must start > over and resend the command to get a new confirmation code. If you change > your mind and decide that you do NOT want to confirm the command, simply > discard the present message and let the request expire on its own. > > ------------------------- Original mail header -------------------------- > [Request submitted through anonymous TCP/IP interface from 127.0.0.1] From Michael.Micallef at MTO.GOV.ON.CA Tue Apr 26 04:26:32 2005 From: Michael.Micallef at MTO.GOV.ON.CA (Micallef, Michael (MTO)) Date: Tue, 26 Apr 2005 07:26:32 -0400 Subject: Does map Lab Maplab 2.2 and SDE Message-ID: Does maplab 2.2 support SDE as included in the maplab_ms4w-2.2 install? If so, what does the layer reference look like? What all is required in adding an SDE layer to a map file? I have tried adding an SDE layer several times. I get an error message in Map Browser that SDE is not supported? Mike Micallef From dpinte at ITAE.BE Tue Apr 26 05:04:09 2005 From: dpinte at ITAE.BE (Didrik Pinte) Date: Tue, 26 Apr 2005 14:04:09 +0200 Subject: HPGN Datum? (fwd) In-Reply-To: <006b01c54a41$3d8d5790$0e7e5218@mikkedcoffice> Message-ID: Le mardi 26 avril 2005 ? 02:20 -0700, Dean C. Mikkelsen a ?crit : > Hi Didrik, > > I would say change the two parallels for the latitudes for NTF II, > remove +lon_0 since we've set Paris as the PM, and then keep everything > else the same. > > Dean Ok, I've tested the following : - removed +long_0 - changed +lat_1 and +lat_2 to the values (taking the lattitudes from "Parrall?les autom?coiques" on the table of your previous e-mail) That gives the same error, 15 meters on the right of the original points. Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From speiser.ferenc at FREEMAIL.HU Tue Apr 26 05:11:20 2005 From: speiser.ferenc at FREEMAIL.HU (Ferenc Speiser) Date: Tue, 26 Apr 2005 07:11:20 -0500 Subject: Virtual Data Source and wkbLineString Message-ID: Dear List, I try to get an ogrvrtDataSource layer work in my Mapserver to show as a line-layer. Althogh the ogrinfo says about the ovf file, it is a line geometry type file, but the rendered mapimage doesn't show the line. ogrinfo -so -all measurement2.ovf ERROR 4: Update access not supported for VRT datasources. Had to open data source read-only. INFO: Open of `measurement2.ovf' using driver `VRT' successful. Layer name: mylayer Geometry: Line String Feature Count: 20 ERROR 1: SetAttributeFilter() not supported on ExecuteSQL() results. Extent: (562781.155556, 83754.050000) - (847169.890000, 305903.830000) Layer SRS WKT: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AXIS["Lat",NORTH], AXIS["Long",EAST], AUTHORITY["EPSG","4326"]] x: Real (0.0) y: Real (0.0) value: Real (0.0) desc: String (50.0) co2: Real (0.0) nox: Real (0.0) datum: String (19.0) Could you give me some example of having a line layer in my mapimage with using an ovf file? Thanks in advance! Feri Speiser Ferenc P?ter University of Veszpr?m Department of Automation Phone: (00 36) 88 624 888 From robe.dnd at CITYOFBOSTON.GOV Tue Apr 26 05:42:14 2005 From: robe.dnd at CITYOFBOSTON.GOV (Obe, Regina DND\MIS) Date: Tue, 26 Apr 2005 08:42:14 -0400 Subject: Can ArcIMS 9.0 or any ArcGIS products consume WMS or WFS web ser vices? Message-ID: I found the below thread in the mapserv archives that stated this was not possible back then, but I was wondering if this is the same case with the ArcGIS 9.0 products. http://lists.umn.edu/cgi-bin/wa?A2=ind0409 &L=mapserver-users&P=R1058&I=-3 I was trying to test out my Mapserver WMS in ArcIMS or ArcMap. I looked at ArcIMS 9.0 and ArcMap and I couldn't figure out any way to use OGC WMS servers, it seemed to only accept ArcIMS services. I thrilled to see I could do it from MapInfo though simply by pointing at my WMS URL. Thanks, Regina -------------- next part -------------- An HTML attachment was scrubbed... URL: From adams at TERRESTRIS.DE Tue Apr 26 06:21:11 2005 From: adams at TERRESTRIS.DE (Till Adams) Date: Tue, 26 Apr 2005 15:21:11 +0200 Subject: Can ArcIMS 9.0 or any ArcGIS products consume WMS or WFS web ser vices? In-Reply-To: Message-ID: Obe, Regina DND\MIS wrote: > I found the below thread in the mapserv archives that stated this was > not possible back then, but I was wondering if this is the same case > with the ArcGIS 9.0 products. > > http://lists.umn.edu/cgi-bin/wa?A2=ind0409&L=mapserver-users&P=R1058&I=-3 > > > I was trying to test out my Mapserver WMS in ArcIMS or ArcMap. > > I looked at ArcIMS 9.0 and ArcMap and I couldn't figure out any way > to use OGC WMS servers, it seemed to only accept ArcIMS services. > I thrilled to see I could do it from MapInfo though simply by pointing > at my WMS URL. > > Thanks, > Regina Dear Regina, for ArcGIs 8.x you must get the ArcGIS-WMS extension (freeware) from Sicad (www.sicad.de). In ArcGIs v9 a lot of funcionality is missing, but you may load wms directly .... I never tried this ;-) Greetings, Till ****************************************** * AmeiN! ArcGIS Map-Export-2-UMN * * AmeiN! Workshop 11. Mai 2005 * * http://www.terrestris.de * ****************************************** ------------------------------------------ Dipl. Geogr. Till Adams terrestris, Paulsen&Adams GbR Siemensstr. 8 * 53121 Bonn Tel.: 0228 962 899 52 * Fax.: 0228 962 899 57 info at terrestris.de * www.terrestris.de From cdaily at GMAIL.COM Tue Apr 26 07:32:41 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Tue, 26 Apr 2005 09:32:41 -0500 Subject: How can I smoothen the (GIF)-output of the mapserver In-Reply-To: <426DE8BD.5050505@muenchen.de> Message-ID: After playing around with antialiasing a lot, I found that what worked best for me was to just use a function after I've configured my map that would use the php image handling functions to draw the image at a larger size and then scale it down to the original size, antialiasing as it went. I found in doing it that way, though, that the text would get a little blurred out. So I then decided to render my labels as a seperate image and just superimpose them over my antialiased map. The results have been quite good. First off, for image handling in php, you'll need to configure php --with-gd=/path/to/gd. It's important to make sure that the version of gd you configure it with is the same version as the one you compiled mapserver with. Also, just specifying --with-gd, and not including the path, will make php revert to using it's own bundled gd (probably not what you want). If you have problems with this step, search the archvies; there's been plenty of discussions about it. I wrote a function to call at the end of my mapscript like this: $image_url = antialias(2); where 2 is the scale factor. Increasing the scale makes the image look better, but also slows it down a bit. Here's the function. It should be relatively self-explanatory. I posted an older version of this function maybe a month back, but it's had some bug fixes since then. /////////////////////////////////////////////////////////////// // // function antialias() // // draws our map at a larger size, then samples it back down to provide // antialiasing. annotation layers and the scalebar are drawn seperately // and combined over the resulting image, so that they are not distroted. // // using this function, all labels must be drawn as seperate annotation layers. // // the .map file should be configured to output as png for transparency. // /////////////////////////////////////////////////////////////// function antialias($scale) { global $map, $root_directory; // get the dimensions of the image $image_width = $map->width; $image_height = $map->height; // scale the map up $map->set("width", $image_width * $scale); $map->set("height", $image_height * $scale); // turn off the scalebar if there is one $scalebar_present = false; $scalebar = $map->scalebar; if ($scalebar->status == MS_EMBED) { $scalebar->set("status", MS_OFF); $scalebar_present = true; } // loop through our layers, and if it's status is on, loop through the classes scaling the sizes $scaled_symbols = array(); for ($i=0; $i < $map->numlayers; $i++) { $layer = $map->getLayer($i); if ($layer->status == MS_ON AND $layer->type != MS_LAYER_ANNOTATION) { for ($j=0; $j < $layer->numclasses; $j++) { $class = $layer->getClass($j); for ($k=0; $k < $class->numstyles; $k++) { $style = $class->getStyle($k); // scale the size and offsets $style->set("size", $style->size * $scale); $style->set("offsetx", $style->offsetx * $scale); $style->set("offsety", $style->offsety * $scale); // for symbols with styles them, we need to scale those as well $symbol_id = $style->symbol; $symbol = $map->getsymbolobjectbyid($symbol_id); $already_scaled = false; reset($scaled_symbols); foreach ($scaled_symbols as $scaled) { if ($scaled == $symbol->name) { $already_scaled = true; } } if (!$already_scaled) { array_push($scaled_symbols, $symbol->name); $points = $scaled_points = $symbol->getstylearray(); if (count($points) > 1) { for ($l=0; $l < count($points); $l++) { $scaled_points[$l] = $points[$l] * $scale; } $symbol->setstyle($scaled_points); } } } } } } // loop through and turn off our annotation layers for now, keeping track of them $labels = array(); for ($i=0; $i < $map->numlayers; $i++) { $layer = $map->getLayer($i); if ($layer->type == MS_LAYER_ANNOTATION AND $layer->status == MS_ON) { array_push($labels, $layer); $layer->set("status", MS_OFF); } } // draw our image $image = $map->draw(); $image_url = $image->saveWebImage('MS_PNG', 1, 1, 0); // create our image objects $old = imagecreatefrompng($root_directory . $image_url); $new = imagecreatetruecolor($image_width, $image_height); // the background color gets dropped from our transparent pngs, so start by filling our new image with it $back_color = $map->imagecolor; $back_color = imagecolorallocate($new, $back_color->red, $back_color->green, $back_color->blue); imagefill($new, 0, 0, $back_color); // resample the image back down to the original size (antialiasing it) imagecopyresampled($new, $old, 0, 0, 0, 0, $image_width, $image_height, $image_width * $scale, $image_height * $scale); // scale the map down $map->set("width", $image_width); $map->set("height", $image_height); // flip off all layers on the map for ($i=0; $i < $map->numlayers; $i++) { $layer = $map->getLayer($i); $layer->set("status", MS_OFF); } // flip on those annotation layers we turned off earlier for ($i=0; $i < count($labels); $i++) { $labels[$i]->set("status", MS_ON); } // turn the scalebar back on if ($scalebar_present) { $scalebar->set("status", MS_EMBED); } // draw our image again, this time with just the annotations $label_image = $map->draw(); $label_url = $label_image->saveWebImage('MS_PNG', 1, 1, 0); // merge the text from our new image over the old one $old = imagecreatefrompng($root_directory . $label_url); imagecopyresampled($new, $old, 0, 0, 0, 0, $image_width, $image_height, $image_width, $image_height); // change our filename extention from .png to .jpg $image_url = substr($image_url, 0, -3) . "jpg"; // save our new image imagejpeg($new, $root_directory . $image_url); // free up memory imagedestroy($im); imagedestroy($new); // return the location of our new image return $image_url; } On 4/26/05, Wolfgang Qual wrote: > Devinitively! If you could give some examples / how-to's I would be very > glad. I am curious about it. > > Regards, > Wolfgang > > Camden Daily schrieb: > > > I believe what you're looking for is antialiasing, in order to make > > things like lines less pixelated. Antialiasing is available for text > > and a few of the symbol types, but I had more luck taking the advise > > of some on the listserve and using php/mapscript to actually draw the > > maps at a larger scale and then letting php resample the image down to > > the final size, antialiasing in the process. > > > > If you're interested in some of the details for that method, let me > > know and I'll post some stuff. > > > > -Camden Daily > > Prudential Preferred Properties > > http://www.prupref.com > > > > On 4/25/05, Wolfgang Qual wrote: > > > >>Hello list, > >>When I create a mapserver-map, I sometimes have the impression that the > >>maps look quite square-edged. Especially, if the color contrast of > >>certain themes is high (b/w.). That's the reason why I am looking for a > >>way to smoothen the output-GIFs of the mapserver - just something like > >>the blur-filtering in Photoshop or GIMP... > >> > >>Thanks, > >> > >>Wolfgang > >> > > > > > > -- > Wolfgang Qual > Landeshauptstadt M?nchen > Referat f?r Gesundheit und Umwelt > RGU-UW 11 > Sg. 1 Gesundheits- und Umweltberichterstattung, > Energie und Klimaschutz > Bayerstr. 28a, 80335 M?nchen > Tel.: +49 (0)89 233-477 17 > Fax.: +49 (0)89 233-477 05 > E-Mail: wolfgang.qual at muenchen.de > From osgis.lists at GMAIL.COM Tue Apr 26 07:37:33 2005 From: osgis.lists at GMAIL.COM (David Bitner) Date: Tue, 26 Apr 2005 09:37:33 -0500 Subject: Can ArcIMS 9.0 or any ArcGIS products consume WMS or WFS web ser vices? In-Reply-To: <426E4047.8070708@terrestris.de> Message-ID: In ArcGIS Version 9, WMS capabilities came with Service Pack 2. On 4/26/05, Till Adams wrote: > Obe, Regina DND\MIS wrote: > > > I found the below thread in the mapserv archives that stated this was > > not possible back then, but I was wondering if this is the same case > > with the ArcGIS 9.0 products. > > > > http://lists.umn.edu/cgi-bin/wa?A2=ind0409&L=mapserver-users&P=R1058&I=-3 > > > > > > I was trying to test out my Mapserver WMS in ArcIMS or ArcMap. > > > > I looked at ArcIMS 9.0 and ArcMap and I couldn't figure out any way > > to use OGC WMS servers, it seemed to only accept ArcIMS services. > > I thrilled to see I could do it from MapInfo though simply by pointing > > at my WMS URL. > > > > Thanks, > > Regina > > Dear Regina, > > for ArcGIs 8.x you must get the ArcGIS-WMS extension (freeware) from > Sicad (www.sicad.de). In ArcGIs v9 a lot of funcionality is missing, but > you may load wms directly .... I never tried this ;-) > > Greetings, Till > > ****************************************** > * AmeiN! ArcGIS Map-Export-2-UMN * > * AmeiN! Workshop 11. Mai 2005 * > * http://www.terrestris.de * > ****************************************** > > ------------------------------------------ > > Dipl. Geogr. Till Adams > terrestris, Paulsen&Adams GbR > Siemensstr. 8 * 53121 Bonn > Tel.: 0228 962 899 52 * Fax.: 0228 962 899 57 > info at terrestris.de * www.terrestris.de > From camrex at AMERITECH.NET Tue Apr 26 07:47:21 2005 From: camrex at AMERITECH.NET (Cameron Rex) Date: Tue, 26 Apr 2005 09:47:21 -0500 Subject: Mac OS Tiger / Gcc4.0 support Message-ID: I've already ordered Tiger and should be getting it before Friday (at least that is what the Apple Store is saying.) I will test out the binaries as soon as I can (probably the day I get it). I will report back with any problems I have. I've not tried the binaries yet in Panther, because I had already gone through with all the installation and had no reason to go back and redo it. Now I just have to wait for Tiger to get here. Cameron From pauljame at GMAIL.COM Tue Apr 26 08:13:39 2005 From: pauljame at GMAIL.COM (Paul james) Date: Tue, 26 Apr 2005 12:13:39 -0300 Subject: MULTILINESTRING distance with PostGis Message-ID: Hi all... How can I calculate a distance between first and last point of a MULTILINESTRING(POSTGIS), considering every point (if my multilinestring has 3 points (a b c), i need a distance a->b plus b->c. Any idea? Thank you... From fanenji63 at LIBERO.IT Tue Apr 26 08:55:32 2005 From: fanenji63 at LIBERO.IT (Stefano Parodi) Date: Tue, 26 Apr 2005 10:55:32 -0500 Subject: configuring mapserver to output baseline jpeg Message-ID: On Tue, 26 Apr 2005 14:02:06 +0300, Kristjan Annus wrote: >Hi > >I had the same problem about a month ago and was helped by another >Mapserver user Richard Duivanvoorde, I'll >send you the output of his mail: > >OUTPUTFORMAT >NAME jpeg >MIMETYPE "image/jpeg" >DRIVER "GD/JPEG" >IMAGEMODE RGB >FORMATOPTION "QUALITY=80" >FORMATOPTION "INTERLACE=OFF" >END > >(actually the line FORMATOPTION "INTERLACE=OFF") > >makes mapserver producing non-progressive aka non interlaced output >which can be used in flash. > >Kristjan > >>Hi. >> >>I?m Stefano Parodi from Italy. >>I work for Datasiel S.p.a. and I develop WebGis applications for the >>Regional Government of ?Regione Liguria? (http://www.regione.liguria.it). >>I?m currently developing a propotype application using MapServer with >>Macromedia Flash all based upon OGC standard (WMS/WFS). >> >>The first step should be to develop a simple WMS client but I'm having >>problems: actually Flash support only standard baseline JPEG while Mapserver >>output is progressive JPEG. >> >>I'm using the MS4W package from DM solution version 1.0.1 >> >>How can I configure MapServer output to standard baseline JPEG? >> >>Thank you in advance >> >>Stefano >> >> Now it's ok. Thank you very much. I'm just beginning this demo with MapServer and Flash and found it really promising. The first step will be the development of a simple WMS client (for the background layers), then I wish to add the vector data (via swf or xml) for the "interactive" layers (like POI, etc.). PS: I've seen your application at http://www.tartu.ee/bi_kaart/tarkvarastuudio.html Good Work! This really seam the way to go. Thank you again. Stefano. From caveeagle at POCHTAMT.RU Tue Apr 26 08:47:32 2005 From: caveeagle at POCHTAMT.RU (MAPSERVER-USERS Cave) Date: Tue, 26 Apr 2005 19:47:32 +0400 Subject: Shift of the map if the equirectangular projection is used Message-ID: If I draw the map in the equirectangular projection with Perl, the map shifts for about 10 minutes to the north. If I set the projection in a cgi-script, everything is displayed correctly. To draw the same map with the Perl API, I use this function: $map->setProjection("proj=eqc,lat_ts=63.495,lon_0=46.165"); Then I calculate extent with the command "proj": proj +proj=eqc +lat_ts=63.495 +lon_0=46.165 < 40.5 60.41 > 51.83 66.58 And get: -281432.71 6724810.44 281432.71 7411651.70 Set extent in my program: $map->setExtent('-281432.71','6724810.44','281432.71','7411651.70'); In the result, I get the map shifted exactly to the north, with the extent of latitude about from 60,6 to 66,8 instead of 60,41 and 66,58. The extent of longitude is correct. What is the cause of this error? Can I set the projection in Perl, without setting the extent? Hope for Your help. Best regards, Efremov Victor, Space Monitoring Information Support laboratory IKI RAN, Moscow, Russia. mailto:caveeagle at pochtamt.ru From panchuri at MSA-OXFORD.ARS.USDA.GOV Tue Apr 26 09:20:03 2005 From: panchuri at MSA-OXFORD.ARS.USDA.GOV (PRATAP ANCHURI) Date: Tue, 26 Apr 2005 11:20:03 -0500 Subject: java mapscript, libcurl error Message-ID: we are using java mapscript program to access terraservice.net using wms layer. we get the following error. An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x77B39B4 Function=curl_easy_perform+0xD Library=C:\mapServerProject\java\new\java\LIBCURL.dll Current Java thread: at edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw(Native Method) at edu.umn.gis.mapscript.mapObj.draw(mapObj.java:397) at serv.DrawMap.main(DrawMap.java:44) the libcurl.dll version is 7.13.2. and jvm used is 1.4.2_05 regards, pratap From kenlord at GMAIL.COM Tue Apr 26 09:22:50 2005 From: kenlord at GMAIL.COM (Ken Lord) Date: Tue, 26 Apr 2005 09:22:50 -0700 Subject: Can ArcIMS 9.0 or any ArcGIS products consume WMS or WFS web ser vices? In-Reply-To: <71c3c6c5050426073734f7ba83@mail.gmail.com> Message-ID: Hi Regina, and others, Yes, ArcGIS Version 9, service pack 2 will accept wms connections, and it does so in a surprisingly user-friendly way. BUT I have tried and tried, and have never been able to print any ArcGIS map containing a WMS layer successfully. All non-WMS layers will print fine, but the WMS layers are missing, as if when the map regenerates for printing, no time is given to allow the WMS source to re-send it's part of the map. Also, any type of exporting the map ... to JPG, to PDF etc. will have the same problem. So unless someone knows what I'm doing wrong, ArcGIS will display WMS, but not print or export WMS, making it fairly useless. Cheers, Ken Lord Vancouver BC On 4/26/05, David Bitner wrote: > In ArcGIS Version 9, WMS capabilities came with Service Pack 2. > > On 4/26/05, Till Adams wrote: > > Obe, Regina DND\MIS wrote: > > > > > I found the below thread in the mapserv archives that stated this was > > > not possible back then, but I was wondering if this is the same case > > > with the ArcGIS 9.0 products. > > > > > > http://lists.umn.edu/cgi-bin/wa?A2=ind0409&L=mapserver-users&P=R1058&I=-3 > > > > > > > > > I was trying to test out my Mapserver WMS in ArcIMS or ArcMap. > > > > > > I looked at ArcIMS 9.0 and ArcMap and I couldn't figure out any way > > > to use OGC WMS servers, it seemed to only accept ArcIMS services. > > > I thrilled to see I could do it from MapInfo though simply by pointing > > > at my WMS URL. > > > > > > Thanks, > > > Regina > > > > Dear Regina, > > > > for ArcGIs 8.x you must get the ArcGIS-WMS extension (freeware) from > > Sicad (www.sicad.de). In ArcGIs v9 a lot of funcionality is missing, but > > you may load wms directly .... I never tried this ;-) > > > > Greetings, Till > > > > ****************************************** > > * AmeiN! ArcGIS Map-Export-2-UMN * > > * AmeiN! Workshop 11. Mai 2005 * > > * http://www.terrestris.de * > > ****************************************** > > > > ------------------------------------------ > > > > Dipl. Geogr. Till Adams > > terrestris, Paulsen&Adams GbR > > Siemensstr. 8 * 53121 Bonn > > Tel.: 0228 962 899 52 * Fax.: 0228 962 899 57 > > info at terrestris.de * www.terrestris.de > > From rjames57 at YAHOO.COM Tue Apr 26 09:26:42 2005 From: rjames57 at YAHOO.COM (Randy James) Date: Tue, 26 Apr 2005 09:26:42 -0700 Subject: Can ArcIMS 9.0 or any ArcGIS products consume WMS or WFS web ser vices? In-Reply-To: 6667 Message-ID: Could be a ArcGis thing not a wms connectin one, i've had problems printing some point layers when the symbol i used was really complex, and they crashed the print driver. --- Ken Lord wrote: > Hi Regina, and others, > > Yes, ArcGIS Version 9, service pack 2 will accept wms connections, and > it does so in a surprisingly user-friendly way. > > BUT > > I have tried and tried, and have never been able to print any ArcGIS > map containing a WMS layer successfully. All non-WMS layers will print > fine, but the WMS layers are missing, as if when the map regenerates > for printing, no time is given to allow the WMS source to re-send it's > part of the map. > > Also, any type of exporting the map ... to JPG, to PDF etc. will have > the same problem. > > So unless someone knows what I'm doing wrong, ArcGIS will display WMS, > but not print or export WMS, making it fairly useless. > > Cheers, > Ken Lord > Vancouver BC > > > On 4/26/05, David Bitner wrote: > > In ArcGIS Version 9, WMS capabilities came with Service Pack 2. > > > > On 4/26/05, Till Adams wrote: > > > Obe, Regina DND\MIS wrote: > > > > > > > I found the below thread in the mapserv archives that stated this was > > > > not possible back then, but I was wondering if this is the same case > > > > with the ArcGIS 9.0 products. > > > > > > > > http://lists.umn.edu/cgi-bin/wa?A2=ind0409&L=mapserver-users&P=R1058&I=-3 > > > > > > > > > > > > > I was trying to test out my Mapserver WMS in ArcIMS or ArcMap. > > > > > > > > I looked at ArcIMS 9.0 and ArcMap and I couldn't figure out any way > > > > to use OGC WMS servers, it seemed to only accept ArcIMS services. > > > > I thrilled to see I could do it from MapInfo though simply by pointing > > > > at my WMS URL. > > > > > > > > Thanks, > > > > Regina > > > > > > Dear Regina, > > > > > > for ArcGIs 8.x you must get the ArcGIS-WMS extension (freeware) from > > > Sicad (www.sicad.de). In ArcGIs v9 a lot of funcionality is missing, but > > > you may load wms directly .... I never tried this ;-) > > > > > > Greetings, Till > > > > > > ****************************************** > > > * AmeiN! ArcGIS Map-Export-2-UMN * > > > * AmeiN! Workshop 11. Mai 2005 * > > > * http://www.terrestris.de * > > > ****************************************** > > > > > > ------------------------------------------ > > > > > > Dipl. Geogr. Till Adams > > > terrestris, Paulsen&Adams GbR > > > Siemensstr. 8 * 53121 Bonn > > > Tel.: 0228 962 899 52 * Fax.: 0228 962 899 57 > > > info at terrestris.de * www.terrestris.de > > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pramsey at REFRACTIONS.NET Tue Apr 26 09:30:48 2005 From: pramsey at REFRACTIONS.NET (Paul Ramsey) Date: Tue, 26 Apr 2005 09:30:48 -0700 Subject: Can ArcIMS 9.0 or any ArcGIS products consume WMS or WFS web ser vices? In-Reply-To: Message-ID: Worst comes to worst, pretend to be the other guys: http://mapserver.refractions.net Obe, Regina DND\MIS wrote: > I found the below thread in the mapserv archives that stated this was > not possible back then, but I was wondering if this is the same case > with the ArcGIS 9.0 products. > > http://lists.umn.edu/cgi-bin/wa?A2=ind0409&L=mapserver-users&P=R1058&I=-3 > > > I was trying to test out my Mapserver WMS in ArcIMS or ArcMap. > > I looked at ArcIMS 9.0 and ArcMap and I couldn't figure out any way to > use OGC WMS servers, it seemed to only accept ArcIMS services. > I thrilled to see I could do it from MapInfo though simply by pointing > at my WMS URL. > > Thanks, > Regina From woklist at CHARTER.NET Tue Apr 26 09:45:56 2005 From: woklist at CHARTER.NET (William K) Date: Tue, 26 Apr 2005 11:45:56 -0500 Subject: Mac OS Tiger / Gcc4.0 support In-Reply-To: Message-ID: Everything is installed in isolated folders in /usr/local (except for the pg startupitem), so it shouldn't walk over new Apple stuff. The 2 parts I can see that might be trouble are Postgres and PHP. Postgres adds a postgres user to the NetInfo database (if needed), and adds a line to /etc/hostconfig (if needed). PHP modifies /etc/httpd/httpd.conf - once with the apxs tool to enable PHP the standard way, then again to get it to use PHP in the custom location. Doesn't look like there should be install problems. I can't find any info on which version of Apache is default/included in Tiger. If it's 2, MapServer probably won't work. At least PHP-MapScript won't, CGI mapserv may work. But the PHP install may have issues. On Apr 26, 2005, at 9:47 AM, Cameron Rex wrote: > I've already ordered Tiger and should be getting it before Friday (at > least > that is what the Apple Store is saying.) I will test out the binaries > as > soon as I can (probably the day I get it). I will report back with any > problems I have. I've not tried the binaries yet in Panther, because I > had > already gone through with all the installation and had no reason to go > back > and redo it. Now I just have to wait for Tiger to get here. > > Cameron > > ----- William Kyngesburye http://www.kyngchaos.com/ "Time is an illusion - lunchtime doubly so." - Ford Prefect From bhudspeth at EDAC.UNM.EDU Tue Apr 26 10:21:38 2005 From: bhudspeth at EDAC.UNM.EDU (William Hudspeth) Date: Tue, 26 Apr 2005 11:21:38 -0600 Subject: Transparency in GRASS rasters Message-ID: Hello, I am having a little problem with getting null(no data) areas in a GRASS raster to appear as transparent in my mapserver client. In fact, I am displaying one of two different GRASS rasters, both possessing null(no data) areas over oceans. One of the rasters works just fine, allowing one to view the bathymetry through the transparent areas, while the other is quite opaque. As far as I can tell, both rasters have data ranges of 0-255, and have null(nodata) values over ocean areas when I use d.what.rast. You can view the effect at http://falstaff.unm.edu/cgi-bin/reason/raster_processing_client.py Under the Background Raster Layers dropdown, select the shaded relief to compare to the default background when the page opens. Any ideas on why one works and the other doesn't would be greatly appreciated. Bill. From dcmikkelsen at SHAW.CA Tue Apr 26 10:58:34 2005 From: dcmikkelsen at SHAW.CA (Dean C. Mikkelsen) Date: Tue, 26 Apr 2005 10:58:34 -0700 Subject: HPGN Datum? (fwd) In-Reply-To: <1114517049.23408.12.camel@geru-itea> Message-ID: Hi Didrik, 15 metres......so we are closer...now I'll lean towards we are off on one value somewhere - most likely scale. I'll do some more digging. Dean -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Didrik Pinte Sent: April 26, 2005 5:04 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] HPGN Datum? (fwd) Le mardi 26 avril 2005 ? 02:20 -0700, Dean C. Mikkelsen a ?crit : > Hi Didrik, > > I would say change the two parallels for the latitudes for NTF II, > remove +lon_0 since we've set Paris as the PM, and then keep everything > else the same. > > Dean Ok, I've tested the following : - removed +long_0 - changed +lat_1 and +lat_2 to the values (taking the lattitudes from "Parrall?les autom?coiques" on the table of your previous e-mail) That gives the same error, 15 meters on the right of the original points. Didrik From dpinte at ITAE.BE Tue Apr 26 11:12:57 2005 From: dpinte at ITAE.BE (Didrik Pinte) Date: Tue, 26 Apr 2005 20:12:57 +0200 Subject: HPGN Datum? (fwd) In-Reply-To: <009201c54a89$9083d120$0e7e5218@mikkedcoffice> Message-ID: Le mardi 26 avril 2005 ? 10:58 -0700, Dean C. Mikkelsen a ?crit : > Hi Didrik, > > 15 metres......so we are closer...now I'll lean towards we are off on > one value somewhere - most likely scale. > > I'll do some more digging. > > Dean Thank you very much for the help ! Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From tlombard at MPI-BREMEN.DE Tue Apr 26 10:38:41 2005 From: tlombard at MPI-BREMEN.DE (Thierry Lombardot) Date: Tue, 26 Apr 2005 19:38:41 +0200 Subject: getShape: problem with PostGIS table containing a non-text column. Message-ID: Dear MapServer users community, I have a problem with the getShape function in php/MapScript when using a PostGIS database. One of my table contains a column/field of a special type which can't be converted to text. Unfortunately, the getShape function wants to convert all the fields to text and gives an error status. Did someone fixed this problem already in a custom way? Perry Casson had the same problem one year ago with a field of type "bit" (see the attached mails). I do not want to change my data type, as suggested by David. Is there a way to force getShape to select only a subset of the PostGIS fields for example? Or simply to ignore fields which are not castable to text? This would be a simple solution. In the long run, as PostGIS becomes more and more popular, is it planned to add some PostGIS-specific functions to the php/mapscript API? And is it already possible to use msPOSTGISLayerGetShape() directly instead of getShape(), for example? Thank you for your support, and thanks to the refractions.net team for their great work on php/mapscript! Best regards Thierry My error message (one column is of type simpleparam, a custom type): ######################## msPOSTGISLayerGetShape(): Error executing POSTGIS SQL statement [...] cannot cast type simpleparam to text ########################## Previous discussion: >>Perry Casson (perry.casson at waypointinfo.com) wrote: >> >>[Mapserver-users] problem with PostGIS layers with a bit() column >> >>I'm quite new to all this MapServer stuff but there appears to be a >>bug >>when calling layer->getShape() on a PostGIS layer that contains >>columns >>that are of of type bit(). I see the code in mappostgis.c that builds >>this query but I'm not up to speed enough to know if the problem >>should >>be fixed there or farther up stream. I'm running 4.0.2 (Linux) >> >>Here's the error: >>Fatal error: [MapServer Error]: msPOSTGISLayerGetShape(): Error >>executing POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor2 >>BINARY >>CURSOR FOR SELECT >>esn::text,gmuid::text,messageid::text,timestamp::text,recievedat::text,devicetype::text,identifier::text,isgps::text,longitude::text,latitude::text,gpsvalid::text,gpstime::text,v1::text,v2::text,v3::text,max1::text,max2::text,max3::text,actuator_previous::text,actuator_current::text,userdata::text,battery::text,asbinary(force_collection(force_2d(geo)),'NDR') >>from wp_point WHERE OID = 27497 -ERROR: Cannot cast type bit to text >> >>and here how the table being queried is created: >>CREATE TABLE wp_point(ESN varchar(12), gmUID varchar(40), messageID >>varchar(40), TimeStamp timestamp, RecieveDat timestamp, DeviceType >>varchar(32), Identifier varchar(32), IsGPS varchar(2), Longitude >>float8, >>Latitude float8, GPSValid varchar(2), GPSTime timestamp, V1 int2, V2 >>int2, V3 int2, Max1 int2, Max2 int2, Max3 int2, Actuator_Previous >>bit(8) >>, Actuator_Current bit(8) ,UserData varchar(64), Battery varchar(8)); >>SELECT AddGeometryColumn('sentinel', 'wp_point', 'geo', 4326, >>'GEOMETRY', 2); >> >>Perry Casson > > David Blasby (dblasby at refractions.net) wrote: > >As the error says, it cannot convert the bit type to text. > >You can fix this by either: > >1. adding a conversion and CAST function to convert bit to text >2. change your column type from bit to char. You can also add a >constraint on the the table that says ( ='1' OR ='0'). > >dave > From dylan at IICI.NO-IP.ORG Tue Apr 26 11:43:10 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Tue, 26 Apr 2005 11:43:10 -0700 Subject: dynamically change reference map image In-Reply-To: <426DF816.17279.344C050@mma.gov.br> Message-ID: Edmar, thanks for the tip... however, this does not seem to change the reference image... any ideas on what might be preventing this from working? i am using the DHTML interface developed my UMN. thanks! On Tuesday 26 April 2005 04:13 am, Edmar Moretti wrote: > You can use the url to set the reference image: > &map_reference_image=path_to_image > > On 22 Apr 2005 at 14:42, Dylan Beaudette wrote: > > Hi everyone > > > > is it possible to dynamically set the properties of the REFERENCE object > > in a map file? > > > > for example, > > > > i would like to adjust my map file based on URL arguments: > > > > > > REFERENCE > > STATUS ON > > IMAGE "%file_name%.png" > > ... > > > > however, this does not work. if i manually enter the file name of the > > reference image into the map file everything works ok... > > > > any ideas on this one? > > > > > > -- > > Dylan Beaudette > > Soils and Biogeochemistry Graduate Group > > University of California at Davis > > 530.754.7341 > > -- > Edmar Moretti > Ge?grafo > Minist?rio do Meio Ambiente > Coordena??o Geral de Tecnologia da Informa??o > fone: (61) - 4009-1233 > http://mapas.mma.gov.br/mapas > masn: edmarmoretti at hotmail.com -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From abe.gillespie at GMAIL.COM Tue Apr 26 11:45:25 2005 From: abe.gillespie at GMAIL.COM (Abe Gillespie) Date: Tue, 26 Apr 2005 14:45:25 -0400 Subject: Test Message-ID: For the record, I *hate* the listserv HTML interface. Yuck. Hopefully I won't ever have to change subscription settings ever again. -Abe From tlombard at MPI-BREMEN.DE Tue Apr 26 12:25:44 2005 From: tlombard at MPI-BREMEN.DE (Thierry Lombardot) Date: Tue, 26 Apr 2005 21:25:44 +0200 Subject: getShape: problem with PostGIS table containing a non-text column. In-Reply-To: Message-ID: Hi Abe, Yes this would be nice, but the documentation of the getShape methode doesn't give any hint in this direction. And the resulting select at the postgres level is doing a "select *" with text casting. So, no way to select only the field you need... Is it possible to use the msPOSTGISLayerGetShape() directly? I'll have a look at the source code o f php/mapscript I think.. Are you using php/mapscript with PostGIS yourself? If so, what is your strategy to do specific postgres select operation? Thanks and best regards, Thierry Abe Gillespie wrote: > Just define your query such that it only selects the fields you want. > Or create a view in the PostgreSQL database. > > -Abe > > On 4/26/05, Thierry Lombardot wrote: > >>Dear MapServer users community, >> >>I have a problem with the getShape function in php/MapScript when using >>a PostGIS database. >>One of my table contains a column/field of a special type which can't be >>converted to text. >>Unfortunately, the getShape function wants to convert all the fields to >>text and gives an error status. >> >>Did someone fixed this problem already in a custom way? >> >>Perry Casson had the same problem one year ago with a field of type >>"bit" (see the attached mails). >> >>I do not want to change my data type, as suggested by David. Is there a >>way to force getShape to select only a subset of the PostGIS fields for >>example? Or simply to ignore fields which are not castable to text? This >>would be a simple solution. >> >>In the long run, as PostGIS becomes more and more popular, is it planned >>to add some PostGIS-specific functions to the php/mapscript API? And is >>it already possible to use msPOSTGISLayerGetShape() directly instead of >>getShape(), for example? >> >>Thank you for your support, and thanks to the refractions.net team for >>their great work on php/mapscript! >> >>Best regards >> >>Thierry >> >>My error message (one column is of type simpleparam, a custom type): >>######################## >>msPOSTGISLayerGetShape(): Error executing POSTGIS SQL statement >>[...] >>cannot cast type simpleparam to text >>########################## >> >>Previous discussion: >> >> >>Perry Casson (perry.casson at waypointinfo.com) wrote: >> >> >> >>[Mapserver-users] problem with PostGIS layers with a bit() column >> >> >> >>I'm quite new to all this MapServer stuff but there appears to be a >>bug >> >>when calling layer->getShape() on a PostGIS layer that contains >>columns >> >>that are of of type bit(). I see the code in mappostgis.c that builds >> >>this query but I'm not up to speed enough to know if the problem >>should >> >>be fixed there or farther up stream. I'm running 4.0.2 (Linux) >> >> >> >>Here's the error: >> >>Fatal error: [MapServer Error]: msPOSTGISLayerGetShape(): Error >> >>executing POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor2 >> >>BINARY >> >>CURSOR FOR SELECT >> >>esn::text,gmuid::text,messageid::text,timestamp::text,recievedat::text,devicetype::text,identifier::text,isgps::text,longitude::text,latitude::text,gpsvalid::text,gpstime::text,v1::text,v2::text,v3::text,max1::text,max2::text,max3::text,actuator_previous::text,actuator_current::text,userdata::text,battery::text,asbinary(force_collection(force_2d(geo)),'NDR') >> >>from wp_point WHERE OID = 27497 -ERROR: Cannot cast type bit to text >> >> >> >>and here how the table being queried is created: >> >>CREATE TABLE wp_point(ESN varchar(12), gmUID varchar(40), messageID >> >>varchar(40), TimeStamp timestamp, RecieveDat timestamp, DeviceType >> >>varchar(32), Identifier varchar(32), IsGPS varchar(2), Longitude >> >>float8, >> >>Latitude float8, GPSValid varchar(2), GPSTime timestamp, V1 int2, V2 >> >>int2, V3 int2, Max1 int2, Max2 int2, Max3 int2, Actuator_Previous >> >>bit(8) >> >>, Actuator_Current bit(8) ,UserData varchar(64), Battery varchar(8)); >> >>SELECT AddGeometryColumn('sentinel', 'wp_point', 'geo', 4326, >> >>'GEOMETRY', 2); >> >> >> >>Perry Casson >> > >> > David Blasby (dblasby at refractions.net) wrote: >> > >> >As the error says, it cannot convert the bit type to text. >> > >> >You can fix this by either: >> > >> >1. adding a conversion and CAST function to convert bit to text >> >2. change your column type from bit to char. You can also add a >> >constraint on the the table that says ( ='1' OR ='0'). >> > >> >dave >> > >> > > From abe.gillespie at GMAIL.COM Tue Apr 26 12:33:34 2005 From: abe.gillespie at GMAIL.COM (Abe Gillespie) Date: Tue, 26 Apr 2005 15:33:34 -0400 Subject: getShape: problem with PostGIS table containing a non-text column. In-Reply-To: <426E95B8.3020301@mpi-bremen.de> Message-ID: In your map file you've got something like this for a PostGIS layer: LAYER ... DATA "the_geom from table" ... END Now just create a view of the fields you want, including the_geom of course, and replace "table" with the view's name. Such as: DATA "the_geom from my_view_with_nice_fields" Does this work? Yes I do PHP scripting, though I'm beginning to favor the C# stuff. I have been working more with PostGIS than anything lately, though, as I'm working on an ArcGIS -> PostGIS connector. -Abe On 4/26/05, Thierry Lombardot wrote: > Hi Abe, > > Yes this would be nice, but the documentation of the getShape methode > doesn't give any hint in this direction. > And the resulting select at the postgres level is doing a "select *" > with text casting. So, no way to select only the field you need... > > Is it possible to use the msPOSTGISLayerGetShape() directly? I'll have a > look at the source code o f php/mapscript I think.. > > Are you using php/mapscript with PostGIS yourself? If so, what is your > strategy to do specific postgres select operation? > > Thanks and best regards, > > Thierry > > Abe Gillespie wrote: > > Just define your query such that it only selects the fields you want. > > Or create a view in the PostgreSQL database. > > > > -Abe > > > > On 4/26/05, Thierry Lombardot wrote: > > > >>Dear MapServer users community, > >> > >>I have a problem with the getShape function in php/MapScript when using > >>a PostGIS database. > >>One of my table contains a column/field of a special type which can't be > >>converted to text. > >>Unfortunately, the getShape function wants to convert all the fields to > >>text and gives an error status. > >> > >>Did someone fixed this problem already in a custom way? > >> > >>Perry Casson had the same problem one year ago with a field of type > >>"bit" (see the attached mails). > >> > >>I do not want to change my data type, as suggested by David. Is there a > >>way to force getShape to select only a subset of the PostGIS fields for > >>example? Or simply to ignore fields which are not castable to text? This > >>would be a simple solution. > >> > >>In the long run, as PostGIS becomes more and more popular, is it planned > >>to add some PostGIS-specific functions to the php/mapscript API? And is > >>it already possible to use msPOSTGISLayerGetShape() directly instead of > >>getShape(), for example? > >> > >>Thank you for your support, and thanks to the refractions.net team for > >>their great work on php/mapscript! > >> > >>Best regards > >> > >>Thierry > >> > >>My error message (one column is of type simpleparam, a custom type): > >>######################## > >>msPOSTGISLayerGetShape(): Error executing POSTGIS SQL statement > >>[...] > >>cannot cast type simpleparam to text > >>########################## > >> > >>Previous discussion: > >> > >> >>Perry Casson (perry.casson at waypointinfo.com) wrote: > >> >> > >> >>[Mapserver-users] problem with PostGIS layers with a bit() column > >> >> > >> >>I'm quite new to all this MapServer stuff but there appears to be a >>bug > >> >>when calling layer->getShape() on a PostGIS layer that contains >>columns > >> >>that are of of type bit(). I see the code in mappostgis.c that builds > >> >>this query but I'm not up to speed enough to know if the problem >>should > >> >>be fixed there or farther up stream. I'm running 4.0.2 (Linux) > >> >> > >> >>Here's the error: > >> >>Fatal error: [MapServer Error]: msPOSTGISLayerGetShape(): Error > >> >>executing POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor2 > >> >>BINARY > >> >>CURSOR FOR SELECT > >> >>esn::text,gmuid::text,messageid::text,timestamp::text,recievedat::text,devicetype::text,identifier::text,isgps::text,longitude::text,latitude::text,gpsvalid::text,gpstime::text,v1::text,v2::text,v3::text,max1::text,max2::text,max3::text,actuator_previous::text,actuator_current::text,userdata::text,battery::text,asbinary(force_collection(force_2d(geo)),'NDR') > >> >>from wp_point WHERE OID = 27497 -ERROR: Cannot cast type bit to text > >> >> > >> >>and here how the table being queried is created: > >> >>CREATE TABLE wp_point(ESN varchar(12), gmUID varchar(40), messageID > >> >>varchar(40), TimeStamp timestamp, RecieveDat timestamp, DeviceType > >> >>varchar(32), Identifier varchar(32), IsGPS varchar(2), Longitude > >> >>float8, > >> >>Latitude float8, GPSValid varchar(2), GPSTime timestamp, V1 int2, V2 > >> >>int2, V3 int2, Max1 int2, Max2 int2, Max3 int2, Actuator_Previous > >> >>bit(8) > >> >>, Actuator_Current bit(8) ,UserData varchar(64), Battery varchar(8)); > >> >>SELECT AddGeometryColumn('sentinel', 'wp_point', 'geo', 4326, > >> >>'GEOMETRY', 2); > >> >> > >> >>Perry Casson > >> > > >> > David Blasby (dblasby at refractions.net) wrote: > >> > > >> >As the error says, it cannot convert the bit type to text. > >> > > >> >You can fix this by either: > >> > > >> >1. adding a conversion and CAST function to convert bit to text > >> >2. change your column type from bit to char. You can also add a > >> >constraint on the the table that says ( ='1' OR ='0'). > >> > > >> >dave > >> > > >> > > > > > > From John.C.Cartwright at NOAA.GOV Tue Apr 26 13:14:19 2005 From: John.C.Cartwright at NOAA.GOV (John C Cartwright) Date: Tue, 26 Apr 2005 14:14:19 -0600 Subject: installing python mapscript Message-ID: Hello All, I'm trying to install and use python/mapscript in a non-standard directory (/extra/contrib/lib) and having some trouble. Here's my steps: 1) cd mapscript/python 2) copy mapscript.py, mapscript_wrap.c from modern/ 3) python setup.py build 4) python setup.py install --prefix=/extra/contrib This creates /extra/contrib/lib/python2.2/site-packages/ with the contents: mapscript.py mapscript.pyc _mapscript.so However when I try to use the module: [jcc at lynx jcc]$ python Python 2.2.3 (#1, Feb 2 2005, 12:20:51) [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-49)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path.append('/extra/contrib/lib/python2.2/site-packages/') >>> import mapscript Traceback (most recent call last): File "", line 1, in ? File "/extra/contrib/lib/python2.2/site-packages/mapscript.py", line 4, in ? import _mapscript ImportError: /extra/contrib/lib/python2.2/site-packages/_mapscript.so: undefined symbol: SE_state_get_info I'm sure that it's a configuration issue, but I'm afraid that I'm too much of a python novice to know exactly what the problem is. Can anyone provide a suggestion? Environment: python 2.2.3 mapserver 4.4.2 RHEL WS 3 Thanks! -- john From Troy.Johnson at SDL.USU.EDU Tue Apr 26 13:16:47 2005 From: Troy.Johnson at SDL.USU.EDU (Troy R. Johnson) Date: Tue, 26 Apr 2005 14:16:47 -0600 Subject: Finding Latitude and Longitude of the 4 corners of a map using mapscript. Message-ID: After I have zoomed in to a new point using mapscript, I'd like to be able to know the latitude and longitude values of the 4 corners of the map image that is created. Is there anyway to access this information from mapscript. It seems like it should be so obvious, but all I seem to have access to are the extents. Do the extents translate directly to lat lon values? Thanks for any help. Troy From dylan at IICI.NO-IP.ORG Tue Apr 26 13:24:31 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Tue, 26 Apr 2005 13:24:31 -0700 Subject: tiling shape files, or shptree Message-ID: Hi, i have some rather large shapefiles, and i am wondering what the best optimization techniques to use: for example: i have a statewide local roads shapefile (TIGER 2000). this layer is not enabled until the user is zoomed in quite a bit. will i get faster map rendering times if i : 1. tile the statewide coverage into small rectangles 2. use shptree to create a spatial index 3. do both if tiling is the best option, does anyone have any suggestions for doing this with opensource tools? i was thinking about creating a regular grid in GRASS, and then using ogr2ogr to extract parts of the local roads shapefile based on the geographic extrents of the regular grid. any ideas? thanks! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From sgillies at FRII.COM Tue Apr 26 13:26:16 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Tue, 26 Apr 2005 14:26:16 -0600 Subject: installing python mapscript In-Reply-To: Message-ID: On Apr 26, 2005, at 2:14 PM, John C Cartwright wrote: > Hello All, > > I'm trying to install and use python/mapscript in a non-standard > directory (/extra/contrib/lib) and having some trouble. > > Here's my steps: > 1) cd mapscript/python > 2) copy mapscript.py, mapscript_wrap.c from modern/ > 3) python setup.py build > 4) python setup.py install --prefix=/extra/contrib > > This creates /extra/contrib/lib/python2.2/site-packages/ with the > contents: mapscript.py mapscript.pyc _mapscript.so > > However when I try to use the module: > > [jcc at lynx jcc]$ python > Python 2.2.3 (#1, Feb 2 2005, 12:20:51) > [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-49)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import sys >>>> sys.path.append('/extra/contrib/lib/python2.2/site-packages/') >>>> import mapscript > Traceback (most recent call last): > File "", line 1, in ? > File "/extra/contrib/lib/python2.2/site-packages/mapscript.py", line > 4, in ? > import _mapscript > ImportError: /extra/contrib/lib/python2.2/site-packages/_mapscript.so: > undefined symbol: SE_state_get_info > > > I'm sure that it's a configuration issue, but I'm afraid that I'm too > much of a python novice to know exactly what the problem is. Can anyone > provide a suggestion? > > Environment: > python 2.2.3 > mapserver 4.4.2 > RHEL WS 3 > > Thanks! > > -- john > John, SE_state_get_info is from ArcSDE? My wild guess is that your dynamic linker cannot find the SDE DLL. If you pasted your MapServer configuration command, the mapscriptvars file, and the output from the mapserver make and Python build, I will be glad to review them and see if anything is obviously wrong. cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From schuyler at NOCAT.NET Tue Apr 26 13:38:19 2005 From: schuyler at NOCAT.NET (Schuyler Erle) Date: Tue, 26 Apr 2005 13:38:19 -0700 Subject: tiling shape files, or shptree In-Reply-To: <200504261324.31111.dylan@iici.no-ip.org> Message-ID: * On 26-Apr-2005 at 1:24PM PDT, Dylan Beaudette said: > > for example: i have a statewide local roads shapefile (TIGER 2000). this > layer is not enabled until the user is zoomed in quite a bit. will i get > faster map rendering times if i : > > 1. tile the statewide coverage into small rectangles > > 2. use shptree to create a spatial index > > 3. do both You want Steve Woodbridge's shp2tile. Use the quadtree mode, works great. http://swoodbridge.com/tools/ Then use ogrtindex to generate a tile index for MapServer. Running shptree on both the tiles and the index can't hurt. SDE From sgillies at FRII.COM Tue Apr 26 13:45:00 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Tue, 26 Apr 2005 14:45:00 -0600 Subject: java mapscript, libcurl error In-Reply-To: Message-ID: On Apr 26, 2005, at 10:20 AM, PRATAP ANCHURI wrote: > we are using java mapscript program to access terraservice.net using > wms = > layer. > > we get the following error. > > An unexpected exception has been detected in native code outside the > VM. > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred > at = > PC=3D0x77B39B4 > Function=3Dcurl_easy_perform+0xD > Library=3DC:\mapServerProject\java\new\java\LIBCURL.dll > > Current Java thread: > at edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw(Native > Method) > at edu.umn.gis.mapscript.mapObj.draw(mapObj.java:397) > at serv.DrawMap.main(DrawMap.java:44) > > > the libcurl.dll version is 7.13.2. and jvm used is 1.4.2_05 > > > regards, > pratap > Pratap, Tell me a little more. What is the origin of your Java mapscript? Which MapServer version? Does this error always occur, or do you sometimes succeed? Are there other WMS layers involved in your map file? cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From matt at MSILEADS.COM Tue Apr 26 12:39:16 2005 From: matt at MSILEADS.COM (Matthew Roberson) Date: Tue, 26 Apr 2005 14:39:16 -0500 Subject: Extent and Shapefiles Message-ID: First, let me just say I just started using MapServer this week and I am sort of confused by all the different ways maps can be projected. When i use ogrinfo, to determine the Extent of a shapefile(in this case the zipcode boundries for the state of Missouri), how do I know what units the values are in? Is the minx value below -95.774704 meters, feet, or something else? Or maybe the minx value is expressed in degrees, minutes, seconds. How can I tell? Below is what output from ogrinfo on the aforementioned shapefile. Thanks, Matt [imac-dev03:WebServer/Documents/data] matthewr% ogrinfo -al -so zt29_d00.shp zt29_d00 INFO: Open of `zt29_d00.shp' using driver `ESRI Shapefile' successful. Layer name: zt29_d00 Geometry: Polygon Feature Count: 1341 Extent: (-95.774704, 35.995683) - (-89.098843, 40.613640) Layer SRS WKT: (unknown) AREA: Real (20.5) PERIMETER: Real (20.5) ZT29_D00_: Integer (11.0) ZT29_D00_I: Integer (11.0) ZCTA: String (5.0) NAME: String (90.0) LSAD: String (2.0) LSAD_TRANS: String (50.0) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1063 bytes Desc: not available URL: From tlombard at MPI-BREMEN.DE Tue Apr 26 13:59:46 2005 From: tlombard at MPI-BREMEN.DE (Thierry Lombardot) Date: Tue, 26 Apr 2005 22:59:46 +0200 Subject: getShape: problem with PostGIS table containing a non-text column. -> OK // php vs. C perf. In-Reply-To: Message-ID: Thanks a lot Abe, Adding postgres views in the map file seems to be the best way, since the php/mapscript functions are quite generic. I'll work on it. Besides, I'll also try my own Poatgres queries with DB.php using the oid retrieved by MapServer's querybypoint(). Could you please comment on the C vs. php performances for MapServer? At which number of layers/entries do I have to say goodbye to the php/mapscripts? At the moment, I can generate a map within 1,5 sec with 2000 polygons in one table and <100 points/polygons in 6 other tables. Strangely, if I add the labels of the large table, my performances are ridiculous, e.g. up to 3 sec for a map. Is the label positioning known to be slow? Best regards, Thierry > In your map file you've got something like this for a PostGIS layer: > > LAYER > ... > DATA "the_geom from table" > ... > END > > Now just create a view of the fields you want, including the_geom of > course, and replace "table" with the view's name. Such as: > > DATA "the_geom from my_view_with_nice_fields" > > Does this work? > > Yes I do PHP scripting, though I'm beginning to favor the C# stuff. I > have been working more with PostGIS than anything lately, though, as > I'm working on an ArcGIS -> PostGIS connector. > > -Abe > > On 4/26/05, Thierry Lombardot wrote: >> Hi Abe, >> >> Yes this would be nice, but the documentation of the getShape methode >> doesn't give any hint in this direction. >> And the resulting select at the postgres level is doing a "select *" >> with text casting. So, no way to select only the field you need... >> >> Is it possible to use the msPOSTGISLayerGetShape() directly? I'll have a >> look at the source code o f php/mapscript I think.. >> >> Are you using php/mapscript with PostGIS yourself? If so, what is your >> strategy to do specific postgres select operation? >> >> Thanks and best regards, >> >> Thierry >> >> Abe Gillespie wrote: >> > Just define your query such that it only selects the fields you want. >> > Or create a view in the PostgreSQL database. >> > >> > -Abe >> > >> > On 4/26/05, Thierry Lombardot wrote: >> > >> >>Dear MapServer users community, >> >> >> >>I have a problem with the getShape function in php/MapScript when >> using >> >>a PostGIS database. >> >>One of my table contains a column/field of a special type which can't >> be >> >>converted to text. >> >>Unfortunately, the getShape function wants to convert all the fields >> to >> >>text and gives an error status. >> >> >> >>Did someone fixed this problem already in a custom way? >> >> >> >>Perry Casson had the same problem one year ago with a field of type >> >>"bit" (see the attached mails). >> >> >> >>I do not want to change my data type, as suggested by David. Is there >> a >> >>way to force getShape to select only a subset of the PostGIS fields >> for >> >>example? Or simply to ignore fields which are not castable to text? >> This >> >>would be a simple solution. >> >> >> >>In the long run, as PostGIS becomes more and more popular, is it >> planned >> >>to add some PostGIS-specific functions to the php/mapscript API? And >> is >> >>it already possible to use msPOSTGISLayerGetShape() directly instead >> of >> >>getShape(), for example? >> >> >> >>Thank you for your support, and thanks to the refractions.net team for >> >>their great work on php/mapscript! >> >> >> >>Best regards >> >> >> >>Thierry >> >> >> >>My error message (one column is of type simpleparam, a custom type): >> >>######################## >> >>msPOSTGISLayerGetShape(): Error executing POSTGIS SQL statement >> >>[...] >> >>cannot cast type simpleparam to text >> >>########################## >> >> >> >>Previous discussion: >> >> >> >> >>Perry Casson (perry.casson at waypointinfo.com) wrote: >> >> >> >> >> >>[Mapserver-users] problem with PostGIS layers with a bit() column >> >> >> >> >> >>I'm quite new to all this MapServer stuff but there appears to be a >> >>bug >> >> >>when calling layer->getShape() on a PostGIS layer that contains >> >>columns >> >> >>that are of of type bit(). I see the code in mappostgis.c that >> builds >> >> >>this query but I'm not up to speed enough to know if the problem >> >>should >> >> >>be fixed there or farther up stream. I'm running 4.0.2 (Linux) >> >> >> >> >> >>Here's the error: >> >> >>Fatal error: [MapServer Error]: msPOSTGISLayerGetShape(): Error >> >> >>executing POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor2 >> >> >>BINARY >> >> >>CURSOR FOR SELECT >> >> >>esn::text,gmuid::text,messageid::text,timestamp::text,recievedat::text,devicetype::text,identifier::text,isgps::text,longitude::text,latitude::text,gpsvalid::text,gpstime::text,v1::text,v2::text,v3::text,max1::text,max2::text,max3::text,actuator_previous::text,actuator_current::text,userdata::text,battery::text,asbinary(force_collection(force_2d(geo)),'NDR') >> >> >>from wp_point WHERE OID = 27497 -ERROR: Cannot cast type bit to >> text >> >> >> >> >> >>and here how the table being queried is created: >> >> >>CREATE TABLE wp_point(ESN varchar(12), gmUID varchar(40), messageID >> >> >>varchar(40), TimeStamp timestamp, RecieveDat timestamp, DeviceType >> >> >>varchar(32), Identifier varchar(32), IsGPS varchar(2), Longitude >> >> >>float8, >> >> >>Latitude float8, GPSValid varchar(2), GPSTime timestamp, V1 int2, >> V2 >> >> >>int2, V3 int2, Max1 int2, Max2 int2, Max3 int2, Actuator_Previous >> >> >>bit(8) >> >> >>, Actuator_Current bit(8) ,UserData varchar(64), Battery >> varchar(8)); >> >> >>SELECT AddGeometryColumn('sentinel', 'wp_point', 'geo', 4326, >> >> >>'GEOMETRY', 2); >> >> >> >> >> >>Perry Casson >> >> > >> >> > David Blasby (dblasby at refractions.net) wrote: >> >> > >> >> >As the error says, it cannot convert the bit type to text. >> >> > >> >> >You can fix this by either: >> >> > >> >> >1. adding a conversion and CAST function to convert bit to text >> >> >2. change your column type from bit to char. You can also add a >> >> >constraint on the the table that says ( ='1' OR >> ='0'). >> >> > >> >> >dave >> >> > >> >> >> > >> > >> >> > From jms4 at PO.CWRU.EDU Tue Apr 26 13:57:29 2005 From: jms4 at PO.CWRU.EDU (James Sohr) Date: Tue, 26 Apr 2005 15:57:29 -0500 Subject: Finding Latitude and Longitude of the 4 corners of a map using mapscript. Message-ID: Yes, you can calculate the lat long of your current extent by using the RectObj's project method. For instance: $latlong_rect = $map->extent; $latlong_rect->project( ms_newprojectionobj($map->getProjection), ms_newprojectionobj("proj=latlong")); Assuming $map is your map object, the latitudes and longitudes of the four corners of your map are now stored in $latlong_rect->minx, $latlong_rect- >miny, $latlong_rec->maxx, and $latlong_rect->maxy . From abe.gillespie at GMAIL.COM Tue Apr 26 14:01:31 2005 From: abe.gillespie at GMAIL.COM (Abe Gillespie) Date: Tue, 26 Apr 2005 17:01:31 -0400 Subject: getShape: problem with PostGIS table containing a non-text column. -> OK // php vs. C perf. In-Reply-To: <64059.80.228.181.99.1114549186.squirrel@80.228.181.99> Message-ID: I'm not the one to talk to for performance ... however, I do know labelling algorithms can be processor intensive. Try tweaking the various labelling options. For instance, if you're not worried about duplicates you can save computation by allowing duplicates. -Abe On 4/26/05, tlombard at mpi-bremen.de wrote: > Thanks a lot Abe, > Adding postgres views in the map file seems to be the best way, since the > php/mapscript functions are quite generic. I'll work on it. > Besides, I'll also try my own Poatgres queries with DB.php using the oid > retrieved by MapServer's querybypoint(). > > Could you please comment on the C vs. php performances for MapServer? At > which number of layers/entries do I have to say goodbye to the > php/mapscripts? At the moment, I can generate a map within 1,5 sec with > 2000 polygons in one table and <100 points/polygons in 6 other tables. > Strangely, if I add the labels of the large table, my performances are > ridiculous, e.g. up to 3 sec for a map. Is the label positioning known to > be slow? > > Best regards, > > Thierry > > > In your map file you've got something like this for a PostGIS layer: > > > > LAYER > > ... > > DATA "the_geom from table" > > ... > > END > > > > Now just create a view of the fields you want, including the_geom of > > course, and replace "table" with the view's name. Such as: > > > > DATA "the_geom from my_view_with_nice_fields" > > > > Does this work? > > > > Yes I do PHP scripting, though I'm beginning to favor the C# stuff. I > > have been working more with PostGIS than anything lately, though, as > > I'm working on an ArcGIS -> PostGIS connector. > > > > -Abe > > > > On 4/26/05, Thierry Lombardot wrote: > >> Hi Abe, > >> > >> Yes this would be nice, but the documentation of the getShape methode > >> doesn't give any hint in this direction. > >> And the resulting select at the postgres level is doing a "select *" > >> with text casting. So, no way to select only the field you need... > >> > >> Is it possible to use the msPOSTGISLayerGetShape() directly? I'll have a > >> look at the source code o f php/mapscript I think.. > >> > >> Are you using php/mapscript with PostGIS yourself? If so, what is your > >> strategy to do specific postgres select operation? > >> > >> Thanks and best regards, > >> > >> Thierry > >> > >> Abe Gillespie wrote: > >> > Just define your query such that it only selects the fields you want. > >> > Or create a view in the PostgreSQL database. > >> > > >> > -Abe > >> > > >> > On 4/26/05, Thierry Lombardot wrote: > >> > > >> >>Dear MapServer users community, > >> >> > >> >>I have a problem with the getShape function in php/MapScript when > >> using > >> >>a PostGIS database. > >> >>One of my table contains a column/field of a special type which can't > >> be > >> >>converted to text. > >> >>Unfortunately, the getShape function wants to convert all the fields > >> to > >> >>text and gives an error status. > >> >> > >> >>Did someone fixed this problem already in a custom way? > >> >> > >> >>Perry Casson had the same problem one year ago with a field of type > >> >>"bit" (see the attached mails). > >> >> > >> >>I do not want to change my data type, as suggested by David. Is there > >> a > >> >>way to force getShape to select only a subset of the PostGIS fields > >> for > >> >>example? Or simply to ignore fields which are not castable to text? > >> This > >> >>would be a simple solution. > >> >> > >> >>In the long run, as PostGIS becomes more and more popular, is it > >> planned > >> >>to add some PostGIS-specific functions to the php/mapscript API? And > >> is > >> >>it already possible to use msPOSTGISLayerGetShape() directly instead > >> of > >> >>getShape(), for example? > >> >> > >> >>Thank you for your support, and thanks to the refractions.net team for > >> >>their great work on php/mapscript! > >> >> > >> >>Best regards > >> >> > >> >>Thierry > >> >> > >> >>My error message (one column is of type simpleparam, a custom type): > >> >>######################## > >> >>msPOSTGISLayerGetShape(): Error executing POSTGIS SQL statement > >> >>[...] > >> >>cannot cast type simpleparam to text > >> >>########################## > >> >> > >> >>Previous discussion: > >> >> > >> >> >>Perry Casson (perry.casson at waypointinfo.com) wrote: > >> >> >> > >> >> >>[Mapserver-users] problem with PostGIS layers with a bit() column > >> >> >> > >> >> >>I'm quite new to all this MapServer stuff but there appears to be a > >> >>bug > >> >> >>when calling layer->getShape() on a PostGIS layer that contains > >> >>columns > >> >> >>that are of of type bit(). I see the code in mappostgis.c that > >> builds > >> >> >>this query but I'm not up to speed enough to know if the problem > >> >>should > >> >> >>be fixed there or farther up stream. I'm running 4.0.2 (Linux) > >> >> >> > >> >> >>Here's the error: > >> >> >>Fatal error: [MapServer Error]: msPOSTGISLayerGetShape(): Error > >> >> >>executing POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor2 > >> >> >>BINARY > >> >> >>CURSOR FOR SELECT > >> >> >>esn::text,gmuid::text,messageid::text,timestamp::text,recievedat::text,devicetype::text,identifier::text,isgps::text,longitude::text,latitude::text,gpsvalid::text,gpstime::text,v1::text,v2::text,v3::text,max1::text,max2::text,max3::text,actuator_previous::text,actuator_current::text,userdata::text,battery::text,asbinary(force_collection(force_2d(geo)),'NDR') > >> >> >>from wp_point WHERE OID = 27497 -ERROR: Cannot cast type bit to > >> text > >> >> >> > >> >> >>and here how the table being queried is created: > >> >> >>CREATE TABLE wp_point(ESN varchar(12), gmUID varchar(40), messageID > >> >> >>varchar(40), TimeStamp timestamp, RecieveDat timestamp, DeviceType > >> >> >>varchar(32), Identifier varchar(32), IsGPS varchar(2), Longitude > >> >> >>float8, > >> >> >>Latitude float8, GPSValid varchar(2), GPSTime timestamp, V1 int2, > >> V2 > >> >> >>int2, V3 int2, Max1 int2, Max2 int2, Max3 int2, Actuator_Previous > >> >> >>bit(8) > >> >> >>, Actuator_Current bit(8) ,UserData varchar(64), Battery > >> varchar(8)); > >> >> >>SELECT AddGeometryColumn('sentinel', 'wp_point', 'geo', 4326, > >> >> >>'GEOMETRY', 2); > >> >> >> > >> >> >>Perry Casson > >> >> > > >> >> > David Blasby (dblasby at refractions.net) wrote: > >> >> > > >> >> >As the error says, it cannot convert the bit type to text. > >> >> > > >> >> >You can fix this by either: > >> >> > > >> >> >1. adding a conversion and CAST function to convert bit to text > >> >> >2. change your column type from bit to char. You can also add a > >> >> >constraint on the the table that says ( ='1' OR > >> ='0'). > >> >> > > >> >> >dave > >> >> > > >> >> > >> > > >> > > >> > >> > > > > From cdaily at GMAIL.COM Tue Apr 26 14:05:00 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Tue, 26 Apr 2005 16:05:00 -0500 Subject: Extent and Shapefiles In-Reply-To: <76bbf263a36ffc2b7f1bae4b46b3c184@msileads.com> Message-ID: The units are determined by the projection type. Different projections have different units. In your case, those are lat/long values in decimal degrees (dd). The values are both (x, y) pairs, so... (-95.774704, 35.995683) - (-89.098843, 40.613640) translates to min_x = -95.774704 min_y = 35.995683 max_x = -89.098843 max_y = 40.613640 Curiously, could you tell me where you got the zip code shapefile? I've been trying to find a good one for the state of Illinois. -Camden Daily Prudential Preferred Properties http://www.prupref.com From sgillies at FRII.COM Tue Apr 26 14:08:18 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Tue, 26 Apr 2005 15:08:18 -0600 Subject: Finding Latitude and Longitude of the 4 corners of a map using mapscript. In-Reply-To: Message-ID: Just make sure to get and transform your extent *after* the map is drawn because msDrawMap will fudge the map extents to fit the specified image size. cheers, Sean On Apr 26, 2005, at 2:57 PM, James Sohr wrote: > Yes, you can calculate the lat long of your current extent by using the > RectObj's project method. For instance: > > > $latlong_rect = $map->extent; > $latlong_rect->project( ms_newprojectionobj($map->getProjection), > ms_newprojectionobj("proj=latlong")); > > > > Assuming $map is your map object, the latitudes and longitudes of the > four > corners of your map are now stored in $latlong_rect->minx, > $latlong_rect- >> miny, $latlong_rec->maxx, and $latlong_rect->maxy . > > -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From matt at MSILEADS.COM Tue Apr 26 14:10:54 2005 From: matt at MSILEADS.COM (Matthew Roberson) Date: Tue, 26 Apr 2005 16:10:54 -0500 Subject: Extent and Shapefiles In-Reply-To: <16264e070504261405985c9d9@mail.gmail.com> Message-ID: Camden, Thanks. That helps a lot. I got the file from: http://www.census.gov/geo/www/tiger/tigerua/ua_tgr2k.html Matt On Apr 26, 2005, at 4:05 PM, Camden Daily wrote: > The units are determined by the projection type. Different > projections have different units. > > In your case, those are lat/long values in decimal degrees (dd). The > values are both (x, y) pairs, so... > > (-95.774704, 35.995683) - (-89.098843, 40.613640) > > translates to > > min_x = -95.774704 > min_y = 35.995683 > max_x = -89.098843 > max_y = 40.613640 > > Curiously, could you tell me where you got the zip code shapefile? > I've been trying to find a good one for the state of Illinois. > > -Camden Daily > Prudential Preferred Properties > http://www.prupref.com > From covariance at SHAW.CA Tue Apr 26 19:07:51 2005 From: covariance at SHAW.CA (Bob Bruce) Date: Tue, 26 Apr 2005 21:07:51 -0500 Subject: Error Building MapScript on WIN32 - Unresolved references: msSLDApplySLD, msSLDApplySLDURL, msSLDGenerateSLD Message-ID: I am getting these unresolved external references when trying to build PHP MapScript with MapServer version 4.5. If anyone has an explanation on how to fix this problem it would be much appreciated. The MapServer CGI build worked fine. I am using MS Visual Studio .NET 2003 Standard and PHP version 4.3.11 . I have build MapServer with the WMS Server and Client options. thanks, Bob Bruce, Winnipeg, Manitoba From nuri at NUSVIRTUAL.COM Wed Apr 27 00:19:35 2005 From: nuri at NUSVIRTUAL.COM (Nuri) Date: Wed, 27 Apr 2005 02:19:35 -0500 Subject: How to create a .shp Message-ID: I need to create my own .shp file Is there any programme (better if it is free) that let me create new shapes? I found Shape Viewer but it is not very useful. From bill at BINKO.NET Wed Apr 27 00:29:59 2005 From: bill at BINKO.NET (Bill Binko) Date: Wed, 27 Apr 2005 03:29:59 -0400 Subject: How to create a .shp In-Reply-To: Message-ID: You'll get lots of answers on this, but I've found that (since I'm good at RDBMS and not at GIS), I've had good luck with taking the data, loading it into PostGIS and then using psql2shp to pull it back out. I've found I can manipulate it pretty easily there, and when it comes out, its nice ans speedy. Bill On Wed, 27 Apr 2005, Nuri wrote: > I need to create my own .shp file > > Is there any programme (better if it is free) that let me create new > shapes? > > I found Shape Viewer but it is not very useful. > > From vberre at GI-PARIS.COM Wed Apr 27 01:25:44 2005 From: vberre at GI-PARIS.COM (Virginie Berre) Date: Wed, 27 Apr 2005 03:25:44 -0500 Subject: Pb : nothing rendered with WMS Client Message-ID: -Sorry if it's the third time you read this message but I haven't receive a copy so I think you don't too...- Dear List, I'm a new French MapServer user! I try to create a map file (WMS client) which will request my WMS server GeoServer bur it doesn't work... Nothing is rendered on the browser I have the same problem when I try to request an internet WMS server. It's strange because when I create a map file (WMS Server) which does the same, it works... My config is: ./mapserv -v MapServer version 4.4.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER INPUT=TIFF INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE I let you see the wms client map file (geoserverwms.map) and my wms server map file (mywms.map). I hope you?ll find the error! Thanks! Best regards, Virginie Berre G?n?rale d'Infographie ZA Les Erables - B?timent 4 66, route de Sartrouville - F-78232 - LE PECQ cedex T?l : (33) (0)1.30.15.40.50 - Fax : (33) (0)1.30.15.40.60 mailto:vberre at gi-paris.com http://www.generale-infographie.fr/ From vberre at GI-PARIS.COM Wed Apr 27 01:29:37 2005 From: vberre at GI-PARIS.COM (Virginie Berre) Date: Wed, 27 Apr 2005 03:29:37 -0500 Subject: Pb : nothing rendered with WMS Client (with the files....) Message-ID: -Sorry if it's the third time you read this message but I haven't receive a copy so I think you don't too...- Dear List, I'm a new French MapServer user! I try to create a map file (WMS client) which will request my WMS server GeoServer bur it doesn't work... Nothing is rendered on the browser I have the same problem when I try to request an internet WMS server. It's strange because when I create a map file (WMS Server) which does the same, it works... My config is: ./mapserv -v MapServer version 4.4.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER INPUT=TIFF INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE I let you see the wms client map file (geoserverwms.map) and my wms server map file (mywms.map). I hope you?ll find the error! Thanks! Best regards, Virginie Berre G?n?rale d'Infographie ZA Les Erables - B?timent 4 66, route de Sartrouville - F-78232 - LE PECQ cedex T?l : (33) (0)1.30.15.40.50 - Fax : (33) (0)1.30.15.40.60 mailto:vberre at gi-paris.com http://www.generale-infographie.fr/ _____________________________________________________________________ geoserverwms.map : MAP IMAGETYPE png EXTENT -180 -90 180 90 SIZE 600 400 IMAGECOLOR 200 200 200 WEB IMAGEPATH '/tmp/' END PROJECTION "init=epsg:4326" END # Start of LAYER DEFINITIONS --------------------------------------------- LAYER NAME "Country" TYPE RASTER STATUS ON CONNECTIONTYPE WMS CONNECTION "http://localhost:8082/geoserver/wms?" METADATA "wms_name" "myns:country" "wms_request" "GetMap" "wms_onlineresource" "http://localhost:8082/geoserver/wms?" "wms_server_version" "1.1.1" "wms_srs" "EPSG:4326" "wms_formatlist" "image/png" "wms_format" "image/png" END PROJECTION "init=epsg:4326" END END # End of LAYER DEFINITIONS ------------------------------- END # end of map file/object ________________________________________________________________ mywms.map MAP NAME "DEMO" IMAGECOLOR 255 255 255 EXTENT -180 -90 180 90 SIZE 600 400 WEB METADATA "wms_title" "WMS Demo Server" "wms_onlineresource" "http://localhost/cgi-bin/mapserv?map=mywms.map&" "wms_srs" "EPSG:4326" END IMAGEPATH '/tmp/' END PROJECTION "init=epsg:4326" END LAYER NAME "Country" TYPE RASTER STATUS ON METADATA "wms_title" "Country" "wms_onlineresource" "http://localhost/cgi-bin/mapserv?map=mywms.map&" END CONNECTIONTYPE WMS CONNECTION "http://localhost:8082/geoserver/wms?" METADATA "wms_name" "myns:country" "wms_request" "GetMap" "wms_onlineresource" "http://localhost:8082/geoserver/wms?" "wms_server_version" "1.1.1" "wms_srs" "EPSG:4326" "wms_latlonboundingbox" "-180 -90 180 90" "wms_formatlist" "image/png" "wms_format" "image/png" END PROJECTION "init=epsg:4326" END END END From ferencik.ioan at PERSONAL.RO Wed Apr 27 02:04:56 2005 From: ferencik.ioan at PERSONAL.RO (Ferencik Ioan) Date: Wed, 27 Apr 2005 12:04:56 +0300 Subject: html legend question Message-ID: Hi everyone, can anyoane give me an idea about how to create a legend where the status of layers can be controlled with checkboxes both from layer's checbox and all layers from legendgroup checkbox. Any help is appreciated ___________________________ Cv-ul tau ia 500 euro/luna! http://500.myjob.ro From ttsai at POBOX.COM Wed Apr 27 02:32:44 2005 From: ttsai at POBOX.COM (Tim Tsai) Date: Wed, 27 Apr 2005 04:32:44 -0500 Subject: Relationship between Unit dd and MAX/MINSCALE Message-ID: Hello. I have a map file that uses UNIT DD (decimal degrees) but I can't quite figure out exactly what unit the MAXSCALE/MINSCALE keywords use. For example, MINSCALE 100000 seems to be more than 3.2 miles but less than 6.4 miles. Thanks, Tim From ttsai at POBOX.COM Wed Apr 27 02:43:35 2005 From: ttsai at POBOX.COM (Tim Tsai) Date: Wed, 27 Apr 2005 04:43:35 -0500 Subject: tiling shape files, or shptree In-Reply-To: <20050426203819.GB31423@vishnu.tridity.org> Message-ID: On Tue, Apr 26, 2005 at 01:38:19PM -0700, Schuyler Erle wrote: > You want Steve Woodbridge's shp2tile. Use the quadtree mode, works > great. > > http://swoodbridge.com/tools/ > > Then use ogrtindex to generate a tile index for MapServer. Running > shptree on both the tiles and the index can't hurt. Is there a significant performance difference between using shptree/tileindex and shp2tile/tile2index? Since shptree already uses quadtrees, I imagine the main performance difference is to minimize seeks on the data? Thanks, Tim From lluisgm at GMAIL.COM Wed Apr 27 02:48:13 2005 From: lluisgm at GMAIL.COM (=?ISO-8859-1?Q?Llu=EDs_Garcia_i_Mestres?=) Date: Wed, 27 Apr 2005 11:48:13 +0200 Subject: query in a new window Message-ID: Hi, I was following different examples to pop-up a new window when a query is done but it doesn?t work. I'm using jBox and I just want to open a specific windows for the query, having visible the map at the same time. Llu?s From edmar.moretti at MMA.GOV.BR Wed Apr 27 04:28:51 2005 From: edmar.moretti at MMA.GOV.BR (Edmar Moretti) Date: Wed, 27 Apr 2005 08:28:51 -0300 Subject: dynamically change reference map image In-Reply-To: <200504261143.10270.dylan@iici.no-ip.org> Message-ID: can you try include into the html : may be it works On 26 Apr 2005 at 11:43, Dylan Beaudette wrote: > Edmar, > > thanks for the tip... > > however, this does not seem to change the reference image... > > any ideas on what might be preventing this from working? > > i am using the DHTML interface developed my UMN. > > thanks! > > On Tuesday 26 April 2005 04:13 am, Edmar Moretti wrote: > > You can use the url to set the reference image: > > &map_reference_image=path_to_image > > > > On 22 Apr 2005 at 14:42, Dylan Beaudette wrote: > > > Hi everyone > > > > > > is it possible to dynamically set the properties of the REFERENCE object > > > in a map file? > > > > > > for example, > > > > > > i would like to adjust my map file based on URL arguments: > > > > > > > > > REFERENCE > > > STATUS ON > > > IMAGE "%file_name%.png" > > > ... > > > > > > however, this does not work. if i manually enter the file name of the > > > reference image into the map file everything works ok... > > > > > > any ideas on this one? > > > > > > > > > -- > > > Dylan Beaudette > > > Soils and Biogeochemistry Graduate Group > > > University of California at Davis > > > 530.754.7341 > > > > -- > > Edmar Moretti > > Ge?grafo > > Minist?rio do Meio Ambiente > > Coordena??o Geral de Tecnologia da Informa??o > > fone: (61) - 4009-1233 > > http://mapas.mma.gov.br/mapas > > masn: edmarmoretti at hotmail.com > > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group > University of California at Davis > 530.754.7341 -- Edmar Moretti Ge?grafo Minist?rio do Meio Ambiente Coordena??o Geral de Tecnologia da Informa??o fone: (61) - 4009-1233 http://mapas.mma.gov.br/mapas masn: edmarmoretti at hotmail.com From steve at STAFF.PIPENETWORKS.COM Wed Apr 27 05:10:13 2005 From: steve at STAFF.PIPENETWORKS.COM (Stephen Baxter) Date: Wed, 27 Apr 2005 22:10:13 +1000 Subject: Using multiple label column in a label Message-ID: Hello, I have mapserver working using the excellent MS4W setup - just to see how it flies. It flies well - thanks for this excellent project. I was wondering if it was possible to use multiple fields to make up a label ? Say I have the following in a DBF (effectively): ID DESCRIPTION OWNER 1 BLUE FRED 2 RED FRED 3 PINK OWEN I want to be able to make a label that reads : FRED (BLUE) Can mapserver do this or do we need to do some column manipulation prior to using the dbf ? Cheers, SB From jdport at VERITIME.COM Wed Apr 27 05:30:11 2005 From: jdport at VERITIME.COM (Jeff Portwine) Date: Wed, 27 Apr 2005 08:30:11 -0400 Subject: different tiling methods Message-ID: Hi Everybody, I have a general question for my own education, it doesn't directly pertain to anything I'm working on right now. I was just wondering if anybody could explain to me the difference in different ways of tiling map images? In my current project, I had several large layers such as road layers and water layers that I tiled in order to make them faster and more resource friendly... The method I used was: -tile4ms (where data.txt is a list of all the shapefiles being included in the tiling, since tiger data comes in about a zillion files) -shptree -cat | xargs -n 1 shptree The way I understand it, this combines all the pieces into one shapefile, tiles them, and spatially indexes them... is that correct? In a recent post I also saw a pointer to Steve Woodbridge's shp2tile utility which it seems does much the same thing... the main difference being from the sounds of it that it doesn't put a lot of shapefiles together, but rather splits a single large shapefile into tiles and then indexes them. How is this different from the first method, and how does it affect resources and rendering speed? Or is the only real difference the one I noted where you are sticking multiple shapefiles together one way and only using one original shapefile the other way? Are there other methods of tiling that behave differently or that you might use for different situations? Thanks everybody, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tom.Kralidis at EC.GC.CA Wed Apr 27 05:40:01 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Wed, 27 Apr 2005 08:40:01 -0400 Subject: CGI mode and Web Map Context Message-ID: Hi, A couple of questions when using CGI mode MapServer and WMC. Here is an example URL: http://devgeo.cciw.ca/cgi-bin/mapserv/mapserv?map=/usr/local/wwwsites/ap ache/devgeo.cciw.ca/apps/mapserv/apps/basicviewer/config.map&context=htt p://devgeo.cciw.ca/ms_tmp/wqm_loc.cml 1./ If you check out the WMC doc (http://devgeo.cciw.ca/) you'll see that all layers have a Layer/@hidden value of 0, which means they should be visible. However it appears that one must explicitly call these layers via LAYERS in the CGI URL, i.e.: http://devgeo.cciw.ca/cgi-bin/mapserv/mapserv?map=/usr/local/wwwsites/ap ache/devgeo.cciw.ca/apps/mapserv/apps/basicviewer/config.map&context=htt p://devgeo.cciw.ca/ms_tmp/wqm_loc.cml&layers=wa_7.5m& I can see why this is the case, however I would imagine it would be more intuitive if, when no LAYERS parameters are set, to return the WMC as it was intended to be viewed? 2./ How does the WMC get marshalled in CGI mode? i.e. I'm trying to use the HTML legend approach to build a legend. I'd like to pick up the LegendURL, MetadataURL and Title from the Layer element to populate the legend. At any rate, kudos to the developers for adding this functionality, which allows for a *very* light standards-based client. Cheers ..Tom From jdport at VERITIME.COM Wed Apr 27 05:40:57 2005 From: jdport at VERITIME.COM (Jeff Portwine) Date: Wed, 27 Apr 2005 08:40:57 -0400 Subject: Using multiple label column in a label Message-ID: You could edit the DBF. I don't know if you are using mapscript or mapserver, but I know another way you could do it would be to use mapscript to read the values from the columns you need for your label and create a new variable that formats the data how you want it to appear, and then set the label to use that variable for its text. This is clipped out of an email where Steve Woodbridge answered a similar question of mine: set the CLASS -> TEXT -> value to the string you want output. so something like: $oClass->set("text", $mytext); should do it. Hope that helps, Jeff From ed at TOPOZONE.COM Wed Apr 27 06:01:03 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Wed, 27 Apr 2005 09:01:03 -0400 Subject: different tiling methods Message-ID: Jeff - No, actually, those tools don't work that way at all . tile4ms creates a new, separate tile index shapefile. It does not combine shapefiles into one shapefile. Each input shapefile has its bounding box retrieved, and a rectangular polygon is created in the new tile index shapefile. If you started with N shapefiles you now have N+1 shapefiles - all the originals and the index file. Let's say each original shapefile contained data for a particular country. If you wanted to create a map showing every country, you would have to create a few hundred separate layers then group them together. By creating a tile index layer, you can take a large number (or small number) of separate shapefiles and treat them AS IF they were one single large shapefile - but they're not. This is the primary benefit of a tile index. IF your data in the separate files are relatively constrained to rectangular regions, then the tile index also will offer you a performance improvement. It's like a new top-level index for your data. If you're looking at a large-scale map of Europe, the tile index file will immediately discard any of those input country files whose rectangular bounding boxes do not overlap the output map area. Most of the input country files will never be opened - only the few files that might possibly contribute to the output map are opened and read. For large data sets this improves performance. Steve's shp2tile utility helps to create such an appropriate set of input files, by taking a single large input shapefile and chopping it up into rectangular pieces. shptree creates a spatial quadtree index for a shapefile that makes it quicker to locate objects inside that file. This is virtually always a good idea, and easy to do. You may have to tune your data set sizes to get the right balance. The goal is to use the tile index file to quickly discard data that cannot possibly be needed for an output map request. If you end up rendering all the data, or opening all the files, it will do you no good at all. - Ed Ed McNierney TopoZone.com ________________________________ From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jeff Portwine Sent: Wednesday, April 27, 2005 8:30 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] different tiling methods Hi Everybody, I have a general question for my own education, it doesn't directly pertain to anything I'm working on right now. I was just wondering if anybody could explain to me the difference in different ways of tiling map images? In my current project, I had several large layers such as road layers and water layers that I tiled in order to make them faster and more resource friendly... The method I used was: -tile4ms (where data.txt is a list of all the shapefiles being included in the tiling, since tiger data comes in about a zillion files) -shptree -cat | xargs -n 1 shptree The way I understand it, this combines all the pieces into one shapefile, tiles them, and spatially indexes them... is that correct? In a recent post I also saw a pointer to Steve Woodbridge's shp2tile utility which it seems does much the same thing... the main difference being from the sounds of it that it doesn't put a lot of shapefiles together, but rather splits a single large shapefile into tiles and then indexes them. How is this different from the first method, and how does it affect resources and rendering speed? Or is the only real difference the one I noted where you are sticking multiple shapefiles together one way and only using one original shapefile the other way? Are there other methods of tiling that behave differently or that you might use for different situations? Thanks everybody, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From ed at TOPOZONE.COM Wed Apr 27 06:02:56 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Wed, 27 Apr 2005 09:02:56 -0400 Subject: Relationship between Unit dd and MAX/MINSCALE Message-ID: Tim - If your units are DDs, you cannot express them in miles - it's meaningless, since the distance between any two points on such a map (in miles) depends on the latitude of the map and the angle of the distance being measured. This is one of the reasons using "geographic" output projections for maps is, IMHO, a very poor practice that seems to be infesting the Web mapping world. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Tim Tsai Sent: Wednesday, April 27, 2005 5:33 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] Relationship between Unit dd and MAX/MINSCALE Hello. I have a map file that uses UNIT DD (decimal degrees) but I can't quite figure out exactly what unit the MAXSCALE/MINSCALE keywords use. For example, MINSCALE 100000 seems to be more than 3.2 miles but less than 6.4 miles. Thanks, Tim From jdport at VERITIME.COM Wed Apr 27 06:15:47 2005 From: jdport at VERITIME.COM (Jeff Portwine) Date: Wed, 27 Apr 2005 09:15:47 -0400 Subject: different tiling methods Message-ID: Ahh thank you for the explanation... I guess functionally it was doing just what I wanted it to do but I was thinking about how it was doing it in completely the wrong way. Thanks for the explanation. -Jeff ----- Original Message ----- From: Ed McNierney To: Jeff Portwine ; MAPSERVER-USERS at LISTS.UMN.EDU Sent: Wednesday, April 27, 2005 9:01 AM Subject: RE: [UMN_MAPSERVER-USERS] different tiling methods Jeff - No, actually, those tools don't work that way at all . tile4ms creates a new, separate tile index shapefile. It does not combine shapefiles into one shapefile. Each input shapefile has its bounding box retrieved, and a rectangular polygon is created in the new tile index shapefile. If you started with N shapefiles you now have N+1 shapefiles - all the originals and the index file. Let's say each original shapefile contained data for a particular country. If you wanted to create a map showing every country, you would have to create a few hundred separate layers then group them together. By creating a tile index layer, you can take a large number (or small number) of separate shapefiles and treat them AS IF they were one single large shapefile - but they're not. This is the primary benefit of a tile index. IF your data in the separate files are relatively constrained to rectangular regions, then the tile index also will offer you a performance improvement. It's like a new top-level index for your data. If you're looking at a large-scale map of Europe, the tile index file will immediately discard any of those input country files whose rectangular bounding boxes do not overlap the output map area. Most of the input country files will never be opened - only the few files that might possibly contribute to the output map are opened and read. For large data sets this improves performance. Steve's shp2tile utility helps to create such an appropriate set of input files, by taking a single large input shapefile and chopping it up into rectangular pieces. shptree creates a spatial quadtree index for a shapefile that makes it quicker to locate objects inside that file. This is virtually always a good idea, and easy to do. You may have to tune your data set sizes to get the right balance. The goal is to use the tile index file to quickly discard data that cannot possibly be needed for an output map request. If you end up rendering all the data, or opening all the files, it will do you no good at all. - Ed Ed McNierney TopoZone.com ------------------------------------------------------------------------------ From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jeff Portwine Sent: Wednesday, April 27, 2005 8:30 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] different tiling methods Hi Everybody, I have a general question for my own education, it doesn't directly pertain to anything I'm working on right now. I was just wondering if anybody could explain to me the difference in different ways of tiling map images? In my current project, I had several large layers such as road layers and water layers that I tiled in order to make them faster and more resource friendly... The method I used was: -tile4ms (where data.txt is a list of all the shapefiles being included in the tiling, since tiger data comes in about a zillion files) -shptree -cat | xargs -n 1 shptree The way I understand it, this combines all the pieces into one shapefile, tiles them, and spatially indexes them... is that correct? In a recent post I also saw a pointer to Steve Woodbridge's shp2tile utility which it seems does much the same thing... the main difference being from the sounds of it that it doesn't put a lot of shapefiles together, but rather splits a single large shapefile into tiles and then indexes them. How is this different from the first method, and how does it affect resources and rendering speed? Or is the only real difference the one I noted where you are sticking multiple shapefiles together one way and only using one original shapefile the other way? Are there other methods of tiling that behave differently or that you might use for different situations? Thanks everybody, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.greenwood at GMAIL.COM Wed Apr 27 06:20:51 2005 From: richard.greenwood at GMAIL.COM (Richard Greenwood) Date: Wed, 27 Apr 2005 13:20:51 +0000 Subject: =?utf-8?b?W1VNTl9NQVBTRVJWRVItVVNFUlNd?= query in a new window Message-ID: Llu?s Garcia i Mestres GMAIL.COM> writes: > > Hi, > > I was following different examples to pop-up a new window when a query > is done but it doesn?t work. I'm using jBox and I just want to open a > specific windows for the query, having visible the map at the same > time. > > Llu?s > > Use the javascript window.open() method. Example code: var uri; uri="/chg-bin/mapserv.exe?map=myMap.map&mapext=shapes &mode=nquery&template=tc.html"; uri+="&imgext=" + document.form1.imgext.value; uri+="&imgxy=" + document.form1.imgxy.value; uri+="&imgbox="+document.form1.imgbox.value; infoWin = window.open(uri, "info", "width=375,height=400,resizable=yes,scrollbars=yes"); infoWin.focus(); Richard Greenwood From richard.greenwood at GMAIL.COM Wed Apr 27 06:24:53 2005 From: richard.greenwood at GMAIL.COM (Richard Greenwood) Date: Wed, 27 Apr 2005 13:24:53 +0000 Subject: =?utf-8?b?W1VNTl9NQVBTRVJWRVItVVNFUlNd?= dynamically change reference map image Message-ID: > > > On 22 Apr 2005 at 14:42, Dylan Beaudette wrote: > Hi everyone > is it possible to dynamically set the properties of the REFERENCE object > in a map file? > for example, > i would like to adjust my map file based on URL arguments: > REFERENCE > STATUS ON > IMAGE "%file_name%.png" > ... Have you set the DATAPATTERN? See: http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#map Richard Greenwood From rashed_muhammad at MSN.COM Wed Apr 27 06:38:33 2005 From: rashed_muhammad at MSN.COM (Rashed Muhammad) Date: Wed, 27 Apr 2005 14:38:33 +0100 Subject: New to MapServer Message-ID: Hi I managed to install Apache http server 2.0, Mapserver and PHP. My mapserver is working fine so as Apache and PHP. I tried to install Itasca demo map interface. Now when I click on the Initialise button it asks me to run or save and after pressing run again prompts me to run or cancel and after pressing run button I get a blank dos screen for one second and nothing happens after that. Anyone can please help I am new to mapServer. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From fanenji63 at LIBERO.IT Wed Apr 27 08:26:26 2005 From: fanenji63 at LIBERO.IT (Stefano Parodi) Date: Wed, 27 Apr 2005 10:26:26 -0500 Subject: difference between php/mapscript and mapfile extents Message-ID: I have noticed a different behavour if I set the extents of the map in php (via the $map->setExtent) or if I use the EXTENT defined in the mapfile. If I use the mapscript method the generated map contain a "buffer" around the extent while using the extent in the mapfile the image generated is correct. The EXTENT in the map file is as follow (in Gauss-Boaga coord. system) EXTENT 1378000 4828166 1586000 4966833 The php code is: $map->setExtent(1378000,4828166,1586000,4966833) For both the size of the map is 600*400 pixels. Is there any form of "buffer" or border that the setextent method apply? Thank. Stefano From mercutio at POBOX.COM Wed Apr 27 08:32:46 2005 From: mercutio at POBOX.COM (Aaron Craig) Date: Wed, 27 Apr 2005 17:32:46 +0200 Subject: Changing symbol icon on the fly Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Using mapscript (perl, but any generic example will do) what's the preferred way to change the icon of a point, in a layer that is defined as follows: LAYER ~ NAME "musei" ~ TYPE POINT ~ STATUS OFF ~ CONNECTION 'user=tsc2 password=tsc2 dbname=geo_sardegna' ~ CONNECTIONTYPE POSTGIS ~ DATA 'the_point from musei' ~ CLASS ~ NAME "musei" ~ STYLE ~ SYMBOL "/var/www/OpenPortal/htdocs/confartigianato/Images/icona_small.gif" ~ SIZE 10 ~ COLOR 0 0 0 ~ END END I'm doing my $lyrPoints = $map->getLayerByName($sLayerName); $lyrPoints->{status} = $mapscript::MS_ON; my $cls = $lyrPoints->getClass(0); # change this if we ever use layers with more than one class my $stl = $cls->getStyle(0); # change this if we ever use classes with more than one style my $nSymbolIndex = $stl->{symbol}; my $sym = $map->{symbolset}->getSymbol($nSymbolIndex); $sym->{imagepath} = "/var/www/OpenPortal/htdocs/confartigianato/Images/$sLayerName.gif"; my $pnt = mapscript::pointObj->new(); $pnt->{x} = $x; $pnt->{y} = $y; $pnt->draw($map, $lyrPoints, $img, undef, $label); but the image on the point remains the same as is declared in the mapfile. - -- Aaron Craig mercutio at pobox.com =========================================================== Get Firefox! http://www.spreadfirefox.com/?q=affiliates&id=0&t=1 =========================================================== - -=-=- I come to wive it wealthily in Padua; If wealthily, then happily in Padua. --The Taming of the Shrew, I:2 - -=-=- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCb7CeoyEQRcU83p4RAlyGAJ4yVsE4Ph9zHj9L7Cpb5ZrUfDzGKACgjE5I c4AF+i6jGSdujqmhWLcc6P8= =QVmx -----END PGP SIGNATURE----- From ttsai at POBOX.COM Wed Apr 27 08:35:22 2005 From: ttsai at POBOX.COM (Tim) Date: Wed, 27 Apr 2005 10:35:22 -0500 Subject: Relationship between Unit dd and MAX/MINSCALE In-Reply-To: <4BF377919225F449BB097CB76FFE9BC81883A2@ptolemy.topozone.com> Message-ID: On Wed, Apr 27, 2005 at 09:02:56AM -0400, Ed McNierney wrote: > If your units are DDs, you cannot express them in miles - it's > meaningless, since the distance between any two points on such a map (in > miles) depends on the latitude of the map and the angle of the distance > being measured. Hmmm, does that mean my scalebar is meaningless? Note that in this case, I am referring to latitude only so technically I am only talking about the horizontal distance and the distortion should be minimal. > This is one of the reasons using "geographic" output > projections for maps is, IMHO, a very poor practice that seems to be > infesting the Web mapping world. Should I be using an equidistance projection then? That's normally OK except I am overlaying some information outside of MapServer that's unprojected. Thanks, Tim From ttsai at POBOX.COM Wed Apr 27 08:47:42 2005 From: ttsai at POBOX.COM (Tim Tsai) Date: Wed, 27 Apr 2005 10:47:42 -0500 Subject: different tiling methods In-Reply-To: <009901c54b2b$4bc5fa70$1bf2fbd0@solo> Message-ID: I had asked the same question earlier in the shp2tile thread. My guess is that if you are already using shptree and tileindex, shp2tile will give you some performance advantage but not significantly so. The main thing that shp2tile does is to balance out your data so you take advantage of the underlying cluster effect. shp2tile WOULD have a huge performance advantage if you are not using shptree on the underlying shapefiles though. I could be wrong but that appears to me the difference. Tim From cdaily at GMAIL.COM Wed Apr 27 08:55:59 2005 From: cdaily at GMAIL.COM (Camden Daily) Date: Wed, 27 Apr 2005 10:55:59 -0500 Subject: Relationship between Unit dd and MAX/MINSCALE In-Reply-To: <20050427153522.GB3889@sleepy.wojomedia.com> Message-ID: > Hmmm, does that mean my scalebar is meaningless? Note that in this > case, I am referring to latitude only so technically I am only talking > about the horizontal distance and the distortion should be minimal. I'm pretty certain that the scalebar will be just fine. Mapserver is able to deal with the changing lat/long distances. > Should I be using an equidistance projection then? That's normally > OK except I am overlaying some information outside of MapServer > that's unprojected. Depends on what you're trying to do. We use geographic projections for all of our layers, and things work just fine. While I can see that the geographic projection can be slightly confusing in that the points are not always equidistant, they still work fine for most applications (especially when you're only dealing with limited coverage areas). Camden Daily Prudential Preferred Properties http://www.prupref.com From sgillies at FRII.COM Wed Apr 27 08:59:29 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Wed, 27 Apr 2005 09:59:29 -0600 Subject: Changing symbol icon on the fly In-Reply-To: Message-ID: On Apr 27, 2005, at 9:32 AM, Aaron Craig wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Using mapscript (perl, but any generic example will do) what's the > preferred way to change the icon of a point, in a layer that is defined > as follows: > > LAYER > ~ NAME "musei" > ~ TYPE POINT > ~ STATUS OFF > > ~ CONNECTION 'user=tsc2 password=tsc2 dbname=geo_sardegna' > ~ CONNECTIONTYPE POSTGIS > ~ DATA 'the_point from musei' > > ~ CLASS > ~ NAME "musei" > ~ STYLE > ~ SYMBOL > "/var/www/OpenPortal/htdocs/confartigianato/Images/icona_small.gif" > ~ SIZE 10 > ~ COLOR 0 0 0 > ~ END > END > > > I'm doing > > my $lyrPoints = $map->getLayerByName($sLayerName); > > $lyrPoints->{status} = $mapscript::MS_ON; > my $cls = $lyrPoints->getClass(0); # change this if we ever use layers > with more than one class > my $stl = $cls->getStyle(0); # change this if we ever use classes with > more than one style > my $nSymbolIndex = $stl->{symbol}; > > my $sym = $map->{symbolset}->getSymbol($nSymbolIndex); > $sym->{imagepath} = > "/var/www/OpenPortal/htdocs/confartigianato/Images/$sLayerName.gif"; > > [snip] Aaron, Symbols are more static than dynamic. You can't mutate their imagepath like that. You can, however modify your map's symbolset so that it contains custom symbols: # create and add a new symbol layer_name = 'foo' symbol_path = '/path/to/foo/symbol.gif' new_symbol = mapscript.symbolObj(layer_name, symbol_path) new_index = map.symbolset.appendSymbol(new_symbol) # assign this new symbol to the styleObj style.symbol = new_index Check out these URLs for more details on symbols and symbolsets http://zcologia.com/mapserver/mapscript#symbolsetobj http://zcologia.com/mapserver/mapscript#symbolobj cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From ed at TOPOZONE.COM Wed Apr 27 09:29:52 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Wed, 27 Apr 2005 12:29:52 -0400 Subject: Relationship between Unit dd and MAX/MINSCALE Message-ID: Tim - I do not know how MapServer calculates a scalebar in linear units (feet, meters, miles, etc.) from data that's in ellipsoidal coordinates. I have no idea whether it's doing the right thing for your particular case. You might be able to easily test it by viewing data at different latitudes - if the scalebar doesn't change, it's not working. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Tim Sent: Wednesday, April 27, 2005 11:35 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Relationship between Unit dd and MAX/MINSCALE On Wed, Apr 27, 2005 at 09:02:56AM -0400, Ed McNierney wrote: > If your units are DDs, you cannot express them in miles - it's > meaningless, since the distance between any two points on such a map > (in > miles) depends on the latitude of the map and the angle of the > distance being measured. Hmmm, does that mean my scalebar is meaningless? Note that in this case, I am referring to latitude only so technically I am only talking about the horizontal distance and the distortion should be minimal. > This is one of the reasons using "geographic" output projections for > maps is, IMHO, a very poor practice that seems to be infesting the Web > mapping world. Should I be using an equidistance projection then? That's normally OK except I am overlaying some information outside of MapServer that's unprojected. Thanks, Tim From pspencer at DMSOLUTIONS.CA Wed Apr 27 09:53:08 2005 From: pspencer at DMSOLUTIONS.CA (Paul Spencer) Date: Wed, 27 Apr 2005 12:53:08 -0400 Subject: Relationship between Unit dd and MAX/MINSCALE In-Reply-To: <4BF377919225F449BB097CB76FFE9BC81883A7@ptolemy.topozone.com> Message-ID: I believe that MapServer uses an approximation based on the length of a degree at the equator when using a geographic projection, which means that the latitude will not affect your scalebar and it will be increasing inaccurate the further south/north you get. I believe some tests were done by Daniel to use a great circle calculation to get a more accurate number based on current latitude but the results were inconclusive as to whether it was actually more or less accurate this way. Paul Ed McNierney wrote: > Tim - > > I do not know how MapServer calculates a scalebar in linear units (feet, > meters, miles, etc.) from data that's in ellipsoidal coordinates. I > have no idea whether it's doing the right thing for your particular > case. > > You might be able to easily test it by viewing data at different > latitudes - if the scalebar doesn't change, it's not working. > > - Ed > > Ed McNierney > President and Chief Mapmaker > TopoZone.com / Maps a la carte, Inc. > 73 Princeton Street, Suite 305 > North Chelmsford, MA 01863 > Phone: +1 (978) 251-4242 > Fax: +1 (978) 251-1396 > ed at topozone.com > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On > Behalf Of Tim > Sent: Wednesday, April 27, 2005 11:35 AM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Relationship between Unit dd and > MAX/MINSCALE > > On Wed, Apr 27, 2005 at 09:02:56AM -0400, Ed McNierney wrote: > >>If your units are DDs, you cannot express them in miles - it's >>meaningless, since the distance between any two points on such a map >>(in >>miles) depends on the latitude of the map and the angle of the >>distance being measured. > > > Hmmm, does that mean my scalebar is meaningless? Note that in this > case, I am referring to latitude only so technically I am only talking > about the horizontal distance and the distortion should be minimal. > > >>This is one of the reasons using "geographic" output projections for >>maps is, IMHO, a very poor practice that seems to be infesting the Web > > >>mapping world. > > > Should I be using an equidistance projection then? That's normally OK > except I am overlaying some information outside of MapServer that's > unprojected. > > Thanks, > > Tim > > -- +-----------------------------------------------------------------+ |Paul Spencer pspencer at dmsolutions.ca | +-----------------------------------------------------------------+ |Applications & Software Development | |DM Solutions Group Inc http://www.dmsolutions.ca/| +-----------------------------------------------------------------+ From schuyler at NOCAT.NET Wed Apr 27 09:55:47 2005 From: schuyler at NOCAT.NET (Schuyler Erle) Date: Wed, 27 Apr 2005 09:55:47 -0700 Subject: tiling shape files, or shptree In-Reply-To: <20050427094335.GB31743@sleepy.wojomedia.com> Message-ID: * On 27-Apr-2005 at 2:44AM PDT, Tim Tsai said: > > Is there a significant performance difference between using > shptree/tileindex and shp2tile/tile2index? Since shptree already uses > quadtrees, I imagine the main performance difference is to minimize > seeks on the data? My experience is that MapServer doesn't scale well with large shapefiles, even when quadtrees are built. I would like to know why that is, personally, but I can attest that shp2tile + tileindex scales much better with large datasets. SDE From ed at TOPOZONE.COM Wed Apr 27 10:27:13 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Wed, 27 Apr 2005 13:27:13 -0400 Subject: Relationship between Unit dd and MAX/MINSCALE Message-ID: Paul - Thanks; I don't think it's worth attempting to fix something that's unfixable. As one moves further from the equator, not only does the size of a degree of longitude change, but any actual measurement becomes more and more dependent on the angle of the line measured, since the difference between the size of a degree of latitude and a degree of longitude grows. We've had map projections for about two millenia or so, and there's a reason for that . - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Paul Spencer Sent: Wednesday, April 27, 2005 12:53 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Relationship between Unit dd and MAX/MINSCALE I believe that MapServer uses an approximation based on the length of a degree at the equator when using a geographic projection, which means that the latitude will not affect your scalebar and it will be increasing inaccurate the further south/north you get. I believe some tests were done by Daniel to use a great circle calculation to get a more accurate number based on current latitude but the results were inconclusive as to whether it was actually more or less accurate this way. Paul Ed McNierney wrote: > Tim - > > I do not know how MapServer calculates a scalebar in linear units > (feet, meters, miles, etc.) from data that's in ellipsoidal > coordinates. I have no idea whether it's doing the right thing for > your particular case. > > You might be able to easily test it by viewing data at different > latitudes - if the scalebar doesn't change, it's not working. > > - Ed > > Ed McNierney > President and Chief Mapmaker > TopoZone.com / Maps a la carte, Inc. > 73 Princeton Street, Suite 305 > North Chelmsford, MA 01863 > Phone: +1 (978) 251-4242 > Fax: +1 (978) 251-1396 > ed at topozone.com > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] > On Behalf Of Tim > Sent: Wednesday, April 27, 2005 11:35 AM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Relationship between Unit dd and > MAX/MINSCALE > > On Wed, Apr 27, 2005 at 09:02:56AM -0400, Ed McNierney wrote: > >>If your units are DDs, you cannot express them in miles - it's >>meaningless, since the distance between any two points on such a map >>(in >>miles) depends on the latitude of the map and the angle of the >>distance being measured. > > > Hmmm, does that mean my scalebar is meaningless? Note that in this > case, I am referring to latitude only so technically I am only talking > about the horizontal distance and the distortion should be minimal. > > >>This is one of the reasons using "geographic" output projections for >>maps is, IMHO, a very poor practice that seems to be infesting the Web > > >>mapping world. > > > Should I be using an equidistance projection then? That's normally > OK except I am overlaying some information outside of MapServer that's > unprojected. > > Thanks, > > Tim > > -- +-----------------------------------------------------------------+ |Paul Spencer pspencer at dmsolutions.ca | +-----------------------------------------------------------------+ |Applications & Software Development | |DM Solutions Group Inc http://www.dmsolutions.ca/| +-----------------------------------------------------------------+ From dylan at IICI.NO-IP.ORG Wed Apr 27 11:35:59 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Wed, 27 Apr 2005 18:35:59 +0000 Subject: tiling shape files, or shptree [resolved] In-Reply-To: <20050427165547.GF31423@vishnu.tridity.org> Message-ID: On Wednesday 27 April 2005 04:55 pm, Schuyler Erle wrote: > * On 27-Apr-2005 at 2:44AM PDT, Tim Tsai said: > > Is there a significant performance difference between using > > shptree/tileindex and shp2tile/tile2index? Since shptree already uses > > quadtrees, I imagine the main performance difference is to minimize > > seeks on the data? > > My experience is that MapServer doesn't scale well with large > shapefiles, even when quadtrees are built. I would like to know why > that is, personally, but I can attest that shp2tile + tileindex scales > much better with large datasets. > > SDE Thanks to everyone for their input. After using Steve's great shp2tile program, AND building quadtree indexes on all of the resulting shape files, I have noticed a very large improvement in map rendering speed. One small note: Steve - i might be a good idea to include a note on your webpage about shp2tile needing the libshp include files. thanks! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From dylan at IICI.NO-IP.ORG Wed Apr 27 11:37:41 2005 From: dylan at IICI.NO-IP.ORG (Dylan Beaudette) Date: Wed, 27 Apr 2005 18:37:41 +0000 Subject: [UMN_MAPSERVER-USERS] dynamically change reference map image In-Reply-To: Message-ID: On Wednesday 27 April 2005 01:24 pm, Richard Greenwood wrote: > > > > On 22 Apr 2005 at 14:42, Dylan Beaudette wrote: > > > > Hi everyone > > > > is it possible to dynamically set the properties of the REFERENCE object > > in a map file? > > > > for example, > > > > i would like to adjust my map file based on URL arguments: > > > > > > REFERENCE > > STATUS ON > > IMAGE "%file_name%.png" > > ... > > Have you set the DATAPATTERN? See: > http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#map > > Richard Greenwood I have tried all of the above suggestions, and nothing seems to work. For now, I am using a more general static reference map as a temporary fix. this was with mapserver 4.4.2 compiled from source on Debian/Testing. -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From ttsai at POBOX.COM Wed Apr 27 11:21:49 2005 From: ttsai at POBOX.COM (Tim Tsai) Date: Wed, 27 Apr 2005 13:21:49 -0500 Subject: tiling shape files, or shptree In-Reply-To: <20050427165547.GF31423@vishnu.tridity.org> Message-ID: On Wed, Apr 27, 2005 at 09:55:47AM -0700, Schuyler Erle wrote: > * On 27-Apr-2005 at 2:44AM PDT, Tim Tsai said: > > Is there a significant performance difference between using > > shptree/tileindex and shp2tile/tile2index? Since shptree already uses > > quadtrees, I imagine the main performance difference is to minimize > > seeks on the data? > > My experience is that MapServer doesn't scale well with large > shapefiles, even when quadtrees are built. I would like to know why > that is, personally, but I can attest that shp2tile + tileindex scales > much better with large datasets. Thanks. I am curious about that too. So far, I have not run into performance problems with shptree alone but I might try shp2tile and see if there's a noticeable difference. My guess would be similar to the difference between a pure b-tree and a balanced b-tree or even a b+-tree. Shp2tile keeps geographically related items together so you take advantage of the cluster effect and minimize the average seek times. A balanced tree will give you much more deterministic response where an unbalanced tree could potentially have very bad performance in degenerate cases. Thanks, Tim From ttsai at POBOX.COM Wed Apr 27 11:32:28 2005 From: ttsai at POBOX.COM (Tim Tsai) Date: Wed, 27 Apr 2005 13:32:28 -0500 Subject: Relationship between Unit dd and MAX/MINSCALE In-Reply-To: <4BF377919225F449BB097CB76FFE9BC81883AD@ptolemy.topozone.com> Message-ID: On Wed, Apr 27, 2005 at 01:27:13PM -0400, Ed McNierney wrote: > We've had map projections for about two millenia or so, and there's a > reason for that . I agree. Time to find my Snyder book again. As I said we're overlaying some unprojected data ontop of MapServer (unfortunately I can't do it from within MapServer) so we'd have to project in two separate applications. This still doesn't answer my question on exactly what is the correspondence between Unit dd and Scale Units, as far as Mapserver is concerned, but I guess I can Use The Source on this one. A quick check with Mapquest shows that at least in parts of New Jersey, the distance on the scalebar is roughly correct. Thanks, Tim From fwarmerdam at GMAIL.COM Wed Apr 27 11:48:07 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Wed, 27 Apr 2005 14:48:07 -0400 Subject: tiling shape files, or shptree In-Reply-To: <20050427182149.GA3233@sleepy.wojomedia.com> Message-ID: On 4/27/05, Tim Tsai wrote: > Thanks. I am curious about that too. So far, I have not run into > performance problems with shptree alone but I might try shp2tile and > see if there's a noticeable difference. > > My guess would be similar to the difference between a pure b-tree > and a balanced b-tree or even a b+-tree. Shp2tile keeps geographically > related items together so you take advantage of the cluster effect and > minimize the average seek times. A balanced tree will give you much > more deterministic response where an unbalanced tree could potentially > have very bad performance in degenerate cases. Tim / Schuyler, Yes, I've thought about that sometimes too. It might be helpful to have a tool that would would copy a shapefile in .qix traversal order. That is to reorder the features by locality as determined by the quadtree index. That might given the convenient managability of one big shapefile with the locality benefits of tiling. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From dbarron at DSWLLC.COM Wed Apr 27 12:10:37 2005 From: dbarron at DSWLLC.COM (Dan Barron) Date: Wed, 27 Apr 2005 12:10:37 -0700 Subject: Create a shapefile using Java Mapscript In-Reply-To: Message-ID: I seem to seeing the exact same issue with writing a shapefile of points via java mapscript - though at one point it did work. What's the trick to "closing" the shapfeilObj file in java mapscript? I am using ms 4.4.0 java mapscript. Thanks, Dan At 06:49 AM 4/21/2005, you wrote: >On Apr 21, 2005, at 6:43 AM, Libo Feng wrote: > >>I am a newbie to Java mapscript and in my project, I need to >>dynamically >>create a shape file that contains a point. The coordinate of that >>point is >>from an address matching web service. I am able to create the .shp, >>.shx >>files with the mapscript and a .dbf file with Javadbf. But the .shp >>and .shx >>seem to be empty - when I open it with ArcExplorer, there is no point >>at all. >> >>The following is the code: >> >>shapefileObj civicAddressShp = new shapefileObj(shapeFile, >> >>mapscriptConstants.MS_SHAPEFILE_POINT); >>pointObj addressPoint = new pointObj(x, y, 0.0, Double.MIN_VALUE); >>civicAddressShp.addPoint(addressPoint); >> >> >>Did I miss anything? Thanks! > >Yes, what you missed is that the point isn't written to the file on >disk until the shapefileObj is "closed". The only way to close it is >by triggering its destructor. It's awkward, but that's just the way it >is. > >cheers, >Sean > >-- >Sean Gillies >sgillies at frii dot com >http://users.frii.com/sgillies From sgillies at FRII.COM Wed Apr 27 12:21:58 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Wed, 27 Apr 2005 13:21:58 -0600 Subject: Create a shapefile using Java Mapscript In-Reply-To: Message-ID: On Apr 27, 2005, at 1:10 PM, Dan Barron wrote: > I seem to seeing the exact same issue with writing a shapefile of > points > via java mapscript - though at one point it did work. > > What's the trick to "closing" the shapfeilObj file in java mapscript? > I am > using ms 4.4.0 java mapscript. > > Thanks, > > Dan > > At 06:49 AM 4/21/2005, you wrote: >> On Apr 21, 2005, at 6:43 AM, Libo Feng wrote: >> >>> I am a newbie to Java mapscript and in my project, I need to >>> dynamically >>> create a shape file that contains a point. The coordinate of that >>> point is >>> from an address matching web service. I am able to create the .shp, >>> .shx >>> files with the mapscript and a .dbf file with Javadbf. But the .shp >>> and .shx >>> seem to be empty - when I open it with ArcExplorer, there is no point >>> at all. >>> >>> The following is the code: >>> >>> shapefileObj civicAddressShp = new shapefileObj(shapeFile, >>> >>> mapscriptConstants.MS_SHAPEFILE_POINT); >>> pointObj addressPoint = new pointObj(x, y, 0.0, Double.MIN_VALUE); >>> civicAddressShp.addPoint(addressPoint); >>> >>> >>> Did I miss anything? Thanks! >> >> Yes, what you missed is that the point isn't written to the file on >> disk until the shapefileObj is "closed". The only way to close it is >> by triggering its destructor. It's awkward, but that's just the way >> it >> is. >> >> cheers, >> Sean >> delete the shapefileObj instance. Sean From Ken.Tanaka at NOAA.GOV Wed Apr 27 13:30:26 2005 From: Ken.Tanaka at NOAA.GOV (Ken Tanaka) Date: Wed, 27 Apr 2005 14:30:26 -0600 Subject: global mapping issues with orthographic projection In-Reply-To: <426D32BB.10509@noaa.gov> Message-ID: As an update/resolution to this problem, we now have a corrected map file that generates the image we want. The resulting imag is online: http://gdsg.ngdc.noaa.gov/starburst/OrthoOutlines.html The image was positioned to correspond to the GOES-EAST geostationary satellite data we will be processing. Thanks again for the help from this email list. =========== MAP IMAGETYPE GIF EXTENT -6400000 -6400000 6400000 6400000 SHAPEPATH "/df_env/MMS/" PROJECTION "+proj=ortho" "+lat_0=0.0" "+lon_0=-75.0" END # Start of LAYER DEFINITIONS --------------------------------------------- LAYER # States polygon layer begins here NAME states DATA "statesp020" STATUS off TYPE polygon CLASS COLOR 0 0 0 OUTLINECOLOR 255 0 0 END PROJECTION "init=epsg:4326" END END # States polygon layer ends here LAYER # Countries polygon layer begins here NAME countries DATA "countries" STATUS off TYPE polygon CLASS COLOR 0 0 0 OUTLINECOLOR 255 0 0 END PROJECTION "init=epsg:4326" END END # Countries polygon layer ends here # End of LAYER DEFINITIONS --------------------------------------------- END =========== Ken Tanaka wrote: > ... > At the moment we are having some troubles with a "starburst" of stray > feature lines that can be seen in this URL: > > http://gdsg.ngdc.noaa.gov/starburst/ > > > >>> Our current approach is to generate the lines with MMS, and then use a >>> separate step to merge the data (satellite image) with the outlines >>> image, >>> and produce the composite image seen in the above URL. >>> >>> >> Frank Warmerdam wrote: > ... >> Is there a reason you don't have MapServer taking care of the image data >> as well? >> >> > I think having MapServer handle the image data would be a good approach > as well. We are currently trying MapServer out by replacing older > software in an existing system. I'll need to find out why the merging is > done separately, there may be a performance issue there. > > Primarily we are taking this approach as an efficiency step. The data images will remain in the same perspective, so we can use MapServer for the overlay one time for this perspective. This is potentially a large number of images, especially if we are required to re-process the existing archive. -Ken -- = Enterprise Data Services Division =============== | CIRES, National Geophysical Data Center / NOAA | = Ken.Tanaka(a)noaa.gov =========================== From sgillies at FRII.COM Wed Apr 27 13:44:34 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Wed, 27 Apr 2005 14:44:34 -0600 Subject: global mapping issues with orthographic projection In-Reply-To: Message-ID: On Apr 27, 2005, at 2:30 PM, Ken Tanaka wrote: > As an update/resolution to this problem, we now have a corrected map > file that generates the image we want. > The resulting imag is online: > http://gdsg.ngdc.noaa.gov/starburst/OrthoOutlines.html > The image was positioned to correspond to the GOES-EAST geostationary > satellite data we will be processing. > > Thanks again for the help from this email list. > > =========== > MAP > IMAGETYPE GIF > EXTENT -6400000 -6400000 6400000 6400000 > SHAPEPATH "/df_env/MMS/" > > PROJECTION > "+proj=ortho" > "+lat_0=0.0" > "+lon_0=-75.0" > END > > # Start of LAYER DEFINITIONS > --------------------------------------------- > > LAYER # States polygon layer begins here > NAME states > DATA "statesp020" > STATUS off > TYPE polygon > > CLASS > COLOR 0 0 0 > OUTLINECOLOR 255 0 0 > END > > PROJECTION > "init=epsg:4326" > END > END # States polygon layer ends here > > LAYER # Countries polygon layer begins here > NAME countries > DATA "countries" > STATUS off > TYPE polygon > > CLASS > COLOR 0 0 0 > OUTLINECOLOR 255 0 0 > END > > PROJECTION > "init=epsg:4326" > END > END # Countries polygon layer ends here > > # End of LAYER DEFINITIONS > --------------------------------------------- > > END > =========== > > Ken Tanaka wrote: > >> ... > >> At the moment we are having some troubles with a "starburst" of stray >> feature lines that can be seen in this URL: >> >> http://gdsg.ngdc.noaa.gov/starburst/ >> >> >> >>>> Our current approach is to generate the lines with MMS, and then >>>> use a >>>> separate step to merge the data (satellite image) with the outlines >>>> image, >>>> and produce the composite image seen in the above URL. >>>> >>>> >>> Frank Warmerdam wrote: >> > ... > >>> Is there a reason you don't have MapServer taking care of the image >>> data >>> as well? >>> >>> >> I think having MapServer handle the image data would be a good >> approach >> as well. We are currently trying MapServer out by replacing older >> software in an existing system. I'll need to find out why the merging >> is >> done separately, there may be a performance issue there. >> >> > Primarily we are taking this approach as an efficiency step. The data > images will remain in the same perspective, so we can use MapServer for > the overlay one time for this perspective. This is potentially a large > number of images, especially if we are required to re-process the > existing archive. > > -Ken > Ken, Instead of declaring a black fill for your country and states polygon and then making black transparent, you can simply omit the fill color. The result is will be a stroked polygon with no fill at all, and will overlay your image nicely. Should be faster, too. cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From David.Fawcett at STATE.MN.US Wed Apr 27 13:59:51 2005 From: David.Fawcett at STATE.MN.US (Fawcett, David) Date: Wed, 27 Apr 2005 15:59:51 -0500 Subject: SQL WHERE in OGR VRT Message-ID: What is the lowest MapServer Version where SQL WHERE is supported in ORG VRT's? I am playing with a virtual layer that connects to an Access database using OGR. The layer works great when I use tlkpDestFac and call up all of the elements in the file. I attempted to filter the layer by using SELECT FClass, UTMX, UTMY, NameShort FROM tlkpDestFac WHERE FClass = 1 in place of . Using the MapServer 4.4.1 binary from MapTools, I get the error ' msDrawMap(): Image handling error. Failed to draw layer named 'facilities'. msOGRFileOpen(): OGR error. Open failed for OGR connection `facslf.ovf'. Failed to import LayerSRS `epsg:32615'. ' If I hit the same .ovf file with ogrinfo 1.2.5+ in the FW Tools package, it is read just fine. Thanks, David. David Fawcett Minnesota Office of Environmental Assistance david.fawcett at moea.state.mn.us 651.215.0200 -------------- next part -------------- An HTML attachment was scrubbed... URL: From pram123 at GMAIL.COM Wed Apr 27 14:02:42 2005 From: pram123 at GMAIL.COM (Prashanth Ram) Date: Wed, 27 Apr 2005 17:02:42 -0400 Subject: Display GNIS points/annotation Message-ID: Does anyone know how to display the GNIS (lat/long/point) file from the USGS GNIS site within mapserver. I've imported the file into my PostgreSQL db, but don't know how to call the data from the mapfile.. ie. Since there is no "the_geom" column..what do I do? Thank you, Prashanth -- HTMLX.com Mapserver Hosting, Mapscript Hosting, PHP Hosting PostgreSQL w/PostGIS extension enabled Hosting From David.Fawcett at STATE.MN.US Wed Apr 27 14:17:30 2005 From: David.Fawcett at STATE.MN.US (Fawcett, David) Date: Wed, 27 Apr 2005 16:17:30 -0500 Subject: SQL WHERE in OGR VRT Message-ID: As an update, this is the OVF file that I was using: ODBC:myname/mypass at mydsn SELECT FClass, UTMX, UTMY, NameShort FROM tlkpDestFac WHERE FClass = 1 epsg:32615 wkbPoint After removing the line epsg:32615 It works. Fortunately, for this application, I don't need to project the data. David. David Fawcett Minnesota Office of Environmental Assistance david.fawcett at moea.state.mn.us 651.215.0200 -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of Fawcett, David Sent: Wednesday, April 27, 2005 4:00 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] SQL WHERE in OGR VRT What is the lowest MapServer Version where SQL WHERE is supported in ORG VRT's? I am playing with a virtual layer that connects to an Access database using OGR. The layer works great when I use tlkpDestFac and call up all of the elements in the file. I attempted to filter the layer by using SELECT FClass, UTMX, UTMY, NameShort FROM tlkpDestFac WHERE FClass = 1 in place of . Using the MapServer 4.4.1 binary from MapTools, I get the error ' msDrawMap(): Image handling error. Failed to draw layer named 'facilities'. msOGRFileOpen(): OGR error. Open failed for OGR connection `facslf.ovf'. Failed to import LayerSRS `epsg:32615'. ' If I hit the same .ovf file with ogrinfo 1.2.5+ in the FW Tools package, it is read just fine. Thanks, David. David Fawcett Minnesota Office of Environmental Assistance david.fawcett at moea.state.mn.us 651.215.0200 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fwarmerdam at GMAIL.COM Wed Apr 27 14:33:21 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Wed, 27 Apr 2005 17:33:21 -0400 Subject: SQL WHERE in OGR VRT In-Reply-To: Message-ID: On 4/27/05, Fawcett, David wrote: > > As an update, this is the OVF file that I was using: > > > > ODBC:myname/mypass at mydsn > SELECT FClass, UTMX, UTMY, NameShort FROM tlkpDestFac WHERE > FClass = 1 > epsg:32615 > wkbPoint > > > > > After removing the line > > epsg:32615 David, If this fails, it generally means that the GDAL/OGR code was unable to find the supporting EPSG data files such as pcs.csv and gcs.csv. These are distributed in gdal/data (in source dists.) and you can point to them with the GDAL_DATA environment variable. > It works. Fortunately, for this application, I don't need to project the > data. Right. Also, in a mapserver context the OGR coordinate system is ignored, and you need to specify things in the .map file in a projection block. So OGR's concept of the coordinate system is normally only important if you are using external ogr utilities or other OGR applications. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From erv.mcnally at GMAIL.COM Wed Apr 27 14:47:27 2005 From: erv.mcnally at GMAIL.COM (Erv McNally) Date: Wed, 27 Apr 2005 16:47:27 -0500 Subject: querybypoint on tiled raster takes very long Message-ID: I have a raster split into 40 tiles. When I use php mapscript querybypoint to get the elevation at the point, it takes a long time (8 seconds). ->getResult(0) returns a tileindex and shpindex of the result. That leads me to believe that the querybypoint queries all tiles and not just the ones in the current extent. I am also lead to believe that querybypoint searches all tiles since there is no improvement of search speeds when I am zoomed in. I would think the farther I am zoomed in, the number of tiles used should be smaller, therefore the amount of time required for a search should be less if querybypoint only seached the tiles related to the current extent. When the map draws, it may draw using only 4 tiles at a "zoomed in" extent. I was hoping that querybypoint would only query those same 4 tiles for the result. Could someone tell me if querybypoint searches in the tiles associated with the current extent or does it look at all tiles listed in the tile index? If querybypoint searches all tiles, is there anyway to query a small extent of a map, thereby reducing query times. If it only searches the tiles associated with the current extent, then I have tiling problems. Thank you, Erv From fwarmerdam at GMAIL.COM Wed Apr 27 15:29:53 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Wed, 27 Apr 2005 18:29:53 -0400 Subject: FWTools 0.9.8 Released Message-ID: Folks, FWTools 0.9.8 has been related and is available for download from: http://fwtools.maptools.org/ FWTools is a easy-to-install binary packaging of OpenEV, MapServer, GDAL, PROJ, and OGDI with lots of options built-in and good python support. This is the usual "latest from CVS" release. Noteworthy changes include: On Windows: o Use of the ECW 3.1 SDK, with the name of the DLLs renamed to include _fw so they don't interfere with any older versions already installed in windows\system32 on windows as had been reported by several people. o Included all the GTK related include files and stub libraries. In theory this should make it fairly easy to use FWTools to build the OpenEV core against instead of folks having to build all the dependencies themselves. On Linux: o I was having problems with a message about libgcc_s.so not being properly installed and this interfering with pthread_cancel in the ECW library. I think I have worked around this by moving the libgcc_s.so into $FWTOOLS_HOME/lib/fallback and putting it after /lib in the LD_LIBRARY_PATH. Apparently it is important to use the installed libgcc_s.so if it is available. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From ttsai at POBOX.COM Wed Apr 27 15:19:05 2005 From: ttsai at POBOX.COM (Tim Tsai) Date: Wed, 27 Apr 2005 17:19:05 -0500 Subject: tiling shape files, or shptree In-Reply-To: <931f8ea905042711487cd3d3d1@mail.gmail.com> Message-ID: On Wed, Apr 27, 2005 at 02:48:07PM -0400, Frank Warmerdam wrote: > Tim / Schuyler, > > Yes, I've thought about that sometimes too. It might be helpful to have > a tool that would would copy a shapefile in .qix traversal order. That > is to reorder the features by locality as determined by the quadtree index. > That might given the convenient managability of one big shapefile > with the locality benefits of tiling. That should help clustering the blocks together. I am not very familiar with the .qix format but I don't think it actually tries to balance the quadtree at all right now. A mostly balanced algorithm with a re-sorted shapefile might be a good approach. Also, I wonder what would happen if you run a big shapefile through shp2tile, merge the shape files back sequentially into a big file, then run shapetree on it. Seems like you'd get most of the effects of above. http://www.cs.umd.edu/~brabec/quadtree/ has lots of spatial index algorithms. One of these days I'll read through all of them. Tim From dmorissette at DMSOLUTIONS.CA Wed Apr 27 18:53:12 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Wed, 27 Apr 2005 21:53:12 -0400 Subject: MapServer 4.6.0-beta1 released Message-ID: Hi, MapServer 4.6.0-beta1 has just been released. This will be the first of a couple of betas that will lead us to a MapServer 4.6.0 release early June, just in time for MUM3. As for previous releases, we invite experienced users to contribute to the release process by testing the betas with their applications and reporting any issues via bugzilla. The 4.6.0-beta1 source code is available in the downloads page at http://mapserver.gis.umn.edu/dload.html and windows binaries should be available shortly at the usual locations. I have included below the list of the main changes/fixes since 4.4 (from the HISTORY.TXT). Regards, Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette at dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ Version 4.6.0-beta1 (2005-04-26) -------------------------------- - Buf 1332 - shptreevis.c: fixed setting of this_rec, as the output dbf file was not getting any records at all. - Fixed Makefile.vc to make .exe files depend on the DLL, so if the DLL fails to build, things will stop. Avoids the need for unnecessary cleans on win32. Also fixed the rule for MS_VERSION for mapscriptvars. - Bug 1262 : the SERVICE parameter is now required for wms and wfs GetCapbilities request. It is not required for other WMS requests. It is required for all WFS requests. - Bug 1302 : the wfs/ows_service parameter is not used any more. The service is always set to WFS for WFS layers. - Bug 791: initialize some fields in msDBFCreate() - avoids crashes in some circumstances. - Bug 1329 : Apply sld named layer on all layers of the same group - Bug 1328 : support style's width parameter for line and polygon layers. - Bug 1244: Replacing --enable-shape-z-m by --enable-point-z-m and replacing USE_SHAPE_Z_M by USE_POINT_Z_M. The new name makes more sense. - Bug 564: Fixed old problem with labels occasionally drawn upside down - Bug 1325: php mapscript function $class->settext needs only 1 argument. - Bug 1319: Fixed mutex creation (was creator-owned) in mapthread.c. win32 issue only. - Bug 1103: Set the default tolerance value based on the layer type. The default is now 3 for point and line layers and 0 for all the others. - Bug 1244: Removing Z and M parameter from pointObj by default. A new compilation option is available to active those option --enable-point-z-m. This gives an overall performance gain around 7 to 10%. - Bug 1225: MapServer now requires GD 2.0.16 or more recent - MapScript: shapeObj allocates memory for 4 value strings, shapeObj.setValue() lets users set values of a shapeObj. - MapScript: imageObj.getBytes() replaces imageObj.write() (bugs 1176, 1064). - Bug 1308: Correction of SQL expression generated on wfs filters for postgis/oracle layers. - Bug 1304: Avoid extra white space in gml:coordinates for gml:Box. - mapogr.c: Insure that tile index reading is restarted in msOGRLayerInitItemInfo() or else fastcgi repeat requests for a layer may fail on subsequent renders. - mapogr.c: Set a real OGRPolygon spatial filter, not just an OGRLinearRing. Otherwise GEOS enabled OGR builds will do expensive, and incorrect Intersects() tests. - mapogr.cpp / mapprimitive.c: Optimize msAddLine() and add msAddLineDirectly() - mapprimitive.c: Optimizations in msTransformShapeToPixel() (avoid division) - map.h: Made MS_NINT inline assembly for win32, linux/i86. - mapprimitive.c: optimized msClipPolygonRect and msClipPolylineRect for case where the shape is completely inside the clip rect. - Add support for SVG output. See Bug 1281 for details. - Bug 1231: use mimetype "image/png; mode=24bits" for 24bit png format. This makes it seperately selectable by WMS. - Bug 1206: Applied locking patch for expression parser for rasters. - Bug 1273: Fixed case in msProjectPoint() were in or out are NULL and a failure occurs to return NULL. Fixed problem of WMS capabilities with 'inf' in it. - SLD generation bug 1150 : replacing tag to - Fixed bug 1118 in msOWSGetLayerExtent() (mapows.c). - Fixed ogcfilter bug #1252 - Turned all C++ (//) comments into C comments (bug 1238) - mapproject.h/configure.in: Don't check for USE_PROJ_API_H anymore. Assume we have a modern PROJ.4. - Bug 839: Fix memory leak of font name in label cache (in mapfile.c). - Added msForceTmpFileBase() and mapserv -tmpbase switch to allow overriding temporary file naming conventions. Mainly intended to make writing testscripts using mapserv easier. FrankW. - maporaclespatil.c: Bug fix for: #1109, #1110, #1111, #1112, #1136, #1210, #1211, #1212, #1213. Support for compound polygons, fixed internal sql to stay more accurate for geodetic data, added the support for getextent function. Added VERSION token for layer data string. - mapimagemap.c: Preliminary implementation of support for emitting MS_SYMBOL_VECTOR symbols in msDrawMarkerSymbolIM(). - Bug 1204: Added multi-threading support in mapthread.c. List of connections is managed within a mutex lock, and connections are only allowed to be used by one thread at a time. - Bug 1185 : php/mapscript : add constant MS_GD_ALPHA - Bug 1173: In HTML legend, added opt_flag support for layer groups. - Bug 1179: added --with-warnings configure switch, overhauled warning logic. - Bug 1168: Improve autoscaling through classification rounding issues. - Fixed bug writing RGB/RGBA images via GDAL output on bigendian systems. - Bug 1152 : Fix WMS style capabilities output for FastCGI enabled builds. - Bug 1135 : Added support for rotating labels with the map if they were rendered with some particular angle already. - Bug 1143 : Missing call to msInitShape. - Fixed PHP5 support for windows : Bug 1100. - Correct bug 1151 : generates twice a
tag when generating an SLD. This was happening the style did not have a size set. - Oracle Spatial. Fixed problem with LayerClose function. Added token NONE for DATA statement. Thanks Valik with the hints about the LayerClose problem and Francois with the hints about NONE token. - numpoints and stylelength memebers of the symbol object needs to be in sync with the low level values after calles to setpoints ans setstyle (Bug 1137). - Use doubles instead of integers in function php3_ms_symbol_setPoints (Bug 1137). - Change the output of the expression when using a wild card for PropertyIsLike (Bug 1107). - Delete temporary sld file created on disk (Bug 1123) - Fixed msFreeFileCtx() to call free() instead of gdFree() as per bug 1125. Also renamed gdFreeFileCtx() to msFreeFileCtx(). - Ensure error stack is cleared before accepting another call in FastCGI mode in mapserv.c. Bug 1122 - Support translation of all geometry types to points in mapogr.cpp (now also supports multipolygon, multilinestring and geometrycollection. bug 1124. - Added support for passing OGR layer FILTER queries down to OGR via the SetAttributeFilter() method if prefixed with WHERE keyword. Bug 1126. - Fixed support for SIZEUNITS based scaling of text when map is rotated. Bug 1127. From camrex at AMERITECH.NET Wed Apr 27 19:37:52 2005 From: camrex at AMERITECH.NET (Cameron Rex) Date: Wed, 27 Apr 2005 21:37:52 -0500 Subject: Mac OS Tiger / Gcc4.0 support Message-ID: Thanks for the info on the binaries. I just wanted to point you to some information about what open source software (including apache and php) is built in to Tiger. http://www.apple.com/opensource/ It looks like they are sticking with Apache 1.3.33 and PHP 4.3.10. I do have a quick question though...Why wouldn't mapserver work with Apache 2. I have successfully installed and used Mapserver under Apache 2 in Linux. (Note: I noticed that Tiger Server will be running Apache 2.0.53...I assume PHP 4.3.10 will be on Tiger Server (same as client) since they haven't listed it differently.) My Tiger shipped this morning...so I will have it tomorrow or Friday. I'll let you know how the Mapserver binaries work. From cvhackel at YAHOO.COM Wed Apr 27 20:41:31 2005 From: cvhackel at YAHOO.COM (Chris Hackel) Date: Wed, 27 Apr 2005 20:41:31 -0700 Subject: map style question Message-ID: Sorry for the newcomer question, but I'd really appreciate it if someone could help me out. I need to know what fields to use in order to color streets as done in the below NYC map. How are the main streets & avenues being identified as distinct from regular streets? Also, what field is being used for the label (that gives full streetname) Thanks so much! Chris http://factfinder.census.gov/servlet/ReferenceMapFramesetServlet?_bm=y&-_pan=&-PANEL_ID=rm_result&-_MapEvent=&-_changeMap=ZoomIn&-_pageY=380&-_zoomLevel=&-_pageX=498&-_mapY=178&-rm_config=|b=50|l=en|t=420|zf=0.0|ms=ref_stat_00dec|dw=0.07725540836923254|dh=0.043898044520797166|dt=gov.census.aff.domain.map.EnglishMapExtent|if=gif|cx=-73.99420481140605|cy=40.72685503691364|zl=4|pz=4|bo=318:317:316:314:313:323:319|bl=362:393:358:357:356:355:354|ft=350:349:335:389:388:332:331|fl=381:403:204:380:369:379:368|g=01000US&-_mapX=337&-redoLog=false&-errMsg=&-_latitude=&-_lang=en&-_longitude= From leopold.schefcik at MULTIMEDIAPLAN.AT Wed Apr 27 23:28:00 2005 From: leopold.schefcik at MULTIMEDIAPLAN.AT (Leopold Schefcik) Date: Thu, 28 Apr 2005 01:28:00 -0500 Subject: GetCapabilities Request and Mapbender Message-ID: Hello, I have a problem an I hope someone can help me. The situation: Tomcat and a Deegree WMS is running on my PC. As a Client I have installed Mapbender. There I can Load a WMS. For Example: http://www.gis.nrw.de/wms/DGM50? REQUEST=GetCapabilities&VERSION=1.1.0&SERVICE=WMS or http://wms.ccgis.de/umn/bin/mapserv.exe?map=d:/umn/germany.map&... are both no problem. But my own PC: http://localhost:8080/deegreewms/wms? SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities or http://192.168.0.180:8080/deegreewms/wms? SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities or an other deegree server: http://deegree.centropemap.multimediaplan.kosnet.com/deegree2/wms/wms? SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities do not work. But for example at the last Request I can get an file where is no Extention but xml code in it. At the first (working) request I can get the the xml code direktly in the browser window. May you have an idea the help me? Leopold Schefcik From luca76 at GMAIL.COM Thu Apr 28 01:43:18 2005 From: luca76 at GMAIL.COM (Luca Manganelli) Date: Thu, 28 Apr 2005 10:43:18 +0200 Subject: [FWTools] Speed of rendering large (2GB) ECW image at normal screen size Message-ID: Hi all, today I downloaded the latest release of FWTools for windows (0.9.8). I tried the demo in python, OpenEV_FW, to open a locally stored large ECW raster file (about 2GB). The demo was incredibly slow in visualizing in its small window (about 800 x 600). Do you know if it is a fault of the demo or of the library? From bvanmeul at EBE.UCT.AC.ZA Thu Apr 28 02:16:54 2005 From: bvanmeul at EBE.UCT.AC.ZA (Bas Vanmeulebrouk) Date: Thu, 28 Apr 2005 11:16:54 +0200 Subject: Installing Python Mapscript on Windows XP Message-ID: Hi list, I have been trying to get Python Mapscript up and running on MS Windows XP, but I haven't succeeded yet. I have downloaded the binaries at http://hobu.stat.iastate.edu/mapserver/. When I start Python from the directory in which I have installed Python, Mapscript works fine. However, if I start Python from another directory, I get the following error message when I try import mapscript at the Python command line: "The procedure entry point ?SetnextByIndex at OGRLayer@@UAEHJ at Z could not be located in the dynamic link library gdal12.dll.". I have found four copies of gdal12.dll on my machine. I have been exeprimenting with the PATH environment variable, I have renamed the various dll's, but the message stays the same. Does anyone have an idea what might be wrong? Kind regards, Bas Vanmeulebrouk. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivier.gayte at VEREMES.COM Thu Apr 28 02:42:24 2005 From: olivier.gayte at VEREMES.COM (Olivier Gayte) Date: Thu, 28 Apr 2005 04:42:24 -0500 Subject: php_mapscript class diagram Message-ID: I have just updated a php_mapscript class diagram for version 4.4. It is available at http://www.veremes.com/rubrique.php3?id_rubrique=6 in pdf/svg formats and in french/english version. Thank you to send me any error you could notice or suggestion for the future versions. From BEN at SYNCERA-ITSOLUTIONS.NL Thu Apr 28 04:45:36 2005 From: BEN at SYNCERA-ITSOLUTIONS.NL (Bart van den Eijnden) Date: Thu, 28 Apr 2005 13:45:36 +0200 Subject: WFS: distance not working with DWithin? Message-ID: Hi list, I am trying to specify a distance for the DWithin operator but I always get back the exact same results (2 results to be exact) irrespective of what distance I am using. Is the distance parameter working? This is the request I am using: Geometry73999.999950,446376.397950 74013.112050,446359.819150 74031.775050,446374.369000 74074.128000,446321.128050 74005.396050,446262.444950 73999.999950,446260.640000 73998.679950,446260.199000 73971.634050,446263.116950 73968.018000,446264.092050 73920.037950,446320.924000 73921.153050,446322.223900 73951.420950,446348.322000 73964.763000,446359.727100 73995.931050,446381.542950 73999.999950,446376.3979505000 Thanks in advance. Best regards, Bart Bart van den Eijnden Syncera-ITSolutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: BEN at Syncera-ITSolutions.nl From fwarmerdam at GMAIL.COM Thu Apr 28 05:19:06 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Thu, 28 Apr 2005 08:19:06 -0400 Subject: Installing Python Mapscript on Windows XP In-Reply-To: <001201c54bd3$054d45a0$cf1d9e89@GISLAB6> Message-ID: On 4/28/05, Bas Vanmeulebrouk wrote: > > Hi list, > > I have been trying to get Python Mapscript up and running on MS Windows XP, > but I haven't succeeded yet. I have downloaded the binaries at > http://hobu.stat.iastate.edu/mapserver/. When I start > Python from the directory in which I have installed Python, Mapscript works > fine. However, if I start Python from another directory, I get the following > error message when I try import mapscript at the Python command line: "The > procedure entry point ?SetnextByIndex at OGRLayer@@UAEHJ at Z > could not be located in the dynamic link library gdal12.dll.". > > I have found four copies of gdal12.dll on my machine. I have been > exeprimenting with the PATH environment variable, I have renamed the various > dll's, but the message stays the same. > > Does anyone have an idea what might be wrong? Bas, I am guessing that one of the 4 gdal12.dll's is in windows\system32, right? This location takes precidence over the PATH, but even higher precidence is the directory the program is running in. I would suggest you move or rename the version in windows\system32. Best regards, ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From nbarker at RSINC.COM Thu Apr 28 05:25:38 2005 From: nbarker at RSINC.COM (Norman Barker) Date: Thu, 28 Apr 2005 13:25:38 +0100 Subject: spatial databases and mapserver Message-ID: Hi, not something I am working on at the moment, but a question that keeps arising is how to utilise a spatial database with rasters (and in turn link this to MapServer WMS / WFS). I have used a spatial database (MySQL spatial) to store an image extents and metadata and retrieve this through a WFS before, but that was of little use (in terms of performance) and the data was still external to the database. Is there a way to store image chips (preferably in PostGIS or MySQL Spatial), and utilites this through MapServer WMS/WFS/WCS? Or any way of storing rasters in a database? This thought was triggered by the idea that if I have an archive of data which is several terrabytes in size it is going to need a database to index and manage it. Any thoughts by anyone who has done this kind of thing would be appreciated. Many thanks, Norman Barker From fwarmerdam at GMAIL.COM Thu Apr 28 05:28:27 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Thu, 28 Apr 2005 08:28:27 -0400 Subject: [FWTools] Speed of rendering large (2GB) ECW image at normal screen size In-Reply-To: Message-ID: On 4/28/05, Luca Manganelli wrote: > Hi all, > > today I downloaded the latest release of FWTools for windows (0.9.8). > I tried the demo in python, OpenEV_FW, to open a locally stored large > ECW raster file (about 2GB). The demo was incredibly slow in > visualizing in its small window (about 800 x 600). > Do you know if it is a fault of the demo or of the library? Luca, I believe this is mostly a defect of OpenEV's raster handling strategy and the way that GDAL represents ECW files to it. In particular, OpenEV creates a texture for each 256x256 chunk of the full res file. In overview on very large files this means that virtually every pixel on screen is a separate texture, and results in a seperate io request to the file - a most pathological case. I would add this isn't a problem for MapServer. In the raster code we take care to only make one request to the file per band, so at worst there are 3 reads from the ECW file for any given render, and they are done in such a way that full advantage is taken of the ECW overview capability. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From David.Fawcett at STATE.MN.US Thu Apr 28 06:20:04 2005 From: David.Fawcett at STATE.MN.US (Fawcett, David) Date: Thu, 28 Apr 2005 08:20:04 -0500 Subject: map style question Message-ID: Sorry Chris, I don't have the data, so I don't have an answer for you. Can't you just look at the data and see which fields they are using (assuming that they haven't pre-processed the data). You may need to add fields to your data to classify the street types and provide 'pretty' names for labels. My primary reason for replying was to point out the very cool javascript zoom/scale widget that they are using! Check it out! David. David Fawcett Minnesota Office of Environmental Assistance david.fawcett at moea.state.mn.us 651.215.0200 -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of Chris Hackel Sent: Wednesday, April 27, 2005 10:42 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] map style question Sorry for the newcomer question, but I'd really appreciate it if someone could help me out. I need to know what fields to use in order to color streets as done in the below NYC map. How are the main streets & avenues being identified as distinct from regular streets? Also, what field is being used for the label (that gives full streetname) Thanks so much! Chris http://factfinder.census.gov/servlet/ReferenceMapFramesetServlet?_bm=y&-_pan=&-PANEL_ID=rm_result&-_MapEvent=&-_changeMap=ZoomIn&-_pageY=380&-_zoomLevel=&-_pageX=498&-_mapY=178&-rm_config=|b=50|l=en|t=420|zf=0.0|ms=ref_stat_00dec|dw=0.07725540836923254|dh=0.043898044520797166|dt=gov.census.aff.domain.map.EnglishMapExtent|if=gif|cx=-73.99420481140605|cy=40.72685503691364|zl=4|pz=4|bo=318:317:316:314:313:323:319|bl=362:393:358:357:356:355:354|ft=350:349:335:389:388:332:331|fl=381:403:204:380:369:379:368|g=01000US&-_mapX=337&-redoLog=false&-errMsg=&-_latitude=&-_lang=en&-_longitude= From mapserver at GEOWORLD.DE Thu Apr 28 07:04:13 2005 From: mapserver at GEOWORLD.DE (Nicol Hermann) Date: Thu, 28 Apr 2005 16:04:13 +0200 Subject: mapserv segfaults trying to get the query results of a native oracle spatial data source Message-ID: Dear list, I want to use the query function of the native Oracle Spatial support (INPUT=ORACLESPATIAL) from mapserver 4.4.2. Displaying the image is no problem but when try to get the query results mapserver crashes with a segmentation fault. Here is what i try to do: for($j = 0;$j < $Layer->getNumResults(); $j++) { $oRes = $Layer->getResult($j); $shpobj = $Layer->getShape($oRes->tileindex,$oRes->shapeindex); // <- Line which causes the Segmentation fault $shpobj->free(); } Is this a bug or do i have to change something? My system is: Debian sarge, mapserver 4.4.2 (php Mapscript), oracle 10g Attached you find the output of gdb. Any help are welcome Nicol gdb php GNU gdb 6.3-debian Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-linux"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run nativ_oraclequelle_query.php Starting program: /usr/local/bin/php nativ_oraclequelle_query.php [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 8826)] [Thu Apr 28 15:43:33 2005].517414 msOracleSpatialLayerOpen called with: GEOMETRIE from FLURST USING UNIQUE ID SRID 82027 [Thu Apr 28 15:43:33 2005].676912 msOracleSpatialLayerOpen. Shared connection not available. Creating one. [Thu Apr 28 15:43:33 2005].676970 msConnPoolRegister(gw,user/passwd at BOX.os,0x82c1b20) [Thu Apr 28 15:43:33 2005].682921 msOracleSpatialLayerFreeItemInfo was called. [Thu Apr 28 15:43:33 2005].683009 msOracleSpatialLayerWhichShapes was called. [Thu Apr 28 15:43:56 2005].723744 msOracleSpatialLayerFreeItemInfo was called. [Thu Apr 28 15:43:56 2005].723961 msOracleSpatialLayerClose was called. Layer connection: user/passwd at BOX.os [Thu Apr 28 15:43:56 2005].724036 msOracleSpatialLayerClose. Cleaning layerinfo handlers. [Thu Apr 28 15:43:56 2005].724211 msOracleSpatialLayerClose. Cleaning Oracle handlers. [Thu Apr 28 15:43:56 2005].724310 msConnPoolRelease(gw,user/passwd at BOX.os,0x82c1b20) [Thu Apr 28 15:43:56 2005].724388 msConnPoolClose(user/passwd at BOX.os,0x82c1b20) [Thu Apr 28 15:43:56 2005].733201 msDrawMap(): Layer 0 (gw), 23.216s [Thu Apr 28 15:43:56 2005].826353 msDrawMap(): Drawing Label Cache, 0.000s [Thu Apr 28 15:43:56 2005].826471 msDrawMap() total time: 23.310s Content-type: text/html X-Powered-By: PHP/4.3.8

Anzahl der Layer: 1 - Anzahl der Klassen dieses Layers: 1[Thu Apr 28 15:43:56 2005].904965 msOracleSpatialLayerOpen called with: GEOMETRIE from FLURST USING UNIQUE ID SRID 82027 [Thu Apr 28 15:43:57 2005].34902 msOracleSpatialLayerOpen. Shared connection not available. Creating one. [Thu Apr 28 15:43:57 2005].35066 msConnPoolRegister(gw,user/passwd at BOX.os,0x8312cd8) [Thu Apr 28 15:43:57 2005].40125 msOracleSpatialLayerFreeItemInfo was called. [Thu Apr 28 15:43:57 2005].74273 msOracleSpatialLayerGetItems was called. [Thu Apr 28 15:43:57 2005].164273 msOracleSpatialLayerInitItemInfo was called. [Thu Apr 28 15:43:57 2005].164347 msOracleSpatialLayerFreeItemInfo was called. [Thu Apr 28 15:43:57 2005].164362 msOracleSpatialLayerGetItems was called. [Thu Apr 28 15:43:57 2005].244219 msOracleSpatialLayerInitItemInfo was called. x: 3405582.21859 - y: 5521435.53345 [Thu Apr 28 15:43:57 2005].244493 msOracleSpatialLayerOpen called with: GEOMETRIE from FLURST USING UNIQUE ID SRID 82027 [Thu Apr 28 15:43:57 2005].244511 msOracleSpatialLayerFreeItemInfo was called. [Thu Apr 28 15:43:57 2005].244527 msOracleSpatialLayerWhichShapes was called. [Thu Apr 28 15:43:57 2005].418013 msOracleSpatialLayerFreeItemInfo was called. [Thu Apr 28 15:43:57 2005].418058 msOracleSpatialLayerClose was called. Layer connection: gdv/gdv at BOX.GDV [Thu Apr 28 15:43:57 2005].418070 msOracleSpatialLayerClose. Cleaning layerinfo handlers. [Thu Apr 28 15:43:57 2005].418112 msOracleSpatialLayerClose. Cleaning Oracle handlers. [Thu Apr 28 15:43:57 2005].418124 msConnPoolRelease(gw,user/passwd at BOX.os,0x8312cd8) [Thu Apr 28 15:43:57 2005].418140 msConnPoolClose(user/passwd at BOX.os,0x8312cd8) Anzahl: 5
0. Ergebnis stdClass Object ( [shapeindex] => 0 [tileindex] => -1 [classindex] => 0 ) Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 8826)] msOracleSpatialLayerGetShape (layer=0x8284b50, shape=0x830c430, record=0) at maporaclespatial.c:1258 1258 msOracleSpatialHandler *hand = (msOracleSpatialHandler *)layerinfo->orahandlers; (gdb) From fsimon at UNIVALI.BR Thu Apr 28 07:42:32 2005 From: fsimon at UNIVALI.BR (Fernando Simon) Date: Thu, 28 Apr 2005 11:42:32 -0300 Subject: mapserv segfaults trying to get the query results of a native oracle spatial data source In-Reply-To: <1114697053.1701.13.camel@emil> Message-ID: Hi Nicol, This problem can be a bug in maporaclespatial.c in 4.4.2 version. In this version of Mapserver the maporaclespatial is a 1.16 version, a old version (now it is a 1.25). I fixed some problems with OCI handlers between 1.6 and 1.25, the last version 1.25 can work correctly for you. But, it's a strange problem, how did you define oracle spatial layer? Did you define the template for the layer? Did you define any filter parameter for the layer? Thanks. ps: for cvs version specify the --enable-point-z-m flag ------------------------------------------------------------------------ Fernando Simon Mapserver and Oracle Spatial developer G10 - Laboratorio de Computacao Aplicada - Brazil http://g10.cttmar.univali.br - UNIVALI/CTTMAR ------------------------------------------------------------------------ Citando Nicol Hermann : > Dear list, > > I want to use the query function of the native Oracle Spatial > support > (INPUT=ORACLESPATIAL) from mapserver 4.4.2. > Displaying the image is no problem but when try to get the query > results > mapserver crashes with a segmentation fault. > > Here is what i try to do: > > for($j = 0;$j < $Layer->getNumResults(); $j++) { > $oRes = $Layer->getResult($j); > $shpobj = $Layer->getShape($oRes->tileindex,$oRes->shapeindex); > // <- > Line which causes the Segmentation fault > $shpobj->free(); > } > > Is this a bug or do i have to change something? > My system is: > Debian sarge, mapserver 4.4.2 (php Mapscript), oracle 10g > > Attached you find the output of gdb. > > Any help are welcome > Nicol > > > gdb php > GNU gdb 6.3-debian > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, > and you > are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for > details. > This GDB was configured as "i386-linux"...Using host libthread_db > library "/lib/libthread_db.so.1". > > (gdb) run nativ_oraclequelle_query.php > Starting program: /usr/local/bin/php nativ_oraclequelle_query.php > [Thread debugging using libthread_db enabled] > [New Thread 16384 (LWP 8826)] > [Thu Apr 28 15:43:33 2005].517414 msOracleSpatialLayerOpen called > with: > GEOMETRIE from FLURST USING UNIQUE ID SRID 82027 > [Thu Apr 28 15:43:33 2005].676912 msOracleSpatialLayerOpen. Shared > connection not available. Creating one. > [Thu Apr 28 15:43:33 2005].676970 > msConnPoolRegister(gw,user/passwd at BOX.os,0x82c1b20) > [Thu Apr 28 15:43:33 2005].682921 msOracleSpatialLayerFreeItemInfo > was > called. > [Thu Apr 28 15:43:33 2005].683009 msOracleSpatialLayerWhichShapes > was > called. > [Thu Apr 28 15:43:56 2005].723744 msOracleSpatialLayerFreeItemInfo > was > called. > [Thu Apr 28 15:43:56 2005].723961 msOracleSpatialLayerClose was > called. > Layer connection: user/passwd at BOX.os > [Thu Apr 28 15:43:56 2005].724036 msOracleSpatialLayerClose. > Cleaning > layerinfo handlers. > [Thu Apr 28 15:43:56 2005].724211 msOracleSpatialLayerClose. > Cleaning > Oracle handlers. > [Thu Apr 28 15:43:56 2005].724310 > msConnPoolRelease(gw,user/passwd at BOX.os,0x82c1b20) > [Thu Apr 28 15:43:56 2005].724388 > msConnPoolClose(user/passwd at BOX.os,0x82c1b20) > [Thu Apr 28 15:43:56 2005].733201 msDrawMap(): Layer 0 (gw), > 23.216s > [Thu Apr 28 15:43:56 2005].826353 msDrawMap(): Drawing Label > Cache, > 0.000s > [Thu Apr 28 15:43:56 2005].826471 msDrawMap() total time: 23.310s > Content-type: text/html > X-Powered-By: PHP/4.3.8 > > >

Anzahl der Layer: 1 - Anzahl der Klassen dieses Layers: 1[Thu > Apr 28 > 15:43:56 2005].904965 msOracleSpatialLayerOpen called with: > GEOMETRIE > from FLURST USING UNIQUE ID SRID 82027 > [Thu Apr 28 15:43:57 2005].34902 msOracleSpatialLayerOpen. Shared > connection not available. Creating one. > [Thu Apr 28 15:43:57 2005].35066 > msConnPoolRegister(gw,user/passwd at BOX.os,0x8312cd8) > [Thu Apr 28 15:43:57 2005].40125 msOracleSpatialLayerFreeItemInfo > was > called. > [Thu Apr 28 15:43:57 2005].74273 msOracleSpatialLayerGetItems was > called. > [Thu Apr 28 15:43:57 2005].164273 msOracleSpatialLayerInitItemInfo > was > called. > [Thu Apr 28 15:43:57 2005].164347 msOracleSpatialLayerFreeItemInfo > was > called. > [Thu Apr 28 15:43:57 2005].164362 msOracleSpatialLayerGetItems was > called. > [Thu Apr 28 15:43:57 2005].244219 msOracleSpatialLayerInitItemInfo > was > called. > x: 3405582.21859 - y: 5521435.53345 [Thu Apr 28 15:43:57 > 2005].244493 > msOracleSpatialLayerOpen called with: GEOMETRIE from FLURST USING > UNIQUE > ID SRID 82027 > [Thu Apr 28 15:43:57 2005].244511 msOracleSpatialLayerFreeItemInfo > was > called. > [Thu Apr 28 15:43:57 2005].244527 msOracleSpatialLayerWhichShapes > was > called. > [Thu Apr 28 15:43:57 2005].418013 msOracleSpatialLayerFreeItemInfo > was > called. > [Thu Apr 28 15:43:57 2005].418058 msOracleSpatialLayerClose was > called. > Layer connection: gdv/gdv at BOX.GDV > [Thu Apr 28 15:43:57 2005].418070 msOracleSpatialLayerClose. > Cleaning > layerinfo handlers. > [Thu Apr 28 15:43:57 2005].418112 msOracleSpatialLayerClose. > Cleaning > Oracle handlers. > [Thu Apr 28 15:43:57 2005].418124 > msConnPoolRelease(gw,user/passwd at BOX.os,0x8312cd8) > [Thu Apr 28 15:43:57 2005].418140 > msConnPoolClose(user/passwd at BOX.os,0x8312cd8) > Anzahl: 5
0. Ergebnis stdClass Object > ( > [shapeindex] => 0 > [tileindex] => -1 > [classindex] => 0 > ) > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 16384 (LWP 8826)] > msOracleSpatialLayerGetShape (layer=0x8284b50, shape=0x830c430, > record=0) at maporaclespatial.c:1258 > 1258 msOracleSpatialHandler *hand = (msOracleSpatialHandler > *)layerinfo->orahandlers; > (gdb) > ------------------------------------------------- Univali - Webmail - http://webmail.univali.br From bvanmeul at EBE.UCT.AC.ZA Thu Apr 28 08:32:05 2005 From: bvanmeul at EBE.UCT.AC.ZA (Bas Vanmeulebrouk) Date: Thu, 28 Apr 2005 17:32:05 +0200 Subject: Installing Python Mapscript on Windows XP In-Reply-To: <931f8ea905042805196da8757f@mail.gmail.com> Message-ID: Frank, Thank you very much for your reaction. I did rename the one in the windows/system32 directory. However, I didn't notice that there were two gdal12.dll's in the Python installation directory: one in the root and one in the DLLs subdirectory. I have renamed the one in the DLLs subdirectory and after that got a different error message (now sde90.dll was missing). This errormessage always appeared, no matter from what location I started Python. Sde90.dll was on my machine, in the C:\Program Files\Common\ESRI directory. After I had added this directory to the PATH environment variable, Python Mapscript was finally working. But does this mean Python Mapscript needs some ESRI files? The ones I have came with the installation of ESRI MapObjects 2.3. I want to use Python/Mapscript to generate a map and some HTML which can be displayed in webbrowser. So I thought I should get a Python/Mapscript script which does this to work as a CGI script. I can get Apache to execute a Python CGI script, but when I include the line "import mapscript", I get an internal server error and the following error messages in the Apache error log. Traceback (most recent call last):\n File "c:\\PROGRA~1\\APACHE~1\\apache\\cgi-bin\\HELLO_~1.PY", line 4, in ?\n import mapscript\n File "C:\\programs\\python23\\Lib\\site-packages\\mapscript.py", line 4, in ?\n import _mapscript\n ImportError: DLL load failed: The specified module could not be found.\n I don't have a clue which dll is missing this time. Anyone? Or is there another way to achieve this? Kind regards, Bas Vanmeulebrouk. -----Original Message----- From: Frank Warmerdam [mailto:fwarmerdam at gmail.com] Sent: Thursday, April 28, 2005 2:19 PM To: Bas Vanmeulebrouk Cc: MAPSERVER-USERS at lists.umn.edu Subject: Re: [UMN_MAPSERVER-USERS] Installing Python Mapscript on Windows XP On 4/28/05, Bas Vanmeulebrouk wrote: > > Hi list, > > I have been trying to get Python Mapscript up and running on MS > Windows XP, but I haven't succeeded yet. I have downloaded the > binaries at http://hobu.stat.iastate.edu/mapserver/. When I start > Python from the directory in which I have installed Python, Mapscript > works fine. However, if I start Python from another directory, I get > the following error message when I try import mapscript at the Python > command line: "The procedure entry point > ?SetnextByIndex at OGRLayer@@UAEHJ at Z could not be located in the dynamic > link library gdal12.dll.". > > I have found four copies of gdal12.dll on my machine. I have been > exeprimenting with the PATH environment variable, I have renamed the > various dll's, but the message stays the same. > > Does anyone have an idea what might be wrong? Bas, I am guessing that one of the 4 gdal12.dll's is in windows\system32, right? This location takes precidence over the PATH, but even higher precidence is the directory the program is running in. I would suggest you move or rename the version in windows\system32. Best regards, ---------------------------------------+-------------------------------- ---------------------------------------+------ I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From fwarmerdam at GMAIL.COM Thu Apr 28 08:46:33 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Thu, 28 Apr 2005 11:46:33 -0400 Subject: Installing Python Mapscript on Windows XP In-Reply-To: <000001c54c07$747dca10$cf1d9e89@GISLAB6> Message-ID: On 4/28/05, Bas Vanmeulebrouk wrote: > Frank, > > Thank you very much for your reaction. I did rename the one in the > windows/system32 directory. However, I didn't notice that there were two > gdal12.dll's in the Python installation directory: one in the root and one > in the DLLs subdirectory. Bas, Ah, I see. That would be an issue too. > I have renamed the one in the DLLs subdirectory > and after that got a different error message (now sde90.dll was missing). > This errormessage always appeared, no matter from what location I started > Python. Sde90.dll was on my machine, in the C:\Program Files\Common\ESRI > directory. After I had added this directory to the PATH environment > variable, Python Mapscript was finally working. But does this mean Python > Mapscript needs some ESRI files? The ones I have came with the installation > of ESRI MapObjects 2.3. I believe that Howards build of MapScript includes SDE support, and so depends on some SDE DLLs. But that is just because Howard include SDE support ... it isn't general to Python MapScript. > I want to use Python/Mapscript to generate a map and some HTML which can be > displayed in webbrowser. So I thought I should get a Python/Mapscript script > which does this to work as a CGI script. I can get Apache to execute a > Python CGI script, but when I include the line "import mapscript", I get an > internal server error and the following error messages in the Apache error > log. > > Traceback (most recent call last):\n > File "c:\\PROGRA~1\\APACHE~1\\apache\\cgi-bin\\HELLO_~1.PY", line 4, in > ?\n > import mapscript\n > File "C:\\programs\\python23\\Lib\\site-packages\\mapscript.py", line 4, > in ?\n > import _mapscript\n > ImportError: DLL load failed: The specified module could not be found.\n > > I don't have a clue which dll is missing this time. Anyone? Or is there > another way to achieve this? This is the main mapscript DLL. I'll leave it to Howard or others to talk about how to deploy Howards MapScript in a cgi environment. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From sgillies at FRII.COM Thu Apr 28 08:47:56 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Thu, 28 Apr 2005 09:47:56 -0600 Subject: Installing Python Mapscript on Windows XP In-Reply-To: Message-ID: The mapscript.py module goes hand-in-hand with a _mapscript.pyd (DLL) module. These need to be in the same location. cheers, Sean On Apr 28, 2005, at 9:32 AM, Bas Vanmeulebrouk wrote: > Frank, > > Thank you very much for your reaction. I did rename the one in the > windows/system32 directory. However, I didn't notice that there were > two > gdal12.dll's in the Python installation directory: one in the root and > = > one > in the DLLs subdirectory. I have renamed the one in the DLLs = > subdirectory > and after that got a different error message (now sde90.dll was = > missing).=20 > > This errormessage always appeared, no matter from what location I = > started > Python. Sde90.dll was on my machine, in the C:\Program > Files\Common\ESRI > directory. After I had added this directory to the PATH environment > variable, Python Mapscript was finally working. But does this mean = > Python > Mapscript needs some ESRI files? The ones I have came with the = > installation > of ESRI MapObjects 2.3.=20 > > I want to use Python/Mapscript to generate a map and some HTML which > can = > be > displayed in webbrowser. So I thought I should get a Python/Mapscript = > script > which does this to work as a CGI script. I can get Apache to execute a > Python CGI script, but when I include the line "import mapscript", I > get = > an > internal server error and the following error messages in the Apache = > error > log.=20 > > Traceback (most recent call last):\n > File "c:\\PROGRA~1\\APACHE~1\\apache\\cgi-bin\\HELLO_~1.PY", line > 4, = > in > ?\n > import mapscript\n > File "C:\\programs\\python23\\Lib\\site-packages\\mapscript.py", > line = > 4, > in ?\n > import _mapscript\n > ImportError: DLL load failed: The specified module could not be > found.\n > > I don't have a clue which dll is missing this time. Anyone? Or is there > another way to achieve this? > > Kind regards, > > Bas Vanmeulebrouk.=20 > > -----Original Message----- > From: Frank Warmerdam [mailto:fwarmerdam at gmail.com]=20 > Sent: Thursday, April 28, 2005 2:19 PM > To: Bas Vanmeulebrouk > Cc: MAPSERVER-USERS at lists.umn.edu > Subject: Re: [UMN_MAPSERVER-USERS] Installing Python Mapscript on = > Windows XP > > > On 4/28/05, Bas Vanmeulebrouk wrote: >> =20 >> Hi list, >> =20 >> I have been trying to get Python Mapscript up and running on MS=20 >> Windows XP, but I haven't succeeded yet. I have downloaded the=20 >> binaries at http://hobu.stat.iastate.edu/mapserver/. When I start=20 >> Python from the directory in which I have installed Python, >> Mapscript=20 >> works fine. However, if I start Python from another directory, I >> get=20 >> the following error message when I try import mapscript at the >> Python=20 >> command line: "The procedure entry point=20 >> ?SetnextByIndex at OGRLayer@@UAEHJ at Z could not be located in the >> dynamic=20 >> link library gdal12.dll.". >> =20 >> I have found four copies of gdal12.dll on my machine. I have been=20 >> exeprimenting with the PATH environment variable, I have renamed >> the=20 >> various dll's, but the message stays the same. >> =20 >> Does anyone have an idea what might be wrong? > > Bas,=20 > > I am guessing that one of the 4 gdal12.dll's is in windows\system32,=20 > right? This location takes precidence over the PATH, but even higher > precidence is the directory the program is running in.=20 > > I would suggest you move or rename the version in windows\system32.=20 > > Best regards, > --------------------------------------- > +-------------------------------- > ---------------------------------------+------ > I set the clouds in motion - turn up | Frank Warmerdam, > warmerdam at pobox.com > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent > From hobu at IASTATE.EDU Thu Apr 28 09:16:06 2005 From: hobu at IASTATE.EDU (Howard Butler) Date: Thu, 28 Apr 2005 11:16:06 -0500 Subject: Installing Python Mapscript on Windows XP In-Reply-To: Message-ID: Bas, Regarding the SDE depencency in my MapScript builds.... you need to be very careful to get the exact Python MapScript you need. As you can see on my website, there are *four* Python MapScript builds. At one time, you must have chosen either the "SDE" or "Full" build, which both have the SDE dependency. Use the "Normal" release at all times unless you have a need (and the dlls) for either SDE or Oracle. Regarding the extra gdal12.dll's in C:\python23\ and C:\python23\dlls... The Python uninstaller doesn't deal with dlls in the main sys.prefix directory very well on Windows (especially in an uninstall-reinstall cycle). I've had to manually delete these after an uninstall of Python MapScript (using the control panel). Python 2.4 (which I don't provide builds for) does better at this, and will uninstall dlls in the DLLs directory. Uninstall all of the mapscripts that you have using the control panel and then go into the python23 directory and delete the dlls by hand. This will clean up your Python directory. If you have other gdal12.dlls, you'll either have to move the PATH, clean them up, or do something with them as you see fit. Regarding the issue of not seeing which dll python can't find... run the python script using a command window (dos prompt), rather than IDLE or Activestate. The IDEs swallow the dialog for some reason. FWTools is more cleanly packaged than my mapscript binaries . It comes with its own Python and everything else you might need. I suggest you try it if you continue to have trouble with my binaries. Howard At 10:32 AM 4/28/2005, Bas Vanmeulebrouk wrote: >Frank, > >Thank you very much for your reaction. I did rename the one in the >windows/system32 directory. However, I didn't notice that there were two >gdal12.dll's in the Python installation directory: one in the root and = >one >in the DLLs subdirectory. I have renamed the one in the DLLs = >subdirectory >and after that got a different error message (now sde90.dll was = >missing).=20 > >This errormessage always appeared, no matter from what location I = >started >Python. Sde90.dll was on my machine, in the C:\Program Files\Common\ESRI >directory. After I had added this directory to the PATH environment >variable, Python Mapscript was finally working. But does this mean = >Python >Mapscript needs some ESRI files? The ones I have came with the = >installation >of ESRI MapObjects 2.3.=20 > >I want to use Python/Mapscript to generate a map and some HTML which can = >be >displayed in webbrowser. So I thought I should get a Python/Mapscript = >script >which does this to work as a CGI script. I can get Apache to execute a >Python CGI script, but when I include the line "import mapscript", I get = >an >internal server error and the following error messages in the Apache = >error >log.=20 > >Traceback (most recent call last):\n > File "c:\\PROGRA~1\\APACHE~1\\apache\\cgi-bin\\HELLO_~1.PY", line 4, = >in >?\n > import mapscript\n > File "C:\\programs\\python23\\Lib\\site-packages\\mapscript.py", line = >4, >in ?\n > import _mapscript\n >ImportError: DLL load failed: The specified module could not be found.\n > >I don't have a clue which dll is missing this time. Anyone? Or is there >another way to achieve this? > >Kind regards, > >Bas Vanmeulebrouk.=20 > >-----Original Message----- >From: Frank Warmerdam [mailto:fwarmerdam at gmail.com]=20 >Sent: Thursday, April 28, 2005 2:19 PM >To: Bas Vanmeulebrouk >Cc: MAPSERVER-USERS at lists.umn.edu >Subject: Re: [UMN_MAPSERVER-USERS] Installing Python Mapscript on = >Windows XP > > >On 4/28/05, Bas Vanmeulebrouk wrote: > > =20 > > Hi list, > > =20 > > I have been trying to get Python Mapscript up and running on MS=20 > > Windows XP, but I haven't succeeded yet. I have downloaded the=20 > > binaries at http://hobu.stat.iastate.edu/mapserver/. When I start=20 > > Python from the directory in which I have installed Python, Mapscript=20 > > works fine. However, if I start Python from another directory, I get=20 > > the following error message when I try import mapscript at the Python=20 > > command line: "The procedure entry point=20 > > ?SetnextByIndex at OGRLayer@@UAEHJ at Z could not be located in the dynamic=20 > > link library gdal12.dll.". > > =20 > > I have found four copies of gdal12.dll on my machine. I have been=20 > > exeprimenting with the PATH environment variable, I have renamed the=20 > > various dll's, but the message stays the same. > > =20 > > Does anyone have an idea what might be wrong? > >Bas,=20 > >I am guessing that one of the 4 gdal12.dll's is in windows\system32,=20 >right? This location takes precidence over the PATH, but even higher >precidence is the directory the program is running in.=20 > >I would suggest you move or rename the version in windows\system32.=20 > >Best regards, >---------------------------------------+-------------------------------- >---------------------------------------+------ >I set the clouds in motion - turn up | Frank Warmerdam, >warmerdam at pobox.com >light and sound - activate the windows | http://pobox.com/~warmerdam >and watch the world go round - Rush | Geospatial Programmer for Rent From nbarker at RSINC.COM Thu Apr 28 09:48:07 2005 From: nbarker at RSINC.COM (Norman Barker) Date: Thu, 28 Apr 2005 17:48:07 +0100 Subject: basic user authentication in MapServer using Apache Message-ID: hi, I am using htpasswd within Apache to create a password file then with a url such as http://localhost/cgi-bin/mapserv?map=/tmp/admin/admin.map ... I would like a popup to appear depending on the value of map I have tried .htaccess files and adding basic authentication to httpd.conf Has any one done something similar with Mapserver? The authentication needs to be per map file, since I am defining a map file per user role/group. Many thanks, Norman Barker -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of Howard Butler Sent: Thursday, April 28, 2005 5:16 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Installing Python Mapscript on Windows XP Bas, Regarding the SDE depencency in my MapScript builds.... you need to be very careful to get the exact Python MapScript you need. As you can see on my website, there are *four* Python MapScript builds. At one time, you must have chosen either the "SDE" or "Full" build, which both have the SDE dependency. Use the "Normal" release at all times unless you have a need (and the dlls) for either SDE or Oracle. Regarding the extra gdal12.dll's in C:\python23\ and C:\python23\dlls... The Python uninstaller doesn't deal with dlls in the main sys.prefix directory very well on Windows (especially in an uninstall-reinstall cycle). I've had to manually delete these after an uninstall of Python MapScript (using the control panel). Python 2.4 (which I don't provide builds for) does better at this, and will uninstall dlls in the DLLs directory. Uninstall all of the mapscripts that you have using the control panel and then go into the python23 directory and delete the dlls by hand. This will clean up your Python directory. If you have other gdal12.dlls, you'll either have to move the PATH, clean them up, or do something with them as you see fit. Regarding the issue of not seeing which dll python can't find... run the python script using a command window (dos prompt), rather than IDLE or Activestate. The IDEs swallow the dialog for some reason. FWTools is more cleanly packaged than my mapscript binaries . It comes with its own Python and everything else you might need. I suggest you try it if you continue to have trouble with my binaries. Howard At 10:32 AM 4/28/2005, Bas Vanmeulebrouk wrote: >Frank, > >Thank you very much for your reaction. I did rename the one in the >windows/system32 directory. However, I didn't notice that there were two >gdal12.dll's in the Python installation directory: one in the root and = >one >in the DLLs subdirectory. I have renamed the one in the DLLs = >subdirectory >and after that got a different error message (now sde90.dll was = >missing).=20 > >This errormessage always appeared, no matter from what location I = >started >Python. Sde90.dll was on my machine, in the C:\Program Files\Common\ESRI >directory. After I had added this directory to the PATH environment >variable, Python Mapscript was finally working. But does this mean = >Python >Mapscript needs some ESRI files? The ones I have came with the = >installation >of ESRI MapObjects 2.3.=20 > >I want to use Python/Mapscript to generate a map and some HTML which can = >be >displayed in webbrowser. So I thought I should get a Python/Mapscript = >script >which does this to work as a CGI script. I can get Apache to execute a >Python CGI script, but when I include the line "import mapscript", I get = >an >internal server error and the following error messages in the Apache = >error >log.=20 > >Traceback (most recent call last):\n > File "c:\\PROGRA~1\\APACHE~1\\apache\\cgi-bin\\HELLO_~1.PY", line 4, = >in >?\n > import mapscript\n > File "C:\\programs\\python23\\Lib\\site-packages\\mapscript.py", line = >4, >in ?\n > import _mapscript\n >ImportError: DLL load failed: The specified module could not be found.\n > >I don't have a clue which dll is missing this time. Anyone? Or is there >another way to achieve this? > >Kind regards, > >Bas Vanmeulebrouk.=20 > >-----Original Message----- >From: Frank Warmerdam [mailto:fwarmerdam at gmail.com]=20 >Sent: Thursday, April 28, 2005 2:19 PM >To: Bas Vanmeulebrouk >Cc: MAPSERVER-USERS at lists.umn.edu >Subject: Re: [UMN_MAPSERVER-USERS] Installing Python Mapscript on = >Windows XP > > >On 4/28/05, Bas Vanmeulebrouk wrote: > > =20 > > Hi list, > > =20 > > I have been trying to get Python Mapscript up and running on MS=20 > > Windows XP, but I haven't succeeded yet. I have downloaded the=20 > > binaries at http://hobu.stat.iastate.edu/mapserver/. When I start=20 > > Python from the directory in which I have installed Python, Mapscript=20 > > works fine. However, if I start Python from another directory, I get=20 > > the following error message when I try import mapscript at the Python=20 > > command line: "The procedure entry point=20 > > ?SetnextByIndex at OGRLayer@@UAEHJ at Z could not be located in the dynamic=20 > > link library gdal12.dll.". > > =20 > > I have found four copies of gdal12.dll on my machine. I have been=20 > > exeprimenting with the PATH environment variable, I have renamed the=20 > > various dll's, but the message stays the same. > > =20 > > Does anyone have an idea what might be wrong? > >Bas,=20 > >I am guessing that one of the 4 gdal12.dll's is in windows\system32,=20 >right? This location takes precidence over the PATH, but even higher >precidence is the directory the program is running in.=20 > >I would suggest you move or rename the version in windows\system32.=20 > >Best regards, >---------------------------------------+-------------------------------- >---------------------------------------+------ >I set the clouds in motion - turn up | Frank Warmerdam, >warmerdam at pobox.com >light and sound - activate the windows | http://pobox.com/~warmerdam >and watch the world go round - Rush | Geospatial Programmer for Rent From steve.lime at DNR.STATE.MN.US Thu Apr 28 09:55:26 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Thu, 28 Apr 2005 11:55:26 -0500 Subject: [UMN_MAPSERVER-USERS] dynamically change reference map image Message-ID: I did look through the source code, and at least for 4.4+ you should be able to use something like: map_reference_image=foo.gif. On my labtop I think I even had a demo application that did just this, I'll check. There are no security hobbles for a reference map. Steve >>> Dylan Beaudette 04/27/05 1:37 PM >>> On Wednesday 27 April 2005 01:24 pm, Richard Greenwood wrote: > > > > On 22 Apr 2005 at 14:42, Dylan Beaudette wrote: > > > > Hi everyone > > > > is it possible to dynamically set the properties of the REFERENCE object > > in a map file? > > > > for example, > > > > i would like to adjust my map file based on URL arguments: > > > > > > REFERENCE > > STATUS ON > > IMAGE "%file_name%.png" > > ... > > Have you set the DATAPATTERN? See: > http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#map > > Richard Greenwood I have tried all of the above suggestions, and nothing seems to work. For now, I am using a more general static reference map as a temporary fix. this was with mapserver 4.4.2 compiled from source on Debian/Testing. -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From amy.stender at ERDC.USACE.ARMY.MIL Thu Apr 28 09:45:54 2005 From: amy.stender at ERDC.USACE.ARMY.MIL (Amy Stender) Date: Thu, 28 Apr 2005 11:45:54 -0500 Subject: Using multiple label column in a label Message-ID: The way I would set it up within the mapfile... LAYER NAME name DATA data TYPE point STATUS off LABELITEM "OWNER" CLASS NAME "Blah" SYMBOL 0 SIZE 12 COLOR 0 0 0 TEXT ([OWNER] [DESCRIPTION]) LABEL ANTIALIAS true COLOR 0 0 0 FONT "arial" SIZE 8 TYPE truetype END END END If you want DESCRIPTION inside ()'s, you might try \'s before them so they're taken literally. I'm not sure if that'll work or not... -Amy From raghu at KU.EDU Thu Apr 28 10:01:53 2005 From: raghu at KU.EDU (Shantha, Raghavendra Vasanth) Date: Thu, 28 Apr 2005 12:01:53 -0500 Subject: convert metres to decimal deg Message-ID: Hi, I have a few raster datasets in Geographic coordinate system (extent units in decimal deg), and a few datasets in Proj Coordinate system (extent units in meters) Are there any resources/formulae to convert meters to corresponding decimal degrees, without changing the projection type? Thanks, Raghu From pauljame at GMAIL.COM Thu Apr 28 10:19:48 2005 From: pauljame at GMAIL.COM (Paul james) Date: Thu, 28 Apr 2005 14:19:48 -0300 Subject: Find nearest line ... Message-ID: I?m using PostGis/mapscript, and I found the nearest line of a point with queryByPoint... And I can print this line with drawQuery... But I need to identify this line in postgre/POSTGIS... Is it posible? thank you Paul From lehrs at ERAU.EDU Thu Apr 28 11:30:05 2005 From: lehrs at ERAU.EDU (Steve Lehr) Date: Thu, 28 Apr 2005 13:30:05 -0500 Subject: Labeling - Can you truncate a numeric type to not show decimals Message-ID: Hey guys - I have a topographical map and the elevation number in the .dbf file is defined to be a numeric field with 5 decimals: ELEVATION N 18 5 Is there a way to simply truncate the decimals below for the field ELEVATION that I wish to label. LABELITEM (int) ELEVATION :-) I'm using CGI Mapserver and map files. Or do I have to create a new .dbf and add a field to the .dbf of type N with no decimals and populate it with a script - i.e. scrub the file. LAYER NAME topo DATA topo LABELITEM ELEVATION CLASS COLOR 0 0 0 LABEL SIZE SMALL END END END Thanks -- See you in June! From rsuddaby at NRCAN.GC.CA Thu Apr 28 12:00:44 2005 From: rsuddaby at NRCAN.GC.CA (Rod Suddaby) Date: Thu, 28 Apr 2005 14:00:44 -0500 Subject: Trouble getting SLD working Message-ID: Hi List: I'm a newbie to SLD and I've been trying to figure out why my build of mapserver will not apply the styles. I've created the following SLD xml file: [test_sld.xml] provinces myStyle #00ff00 #0000ff 3 The layer block of my mapfile is: LAYER NAME provinces DATA prov_prj PROJECTION "init=epsg:42304" END UNITS METERS TYPE POLYGON STATUS ON # CLASS # COLOR 255 0 0 # OUTLINECOLOR 0 0 255 # END END I've sent the following request to the mapserver: http://localhost/cgi-bin/mapserv?map=prov.map&version=1.1. 1&request=getMap&layers=provinces&styles=&sld=http://localhost/test_sld.xml ... and all I get is a blank image. Checking the apache access_log shows no hit for the 'test_sld.xml' file. It seems that mapserver is simply ignoring the sld parameter. I've also tried putting the "wms_sld_url" tag in the layer metadata, tried the "wms_sld_body" tag, and tried feeding the xml directly using the sld_body parameter -- same result Heres the output of mapserv -v: %dragon>./mapserv -v MapServer version 4.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBNP SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=TIFF INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE O.S. Is Suse Linux 9.1 Can anyone see if I'm missing something here? Also, are there any other resources available regarding SLD other than the spec and the HOWTO docs? Thanks, Rod. From bartvde at XS4ALL.NL Thu Apr 28 12:10:19 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Thu, 28 Apr 2005 21:10:19 +0200 Subject: WFS: distance not working with DWithin? In-Reply-To: Message-ID: Okay, found out this was a bug in mapogcfilter.c (line 294). else if (FLTIsLineFilter(psNode) || FLTIsPolygonFilter(psNode)) { bShapeQuery = 1; // psQueryShape = FLTGetShape(psNode, NULL); psQueryShape = FLTGetShape(psNode, &dfDistance); } Details in bug report 1335. Best regards, Bart On Thu, 28 Apr 2005 13:45:36 +0200, Bart van den Eijnden wrote: > Hi list, > > I am trying to specify a distance for the DWithin operator but I always > get back the exact same results (2 results to be exact) irrespective of > what distance I am using. Is the distance parameter working? > > This is the request I am using: > > xmlns="http://www.opengis.net/wfs" > xmlns:gml="http://www.opengis.net/gml" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:xlink="http://www.w3.org/1999/xlink" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://schemas.opengis.net/wfs/1.0.0 > WFS-basic.xsd"> typename="bislocaties">Geometry srsName="EPSG:28992">73999.999950,446376.397950 > 74013.112050,446359.819150 74031.775050,446374.369000 > 74074.128000,446321.128050 74005.396050,446262.444950 > 73999.999950,446260.640000 73998.679950,446260.199000 > 73971.634050,446263.116950 73968.018000,446264.092050 > 73920.037950,446320.924000 73921.153050,446322.223900 > 73951.420950,446348.322000 73964.763000,446359.727100 > 73995.931050,446381.542950 > 73999.999950,446376.397950 units="m">5000 > > Thanks in advance. > > Best regards, > Bart > > Bart van den Eijnden > Syncera-ITSolutions > Postbus 270 > 2600 AG DELFT > > tel.nr.: 015-7512436 > email: BEN at Syncera-ITSolutions.nl > > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From bartvde at XS4ALL.NL Thu Apr 28 12:25:50 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Thu, 28 Apr 2005 21:25:50 +0200 Subject: Trouble getting SLD working In-Reply-To: Message-ID: Hi Rod, I can't see anything obvious wrong with what you are doing. A few questions: -is your WMS GetCapabilities working? -does the LAYER work without an SLD, ie when you specify a CLASS? -does it work if you leave out the style parameter in the request? -your WMS request is not a full WMS request, it should contain a BBOX, WIDTH, HEIGHT and SRS (among others). But Mapserver seems to be leniant towards this and probably uses MAP file values. Best regards, Bart On Thu, 28 Apr 2005 14:00:44 -0500, Rod Suddaby wrote: > Hi List: > I'm a newbie to SLD and I've been trying to figure out why my build of > mapserver will not apply the styles. I've created the following SLD xml > file: > > [test_sld.xml] > xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ > ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3. > org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/sld > http://schemas.opengeospatial.net/sld/1.0.0/StyledLayerDescriptor.xsd"> > > provinces > > myStyle > > > > > #00ff00 > > > #0000ff > 3 > > > > > > > > > The layer block of my mapfile is: > > LAYER > NAME provinces > DATA prov_prj > PROJECTION > "init=epsg:42304" > END > UNITS METERS > TYPE POLYGON > STATUS ON > > # CLASS > # COLOR 255 0 0 > # OUTLINECOLOR 0 0 255 > # END > > END > > > I've sent the following request to the mapserver: > http://localhost/cgi-bin/mapserv?map=prov.map&version=1.1. > 1&request=getMap&layers=provinces&styles=&sld=http://localhost/test_sld.xml > > ... and all I get is a blank image. Checking the apache access_log shows > no > hit for the 'test_sld.xml' file. It seems that mapserver is simply > ignoring > the sld parameter. > I've also tried putting the "wms_sld_url" tag in the layer metadata, > tried > the "wms_sld_body" tag, and tried feeding the xml directly using the > sld_body parameter -- same result > > Heres the output of mapserv -v: > > %dragon>./mapserv -v > MapServer version 4.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBNP > SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT > SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=TIFF INPUT=EPPL7 > INPUT=POSTGIS > INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE > > O.S. Is Suse Linux 9.1 > > Can anyone see if I'm missing something here? > Also, are there any other resources available regarding SLD other than > the > spec and the HOWTO docs? > > Thanks, > Rod. > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From craig.nakamoto at CLAERO.COM Thu Apr 28 12:39:24 2005 From: craig.nakamoto at CLAERO.COM (Craig Nakamoto) Date: Thu, 28 Apr 2005 13:39:24 -0600 Subject: UNSUBSCRIBE Message-ID: -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Bart van den Eijnden Sent: Thursday, April 28, 2005 1:26 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Trouble getting SLD working Hi Rod, I can't see anything obvious wrong with what you are doing. A few questions: -is your WMS GetCapabilities working? -does the LAYER work without an SLD, ie when you specify a CLASS? -does it work if you leave out the style parameter in the request? -your WMS request is not a full WMS request, it should contain a BBOX, WIDTH, HEIGHT and SRS (among others). But Mapserver seems to be leniant towards this and probably uses MAP file values. Best regards, Bart On Thu, 28 Apr 2005 14:00:44 -0500, Rod Suddaby wrote: > Hi List: > I'm a newbie to SLD and I've been trying to figure out why my build of > mapserver will not apply the styles. I've created the following SLD xml > file: > > [test_sld.xml] > xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ > ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3. > org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/sld > http://schemas.opengeospatial.net/sld/1.0.0/StyledLayerDescriptor.xsd"> > > provinces > > myStyle > > > > > #00ff00 > > > #0000ff > 3 > > > > > > > > > The layer block of my mapfile is: > > LAYER > NAME provinces > DATA prov_prj > PROJECTION > "init=epsg:42304" > END > UNITS METERS > TYPE POLYGON > STATUS ON > > # CLASS > # COLOR 255 0 0 > # OUTLINECOLOR 0 0 255 > # END > > END > > > I've sent the following request to the mapserver: > http://localhost/cgi-bin/mapserv?map=prov.map&version=1.1. > 1&request=getMap&layers=provinces&styles=&sld=http://localhost/test_sld. xml > > ... and all I get is a blank image. Checking the apache access_log shows > no > hit for the 'test_sld.xml' file. It seems that mapserver is simply > ignoring > the sld parameter. > I've also tried putting the "wms_sld_url" tag in the layer metadata, > tried > the "wms_sld_body" tag, and tried feeding the xml directly using the > sld_body parameter -- same result > > Heres the output of mapserv -v: > > %dragon>./mapserv -v > MapServer version 4.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBNP > SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT > SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=TIFF INPUT=EPPL7 > INPUT=POSTGIS > INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE > > O.S. Is Suse Linux 9.1 > > Can anyone see if I'm missing something here? > Also, are there any other resources available regarding SLD other than > the > spec and the HOWTO docs? > > Thanks, > Rod. > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From ortelius at GMAIL.COM Thu Apr 28 14:57:06 2005 From: ortelius at GMAIL.COM (Jeffrey Johnson) Date: Thu, 28 Apr 2005 14:57:06 -0700 Subject: WFS Client Problems Message-ID: Hello list, I am having trouble getting mapserver to properly retrieve and display data via wfs, and wanted to see if anyone can help. Mapserver is compiled with wfs and wms client support and the wms client works fine. Ok, here is the layer definition in my map file. LAYER NAME countries TYPE POLYGON STATUS ON CONNECTIONTYPE WFS CONNECTION "http://webservices.ionicsoft.com/unData/wfs/UN?" METADATA "wfs_service" "WFS" "wfs_typename" "wfs:COUNTRY" "wfs_version" "1.0.0" END PROJECTION "init=epsg:4326" END CLASS TEMPLATE "dummy.html" OUTLINECOLOR 0 0 0 END END Note: dummy.html doesn't actually exist, but I dont think it has to??? There are no errors returned with this layer is activated, but the output in the IMAGEPATH dir looks like this, and nothing is drawn. inapplicable I assume that this means Mapserver made a request to the wfs server, but no results were returned. First of all, how do I find out the exact URL request made to the WFS server? I suppose that I may be able to debug it this way. I can construct a url myself and the server returns GML correctly. Thanks in advance, Jeff From RSuddaby at NRCAN.GC.CA Thu Apr 28 15:04:30 2005 From: RSuddaby at NRCAN.GC.CA (Suddaby, Rod) Date: Thu, 28 Apr 2005 18:04:30 -0400 Subject: Trouble getting SLD working Message-ID: Hi Bart, Yes, Mapserver operates fine with the exception of the SLD. The GetCapabilities responds with (with respect to SLD): and the 'request=getStyles' request reports back fine as well (indicating the styles I set in the CLASS block). Using the CLASS block without the SLD works as expected, too. (BTW, under normal circumstances will the SLD override the CLASS specified in the map file?) The '&style=' parameter makes no difference whether it is present or not. Does Mapserver have a debug mode where I could trace what is going on internally? Still stumped, Rod. -----Original Message----- From: Bart van den Eijnden [mailto:bartvde at xs4all.nl] Sent: Thursday, April 28, 2005 1:26 PM To: Rod Suddaby; MAPSERVER-USERS at lists.umn.edu Subject: Re: [UMN_MAPSERVER-USERS] Trouble getting SLD working Hi Rod, I can't see anything obvious wrong with what you are doing. A few questions: -is your WMS GetCapabilities working? -does the LAYER work without an SLD, ie when you specify a CLASS? -does it work if you leave out the style parameter in the request? -your WMS request is not a full WMS request, it should contain a BBOX, WIDTH, HEIGHT and SRS (among others). But Mapserver seems to be leniant towards this and probably uses MAP file values. Best regards, Bart On Thu, 28 Apr 2005 14:00:44 -0500, Rod Suddaby wrote: > Hi List: > I'm a newbie to SLD and I've been trying to figure out why my build of > mapserver will not apply the styles. I've created the following SLD xml > file: > > [test_sld.xml] > xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ > ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3. > org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/sld > http://schemas.opengeospatial.net/sld/1.0.0/StyledLayerDescriptor.xsd"> > > provinces > > myStyle > > > > > #00ff00 > > > #0000ff > 3 > > > > > > > > > The layer block of my mapfile is: > > LAYER > NAME provinces > DATA prov_prj > PROJECTION > "init=epsg:42304" > END > UNITS METERS > TYPE POLYGON > STATUS ON > > # CLASS > # COLOR 255 0 0 > # OUTLINECOLOR 0 0 255 > # END > > END > > > I've sent the following request to the mapserver: > http://localhost/cgi-bin/mapserv?map=prov.map&version=1.1. > 1&request=getMap&layers=provinces&styles=&sld=http://localhost/test_sld.xml > > ... and all I get is a blank image. Checking the apache access_log shows > no > hit for the 'test_sld.xml' file. It seems that mapserver is simply > ignoring > the sld parameter. > I've also tried putting the "wms_sld_url" tag in the layer metadata, > tried > the "wms_sld_body" tag, and tried feeding the xml directly using the > sld_body parameter -- same result > > Heres the output of mapserv -v: > > %dragon>./mapserv -v > MapServer version 4.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBNP > SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT > SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=TIFF INPUT=EPPL7 > INPUT=POSTGIS > INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE > > O.S. Is Suse Linux 9.1 > > Can anyone see if I'm missing something here? > Also, are there any other resources available regarding SLD other than > the > spec and the HOWTO docs? > > Thanks, > Rod. > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From steve.lime at DNR.STATE.MN.US Thu Apr 28 16:04:23 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Thu, 28 Apr 2005 18:04:23 -0500 Subject: Find nearest line ... Message-ID: Paul: You should be able to retrieve the line by stepping through the search layer search results and then doing a getShape based on the results. Depending on the language I'm sure there are a number of examples readily available. Steve >>> Paul james 04/28/05 12:19 PM >>> I?m using PostGis/mapscript, and I found the nearest line of a point with queryByPoint... And I can print this line with drawQuery... But I need to identify this line in postgre/POSTGIS... Is it posible? thank you Paul From steve.lime at DNR.STATE.MN.US Thu Apr 28 16:06:54 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Thu, 28 Apr 2005 18:06:54 -0500 Subject: Labeling - Can you truncate a numeric type to not show decimals Message-ID: Sorry Steve, you can't explicitly control that, you must preprocess the attributes. Steve >>> Steve Lehr 04/28/05 1:30 PM >>> Hey guys - I have a topographical map and the elevation number in the .dbf file is defined to be a numeric field with 5 decimals: ELEVATION N 18 5 Is there a way to simply truncate the decimals below for the field ELEVATION that I wish to label. LABELITEM (int) ELEVATION :-) I'm using CGI Mapserver and map files. Or do I have to create a new .dbf and add a field to the .dbf of type N with no decimals and populate it with a script - i.e. scrub the file. LAYER NAME topo DATA topo LABELITEM ELEVATION CLASS COLOR 0 0 0 LABEL SIZE SMALL END END END Thanks -- See you in June! From ed at TOPOZONE.COM Thu Apr 28 18:53:41 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Thu, 28 Apr 2005 21:53:41 -0400 Subject: convert metres to decimal deg Message-ID: Raghu - You can't. The relationship is non-linear, and depends on the location of the point. MapServer can easily reproject your data layers dynamically for you so you can combine those data sets in a single map. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Shantha, Raghavendra Vasanth Sent: Thursday, April 28, 2005 1:02 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] convert metres to decimal deg Hi, I have a few raster datasets in Geographic coordinate system (extent units in decimal deg), and a few datasets in Proj Coordinate system (extent units in meters) Are there any resources/formulae to convert meters to corresponding decimal degrees, without changing the projection type? Thanks, Raghu From neuchi at TCI-COM.BIZ Thu Apr 28 19:55:27 2005 From: neuchi at TCI-COM.BIZ (Akio Neuchi) Date: Fri, 29 Apr 2005 11:55:27 +0900 Subject: MAPSERVER-USERS Digest - 26 Apr 2005 to 27 Apr 2005 (#2005-121) In-Reply-To: Message-ID: Hello to all, I am still quite new working with MapServer, and this is my first time to process a Raster Image, especially with GIF files. My Vector Layers work fine on MAP file. I tried the following definition with every combination of parametres, and the result was Null, just a shade appeared without image. I have PostGre, Proj, GD, etc. and GDAL(v1.1.9) enabled on ./config, and the world file is created with proper coordinate. Am I doing something basically wrong? Is this a question of ./config, missing something else? Please let me have your advices. Thanks in advance for your help. Akio Neuchi ---------------------------- MAP NAME rastest STATUS ON SIZE 600 700 EXTENT 121.938889 23.442222 149.500001 46.466666 UNITS dd SHAPEPATH "data" FONTSET "./fonts/fonts.lst" #SYMBOLSET "/var/www/html/zoom2it_mapserver/map_symbols/symbols.sym" IMAGECOLOR 225 240 200 DEBUG ON IMAGETYPE GIF #IMAGETYPE PNG #IMAGETYPE JPEG #IMAGEQUALITY 400 WEB EMPTY "/gistest/empty.html" HEADER decide_route_header.html TEMPLATE decide_route.html FOOTER decide_route_footer.html MINSCALE 0 MAXSCALE 1500000000 IMAGEPATH /var/opt/SUNWappserver7/domains/domain1/server1/docroot/gistest/tmp IMAGEURL /gistest/tmp LOG /var/opt/SUNWappserver7/domains/domain1/server1/docroot/gistest/rastest.log # TEMPLATE "decide_route.html" METADATA WMS_TITLE "Raster Map Display Demo" WMS_ABSTRACT "Created by TCI" WMS_ACCESSCONSTRAINTS none END END QUERYMAP SIZE 200 200 STATUS ON STYLE HILITE COLOR 255 0 0 END OUTPUTFORMAT NAME gif MIMETYPE "image/gif" DRIVER "GD/GIF" EXTENSION "gif" IMAGEMODE PC256 # TRANSPARENT FALSE # FORMATOPTION "INTERLACE=OFF" END OUTPUTFORMAT NAME png MIMETYPE "image/png" DRIVER "GD/PNG" EXTENSION "png" IMAGEMODE PC256 # TRANSPARENT FALSE END OUTPUTFORMAT NAME jpeg MIMETYPE "image/jpeg" DRIVER "GD/JPEG" EXTENSION "jpg" IMAGEMODE RGB # TRANSPARENT FALSE END # RASTER Layer LAYER NAME "RAS365313" GROUP "B_RASTER" TYPE RASTER STATUS ON # STATUS DEFAULT # TOLERANCE 5 # TOLERANCEUNITS PIXELS # OFFSITE 0 0 0 OFFSITE 169 109 154 DATA MS12000DEF365313.gif # DATA "MS12000DEF365313.png" # DATA "MS12000DEF365313.jpeg" CLASS COLOR 225 200 100 END DUMP TRUE DEBUG ON END END # Map File ---------------- From neuchi at TCI-COM.BIZ Thu Apr 28 19:59:08 2005 From: neuchi at TCI-COM.BIZ (Akio Neuchi) Date: Fri, 29 Apr 2005 11:59:08 +0900 Subject: GIF Raster Image Process Problem Message-ID: -----Original Message----- From: Akio Neuchi [mailto:neuchi at tci-com.biz] Sent: Friday, April 29, 2005 11:55 AM To: 'UMN MapServer Users List' Cc: 'Daniel Morissette' Subject: GIF Raster Image Process Problem Hello to all, I am still quite new working with MapServer, and this is my first time to process a Raster Image, especially with GIF files. My Vector Layers work fine on MAP file. I tried the following definition with every combination of parametres, and the result was Null, just a shade appeared without image. I have PostGre, Proj, GD, etc. and GDAL(v1.1.9) enabled on ./config, and the world file is created with proper coordinate. Am I doing something basically wrong? Is this a question of ./config, missing something else? Please let me have your advices. Thanks in advance for your help. Akio Neuchi ---------------------------- MAP NAME rastest STATUS ON SIZE 600 700 EXTENT 121.938889 23.442222 149.500001 46.466666 UNITS dd SHAPEPATH "data" FONTSET "./fonts/fonts.lst" #SYMBOLSET "/var/www/html/zoom2it_mapserver/map_symbols/symbols.sym" IMAGECOLOR 225 240 200 DEBUG ON IMAGETYPE GIF #IMAGETYPE PNG #IMAGETYPE JPEG #IMAGEQUALITY 400 WEB EMPTY "/gistest/empty.html" HEADER decide_route_header.html TEMPLATE decide_route.html FOOTER decide_route_footer.html MINSCALE 0 MAXSCALE 1500000000 IMAGEPATH /var/opt/SUNWappserver7/domains/domain1/server1/docroot/gistest/tmp IMAGEURL /gistest/tmp LOG /var/opt/SUNWappserver7/domains/domain1/server1/docroot/gistest/rastest.log # TEMPLATE "decide_route.html" METADATA WMS_TITLE "Raster Map Display Demo" WMS_ABSTRACT "Created by TCI" WMS_ACCESSCONSTRAINTS none END END QUERYMAP SIZE 200 200 STATUS ON STYLE HILITE COLOR 255 0 0 END OUTPUTFORMAT NAME gif MIMETYPE "image/gif" DRIVER "GD/GIF" EXTENSION "gif" IMAGEMODE PC256 # TRANSPARENT FALSE # FORMATOPTION "INTERLACE=OFF" END OUTPUTFORMAT NAME png MIMETYPE "image/png" DRIVER "GD/PNG" EXTENSION "png" IMAGEMODE PC256 # TRANSPARENT FALSE END OUTPUTFORMAT NAME jpeg MIMETYPE "image/jpeg" DRIVER "GD/JPEG" EXTENSION "jpg" IMAGEMODE RGB # TRANSPARENT FALSE END # RASTER Layer LAYER NAME "RAS365313" GROUP "B_RASTER" TYPE RASTER STATUS ON # STATUS DEFAULT # TOLERANCE 5 # TOLERANCEUNITS PIXELS # OFFSITE 0 0 0 OFFSITE 169 109 154 DATA MS12000DEF365313.gif # DATA "MS12000DEF365313.png" # DATA "MS12000DEF365313.jpeg" CLASS COLOR 225 200 100 END DUMP TRUE DEBUG ON END END # Map File ---------------- From tylermitchell at SHAW.CA Thu Apr 28 21:24:16 2005 From: tylermitchell at SHAW.CA (Tyler Mitchell) Date: Thu, 28 Apr 2005 21:24:16 -0700 Subject: WFS Client Problems In-Reply-To: Message-ID: Hi Jeffrey, The bad news is that it isn't really a WFS server! Unless I'm seriously missing something - this server is lying saying that it is WFS (repeatedly used in the capabilities document). Looking its capabilities document: http://webservices.ionicsoft.com/unData/wfs/UN?request=capabilities doesn't show any sign of really being a WFS, but only a WMS (although the acronym is used there a lot). If you know the people that put this together (anyone on this list!?), direct them our way so we can help fix them up. Can you show us how you got it to return GML properly, other than for a feature query? The good news is, it is a WMS and works. Here is the layer definition that should work for you. LAYER NAME country TYPE RASTER STATUS DEFAULT CONNECTIONTYPE WMS CONNECTION "http://webservices.ionicsoft.com/unData/wfs/UN?" METADATA "wms_server_version" "1.0.0" "wms_name" "COUNTRY" "wms_format" "PNG" END PROJECTION "init=epsg:4326" END END You won't be able to style the layers or change colours, but they've done a good job making things look alright. Let me know if you need more help. Please cc: me directly to get my attention. Tyler On April 28, 2005 02:57 pm, Jeffrey Johnson wrote: > Hello list, > > I am having trouble getting mapserver to properly retrieve and display > data via wfs, and wanted to see if anyone can help. Mapserver is > compiled with wfs and wms client support and the wms client works > fine. > > Ok, here is the layer definition in my map file. > > LAYER > NAME countries > TYPE POLYGON > STATUS ON > CONNECTIONTYPE WFS > CONNECTION > "http://webservices.ionicsoft.com/unData/wfs/UN?" METADATA > "wfs_service" "WFS" > "wfs_typename" "wfs:COUNTRY" > "wfs_version" "1.0.0" > END > PROJECTION > "init=epsg:4326" > END > CLASS > TEMPLATE "dummy.html" > OUTLINECOLOR 0 0 0 > END > END > > Note: dummy.html doesn't actually exist, but I dont think it has to??? > > There are no errors returned with this layer is activated, but the > output in the IMAGEPATH dir looks like this, and nothing is drawn. > > xsi:schemaLocation="http://www.ionicsoft.com/wfs > http://webservices.ionicsoft.com/unData/wfs/UN?REQUEST=DescribeAllFeatureTy >pe&SERVICE=WFS http://www.opengis.net/wfs > http://webservices.ionicsoft.com/unData/wfs/UN/REQUEST/get/DATA/LPR/wfs/bas >ic.xsd" xmlns:gml="http://www.opengis.net/gml" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xlink="http://www.w3.org/1999/xlink" > xmlns:ogcwfs="http://www.opengis.net/wfs"> > inapplicable > > > > I assume that this means Mapserver made a request to the wfs server, > but no results were returned. First of all, how do I find out the > exact URL request made to the WFS server? I suppose that I may be able > to debug it this way. I can construct a url myself and the server > returns GML correctly. > > Thanks in advance, > > Jeff From calde at GMX.NET Thu Apr 28 22:39:18 2005 From: calde at GMX.NET (Daniel Caldeweyher) Date: Fri, 29 Apr 2005 15:39:18 +1000 Subject: Mapscript - tricky save map problem when DATA containes quotes Message-ID: Hi, I have encountered a bit of a tricky situation. My mapping application allows users to dynamically add layers using a wizard (similar to MS-ACCESS Report Wizard, where the user can select fields from different tables). The application generates SQL from this selection, more precise, the truncated SQL part which forms the DATA element of a layer. To be on the safe side with table and column names (I use PostGIS) I put all names in quotes. However when I then dynamically save the mapobj to a mapfile, mapscript places quotes around the DATA statement, which when trying to load that file again, will cause problems as the parse thinks the the first quote is the end of the DATA element, which it obviously isn't. I noticed that with EXPRESSION's when putting the expression inside parantheses () it will not enclose the expression with quotes, however trying to do so with DATA doesn't work. Since I keep the meta-information of my layer wizard, I can just simply set DATA to an empty string before saving the map, and use that meta-information (stored in the file as METADATA) I can re-generate my DATA string when loading the file. However I don't like this solution and was wondering if there is a better solution for cases when the DATA string itself contains quotes (as well as single quotes). Thanks, Daniel From siki at AGT.BME.HU Fri Apr 29 01:31:00 2005 From: siki at AGT.BME.HU (Siki Zoltan) Date: Fri, 29 Apr 2005 07:31:00 -0100 Subject: GIF Raster Image Process Problem {Scanned} In-Reply-To: Message-ID: Dear Akio, You should define EXTENT, UNITS and SHAPEPATH at separate lines. Do you have world file to your image? Check the extents. Try STATUS DEFAULT. Bye Zoltan On Fri, 29 Apr 2005, Akio Neuchi wrote: > Hello to all, > > I am still quite new working with MapServer, and this is my first time to > process a Raster Image, especially with GIF files. My Vector Layers work > fine on MAP file. > I tried the following definition with every combination of parametres, and > the result was Null, just a shade appeared without image. > I have PostGre, Proj, GD, etc. and GDAL(v1.1.9) enabled on ./config, and the > world file is created with proper coordinate. > Am I doing something basically wrong? Is this a question of ./config, > missing something else? > Please let me have your advices. Thanks in advance for your help. > > Akio Neuchi > > ---------------------------- > MAP > > NAME rastest > STATUS ON > SIZE 600 700 > EXTENT 121.938889 23.442222 149.500001 46.466666 UNITS dd SHAPEPATH "data" > FONTSET "./fonts/fonts.lst" > #SYMBOLSET "/var/www/html/zoom2it_mapserver/map_symbols/symbols.sym" > IMAGECOLOR 225 240 200 > DEBUG ON > > IMAGETYPE GIF > #IMAGETYPE PNG > #IMAGETYPE JPEG > #IMAGEQUALITY 400 > > WEB > EMPTY "/gistest/empty.html" > HEADER decide_route_header.html > TEMPLATE decide_route.html > FOOTER decide_route_footer.html > MINSCALE 0 > MAXSCALE 1500000000 > IMAGEPATH > /var/opt/SUNWappserver7/domains/domain1/server1/docroot/gistest/tmp > IMAGEURL /gistest/tmp > LOG > /var/opt/SUNWappserver7/domains/domain1/server1/docroot/gistest/rastest.log > # TEMPLATE "decide_route.html" > METADATA > WMS_TITLE "Raster Map Display Demo" > WMS_ABSTRACT "Created by TCI" > WMS_ACCESSCONSTRAINTS none > END > END > > QUERYMAP > SIZE 200 200 > STATUS ON > STYLE HILITE > COLOR 255 0 0 > END > > OUTPUTFORMAT > NAME gif > MIMETYPE "image/gif" > DRIVER "GD/GIF" > EXTENSION "gif" > IMAGEMODE PC256 > # TRANSPARENT FALSE > # FORMATOPTION "INTERLACE=OFF" > END > OUTPUTFORMAT > NAME png > MIMETYPE "image/png" > DRIVER "GD/PNG" > EXTENSION "png" > IMAGEMODE PC256 > # TRANSPARENT FALSE > END > OUTPUTFORMAT > NAME jpeg > MIMETYPE "image/jpeg" > DRIVER "GD/JPEG" > EXTENSION "jpg" > IMAGEMODE RGB > # TRANSPARENT FALSE > END > > # RASTER Layer > LAYER > NAME "RAS365313" > GROUP "B_RASTER" > TYPE RASTER > STATUS ON > # STATUS DEFAULT > > # TOLERANCE 5 > # TOLERANCEUNITS PIXELS > > # OFFSITE 0 0 0 > OFFSITE 169 109 154 > > DATA MS12000DEF365313.gif > # DATA "MS12000DEF365313.png" > # DATA "MS12000DEF365313.jpeg" > > CLASS > COLOR 225 200 100 > END > > DUMP TRUE > DEBUG ON > END > > END # Map File > > ---------------- > From richard.roger at AGRIC.NSW.GOV.AU Thu Apr 28 23:52:54 2005 From: richard.roger at AGRIC.NSW.GOV.AU (Richard E. Roger) Date: Fri, 29 Apr 2005 16:52:54 +1000 Subject: Copying shapefiles in spatially sorted (.qix) traversal code Message-ID: Tim/Schuyler/Frank -- see the messages below mine which prompted this one. I asked on the list about such a spatial sorting program in a post entitled "Query: sortshp, spatially clustering shapefiles on disk" on or about 23rd July 2004. I discussed a couple of references in that message which deal with this idea well. I didn't get a positive response, so I did it myself. My program's based on programs in the mapserver distribution (particularly, maptree.c which is Frank's). If my memory serves me correctly, it's pretty basic - reads and writes each shape one at a time, then reads and writes the DBF file records one at a time. Nevertheless, on our Sun system (a 480R with 16 GB), it sorted the entire cadastre for my state (1.3 GB, 4 million polygons) in about 8 minutes. I've marginally altered Frank's spatial indexing so that it visits nodes following a Hilbert-Peano scan, so that sequential nodes are spatially adjacent. I shall re-visit my code and polish it up. It would fit in with "shptree" and "maptree" from which it's derived. What's the best way of contributing this to the codebase? Sorry about the delayed reply, but I only read the digest. Regards Richard E. Roger "Dr. R. E. Roger NSW Department of Primary Industries Spatial Information Officer Systems 161 Kite St Resource Information Unit Locked Bag 21 ORANGE NSW 2800 ph: (02) 6391 3697 fax: (02) 6391 3740 ------------------------------ Date: Wed, 27 Apr 2005 17:19:05 -0500 From: Tim Tsai Subject: Re: tiling shape files, or shptree On Wed, Apr 27, 2005 at 02:48:07PM -0400, Frank Warmerdam wrote: > Tim / Schuyler, > > Yes, I've thought about that sometimes too. It might be helpful to have > a tool that would would copy a shapefile in .qix traversal order. That > is to reorder the features by locality as determined by the quadtree index. > That might given the convenient managability of one big shapefile > with the locality benefits of tiling. That should help clustering the blocks together. I am not very familiar with the .qix format but I don't think it actually tries to balance the quadtree at all right now. A mostly balanced algorithm with a re-sorted shapefile might be a good approach. Also, I wonder what would happen if you run a big shapefile through shp2tile, merge the shape files back sequentially into a big file, then run shapetree on it. Seems like you'd get most of the effects of above. http://www.cs.umd.edu/~brabec/quadtree/ has lots of spatial index algorithms. One of these days I'll read through all of them. Tim This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient or received it in error, please delete the message and notify sender. Views expressed are those of the individual sender and are not necessarily the views of their organisation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From denlalonde at YAHOO.COM Fri Apr 29 05:36:51 2005 From: denlalonde at YAHOO.COM (Denis Lalonde) Date: Fri, 29 Apr 2005 05:36:51 -0700 Subject: Distance along a polyline Message-ID: Hello all; Just wondering if someone could point me in the right direction on how to find a coordinate somewhere along a polyline at a certain distance from the start point. (php mapscript) Thanks, Denis __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ttsai at POBOX.COM Fri Apr 29 06:46:19 2005 From: ttsai at POBOX.COM (Tim) Date: Fri, 29 Apr 2005 08:46:19 -0500 Subject: Copying shapefiles in spatially sorted (.qix) traversal code In-Reply-To: Message-ID: Richard, that sounds great. I just read your July 2004 post and it seems to me if you've modified the program to be one pass, there's no reason why it couldn't replace the existing sortshp or maptree (perhaps with a added flag for compatibility reasons). Have you done any performance measurements of your new code? Thanks for the interesting spatial indexing paper references too. I'll let Frank or others answer your question regarding contributing the code. You can probably post it to the developer's list and let somebody take it from there. Thanks, Tim On Fri, Apr 29, 2005 at 04:52:54PM +1000, richard.roger at agric.nsw.gov.au wrote: > Tim/Schuyler/Frank -- see the messages below mine which prompted this one. > > I asked on the list about such a spatial sorting program in a post > entitled "Query: sortshp, spatially clustering shapefiles on disk" on or > about 23rd July 2004. I discussed a couple of references in that message > which deal with this idea well. > > I didn't get a positive response, so I did it myself. My program's based > on programs in the mapserver distribution (particularly, maptree.c which > is Frank's). If my memory serves me correctly, it's pretty basic - reads > and writes each shape one at a time, then reads and writes the DBF file > records one at a time. Nevertheless, on our Sun system (a 480R with 16 > GB), it sorted the entire cadastre for my state (1.3 GB, 4 million > polygons) in about 8 minutes. I've marginally altered Frank's spatial > indexing so that it visits nodes following a Hilbert-Peano scan, so that > sequential nodes are spatially adjacent. > > I shall re-visit my code and polish it up. It would fit in with "shptree" > and "maptree" from which it's derived. What's the best way of > contributing this to the codebase? > > Sorry about the delayed reply, but I only read the digest. > > Regards > > Richard E. Roger > > "Dr. R. E. Roger NSW Department of > Primary Industries > Spatial Information Officer Systems 161 Kite St > Resource Information Unit Locked Bag 21 > ORANGE NSW 2800 > ph: (02) 6391 3697 fax: (02) 6391 3740 > > ------------------------------ > > > Date: Wed, 27 Apr 2005 17:19:05 -0500 > From: Tim Tsai > Subject: Re: tiling shape files, or shptree > > On Wed, Apr 27, 2005 at 02:48:07PM -0400, Frank Warmerdam wrote: > > Tim / Schuyler, > > > > Yes, I've thought about that sometimes too. It might be helpful to have > > a tool that would would copy a shapefile in .qix traversal order. That > > is to reorder the features by locality as determined by the quadtree > index. > > That might given the convenient managability of one big shapefile > > with the locality benefits of tiling. > > That should help clustering the blocks together. I am not > very familiar with the .qix format but I don't think it actually > tries to balance the quadtree at all right now. A mostly balanced > algorithm with a re-sorted shapefile might be a good approach. > > Also, I wonder what would happen if you run a big shapefile through > shp2tile, merge the shape files back sequentially into a big file, > then run shapetree on it. Seems like you'd get most of the effects > of above. > > http://www.cs.umd.edu/~brabec/quadtree/ has lots of spatial > index algorithms. One of these days I'll read through all of them. > > Tim > > > > This message is intended for the addressee named and may contain > confidential information. If you are not the intended recipient or > received it in error, please delete the message and notify sender. Views > expressed are those of the individual sender and are not necessarily the > views of their organisation. From fwarmerdam at GMAIL.COM Fri Apr 29 07:01:31 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri, 29 Apr 2005 10:01:31 -0400 Subject: Copying shapefiles in spatially sorted (.qix) traversal code In-Reply-To: Message-ID: On 4/29/05, richard.roger at agric.nsw.gov.au wrote: > I didn't get a positive response, so I did it myself. My program's based on > programs in the mapserver distribution (particularly, maptree.c which is > Frank's). If my memory serves me correctly, it's pretty basic - reads and > writes each shape one at a time, then reads and writes the DBF file records > one at a time. Nevertheless, on our Sun system (a 480R with 16 GB), it > sorted the entire cadastre for my state (1.3 GB, 4 million polygons) in > about 8 minutes. I've marginally altered Frank's spatial indexing so that it > visits nodes following a Hilbert-Peano scan, so that sequential nodes are > spatially adjacent. Richard, Cool! When you submit the code, please be fairly specific about this "Hilbert-Peano Scan" as I would potentially like to apply it in the seperate version of the spatial index code in in shapelib and OGR. > I shall re-visit my code and polish it up. It would fit in with "shptree" > and "maptree" from which it's derived. What's the best way of contributing > this to the codebase? Please submit the updates via bugzilla. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From bvanmeul at EBE.UCT.AC.ZA Fri Apr 29 07:04:41 2005 From: bvanmeul at EBE.UCT.AC.ZA (Bas Vanmeulebrouk) Date: Fri, 29 Apr 2005 16:04:41 +0200 Subject: Installing Python Mapscript on Windows XP In-Reply-To: <6.2.1.2.2.20050428110153.039db300@hobu.mail.iastate.edu> Message-ID: Hello Howard, Thank you very much for reaction. I thought I had downloaded the Python Mapscript build without SDE and Oracle support, but of course I may be mistaken. I have solved the gdal12.dll problem. And when I run a Python script in which I use "import mapscript", everything runs fine. I can create a new mapObj and save it to an image. However, if I call this script via the Apache webserver, I get the internal server error. I have downloaded the FWTools package and I will try it next week. Kind regards, Bas. -----Original Message----- From: Howard Butler [mailto:hobu at iastate.edu] Sent: Thursday, April 28, 2005 6:16 PM To: Bas Vanmeulebrouk; MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: Installing Python Mapscript on Windows XP Bas, Regarding the SDE depencency in my MapScript builds.... you need to be very careful to get the exact Python MapScript you need. As you can see on my website, there are *four* Python MapScript builds. At one time, you must have chosen either the "SDE" or "Full" build, which both have the SDE dependency. Use the "Normal" release at all times unless you have a need (and the dlls) for either SDE or Oracle. Regarding the extra gdal12.dll's in C:\python23\ and C:\python23\dlls... The Python uninstaller doesn't deal with dlls in the main sys.prefix directory very well on Windows (especially in an uninstall-reinstall cycle). I've had to manually delete these after an uninstall of Python MapScript (using the control panel). Python 2.4 (which I don't provide builds for) does better at this, and will uninstall dlls in the DLLs directory. Uninstall all of the mapscripts that you have using the control panel and then go into the python23 directory and delete the dlls by hand. This will clean up your Python directory. If you have other gdal12.dlls, you'll either have to move the PATH, clean them up, or do something with them as you see fit. Regarding the issue of not seeing which dll python can't find... run the python script using a command window (dos prompt), rather than IDLE or Activestate. The IDEs swallow the dialog for some reason. FWTools is more cleanly packaged than my mapscript binaries . It comes with its own Python and everything else you might need. I suggest you try it if you continue to have trouble with my binaries. Howard At 10:32 AM 4/28/2005, Bas Vanmeulebrouk wrote: >Frank, > >Thank you very much for your reaction. I did rename the one in the >windows/system32 directory. However, I didn't notice that there were >two gdal12.dll's in the Python installation directory: one in the root >and = one in the DLLs subdirectory. I have renamed the one in the DLLs >= subdirectory >and after that got a different error message (now sde90.dll was = >missing).=20 > >This errormessage always appeared, no matter from what location I = >started Python. Sde90.dll was on my machine, in the C:\Program >Files\Common\ESRI directory. After I had added this directory to the >PATH environment variable, Python Mapscript was finally working. But >does this mean = Python >Mapscript needs some ESRI files? The ones I have came with the = >installation >of ESRI MapObjects 2.3.=20 > >I want to use Python/Mapscript to generate a map and some HTML which >can = be displayed in webbrowser. So I thought I should get a >Python/Mapscript = script >which does this to work as a CGI script. I can get Apache to execute a >Python CGI script, but when I include the line "import mapscript", I get = >an >internal server error and the following error messages in the Apache = >error >log.=20 > >Traceback (most recent call last):\n > File "c:\\PROGRA~1\\APACHE~1\\apache\\cgi-bin\\HELLO_~1.PY", line >4, = in ?\n > import mapscript\n > File "C:\\programs\\python23\\Lib\\site-packages\\mapscript.py", line = >4, >in ?\n > import _mapscript\n >ImportError: DLL load failed: The specified module could not be found.\n > >I don't have a clue which dll is missing this time. Anyone? Or is there >another way to achieve this? > >Kind regards, > >Bas Vanmeulebrouk.=20 > >-----Original Message----- >From: Frank Warmerdam [mailto:fwarmerdam at gmail.com]=20 >Sent: Thursday, April 28, 2005 2:19 PM >To: Bas Vanmeulebrouk >Cc: MAPSERVER-USERS at lists.umn.edu >Subject: Re: [UMN_MAPSERVER-USERS] Installing Python Mapscript on = >Windows XP > > >On 4/28/05, Bas Vanmeulebrouk wrote: > > =20 > > Hi list, > > =20 > > I have been trying to get Python Mapscript up and running on MS=20 > > Windows XP, but I haven't succeeded yet. I have downloaded the=20 > > binaries at http://hobu.stat.iastate.edu/mapserver/. When I start=20 > > Python from the directory in which I have installed Python, > > Mapscript=20 works fine. However, if I start Python from another > > directory, I get=20 the following error message when I try import > > mapscript at the Python=20 command line: "The procedure entry > > point=20 ?SetnextByIndex at OGRLayer@@UAEHJ at Z could not be located in > > the dynamic=20 link library gdal12.dll.". =20 > > I have found four copies of gdal12.dll on my machine. I have been=20 > > exeprimenting with the PATH environment variable, I have renamed the=20 > > various dll's, but the message stays the same. > > =20 > > Does anyone have an idea what might be wrong? > >Bas,=20 > >I am guessing that one of the 4 gdal12.dll's is in windows\system32,=20 >right? This location takes precidence over the PATH, but even higher >precidence is the directory the program is running in.=20 > >I would suggest you move or rename the version in windows\system32.=20 > >Best regards, >---------------------------------------+------------------------------- >---------------------------------------+- >---------------------------------------+------ >I set the clouds in motion - turn up | Frank Warmerdam, >warmerdam at pobox.com >light and sound - activate the windows | http://pobox.com/~warmerdam >and watch the world go round - Rush | Geospatial Programmer for Rent From fwarmerdam at GMAIL.COM Fri Apr 29 07:06:24 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri, 29 Apr 2005 10:06:24 -0400 Subject: Mapscript - tricky save map problem when DATA containes quotes In-Reply-To: Message-ID: On 4/29/05, Daniel Caldeweyher wrote: > Hi, > > I have encountered a bit of a tricky situation. My mapping application > allows users to dynamically add layers using a wizard (similar to MS-ACCESS > Report Wizard, where the user can select fields from different tables). The > application generates SQL from this selection, more precise, the truncated > SQL part which forms the DATA element of a layer. To be on the safe side > with table and column names (I use PostGIS) I put all names in quotes. > However when I then dynamically save the mapobj to a mapfile, mapscript > places quotes around the DATA statement, which when trying to load that file > again, will cause problems as the parse thinks the the first quote is the > end of the DATA element, which it obviously isn't. > > I noticed that with EXPRESSION's when putting the expression inside > parantheses () it will not enclose the expression with quotes, however > trying to do so with DATA doesn't work. > > Since I keep the meta-information of my layer wizard, I can just simply set > DATA to an empty string before saving the map, and use that meta-information > (stored in the file as METADATA) I can re-generate my DATA string when > loading the file. However I don't like this solution and was wondering if > there is a better solution for cases when the DATA string itself contains > quotes (as well as single quotes). Daniel, I believe if you submit a bug report on this topic we could try and alter the map writer to use single quotes if the DATA string has double quotes, but no single quotes. I'm not sure if there is a more general escaping mechanism for the case where string constants need both single and double quotes but if there is then the map saving logic should use it. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From bvanmeul at EBE.UCT.AC.ZA Fri Apr 29 07:25:24 2005 From: bvanmeul at EBE.UCT.AC.ZA (Bas Vanmeulebrouk) Date: Fri, 29 Apr 2005 16:25:24 +0200 Subject: Installing Python Mapscript on Windows XP In-Reply-To: <14769740f54654939ba6184f0343a79c@frii.com> Message-ID: They are in the same location, but it doesn't work ;-(. Kind regards, Bas. -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Sean Gillies Sent: Thursday, April 28, 2005 5:48 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Installing Python Mapscript on Windows XP The mapscript.py module goes hand-in-hand with a _mapscript.pyd (DLL) module. These need to be in the same location. cheers, Sean On Apr 28, 2005, at 9:32 AM, Bas Vanmeulebrouk wrote: > Frank, > > Thank you very much for your reaction. I did rename the one in the > windows/system32 directory. However, I didn't notice that there were > two gdal12.dll's in the Python installation directory: one in the root > and = > one > in the DLLs subdirectory. I have renamed the one in the DLLs = > subdirectory > and after that got a different error message (now sde90.dll was = > missing).=20 > > This errormessage always appeared, no matter from what location I = > started Python. Sde90.dll was on my machine, in the C:\Program > Files\Common\ESRI > directory. After I had added this directory to the PATH environment > variable, Python Mapscript was finally working. But does this mean = > Python > Mapscript needs some ESRI files? The ones I have came with the = > installation > of ESRI MapObjects 2.3.=20 > > I want to use Python/Mapscript to generate a map and some HTML which > can = be > displayed in webbrowser. So I thought I should get a Python/Mapscript = > script > which does this to work as a CGI script. I can get Apache to execute a > Python CGI script, but when I include the line "import mapscript", I > get = > an > internal server error and the following error messages in the Apache = > error > log.=20 > > Traceback (most recent call last):\n > File "c:\\PROGRA~1\\APACHE~1\\apache\\cgi-bin\\HELLO_~1.PY", line > 4, = in > ?\n > import mapscript\n > File "C:\\programs\\python23\\Lib\\site-packages\\mapscript.py", > line = > 4, > in ?\n > import _mapscript\n > ImportError: DLL load failed: The specified module could not be > found.\n > > I don't have a clue which dll is missing this time. Anyone? Or is > there another way to achieve this? > > Kind regards, > > Bas Vanmeulebrouk.=20 > > -----Original Message----- > From: Frank Warmerdam [mailto:fwarmerdam at gmail.com]=20 > Sent: Thursday, April 28, 2005 2:19 PM > To: Bas Vanmeulebrouk > Cc: MAPSERVER-USERS at lists.umn.edu > Subject: Re: [UMN_MAPSERVER-USERS] Installing Python Mapscript on = > Windows XP > > > On 4/28/05, Bas Vanmeulebrouk wrote: >> =20 >> Hi list, >> =20 >> I have been trying to get Python Mapscript up and running on MS=20 >> Windows XP, but I haven't succeeded yet. I have downloaded the=20 >> binaries at http://hobu.stat.iastate.edu/mapserver/. When I start=20 >> Python from the directory in which I have installed Python, >> Mapscript=20 works fine. However, if I start Python from another >> directory, I get=20 >> the following error message when I try import mapscript at the >> Python=20 >> command line: "The procedure entry point=20 >> ?SetnextByIndex at OGRLayer@@UAEHJ at Z could not be located in the >> dynamic=20 >> link library gdal12.dll.". >> =20 >> I have found four copies of gdal12.dll on my machine. I have been=20 >> exeprimenting with the PATH environment variable, I have renamed >> the=20 >> various dll's, but the message stays the same. >> =20 >> Does anyone have an idea what might be wrong? > > Bas,=20 > > I am guessing that one of the 4 gdal12.dll's is in > windows\system32,=20 right? This location takes precidence over the > PATH, but even higher precidence is the directory the program is > running in.=20 > > I would suggest you move or rename the version in windows\system32.=20 > > Best regards, > --------------------------------------- > +-------------------------------- > ---------------------------------------+------ > I set the clouds in motion - turn up | Frank Warmerdam, > warmerdam at pobox.com > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent > From robe.dnd at CITYOFBOSTON.GOV Fri Apr 29 08:02:51 2005 From: robe.dnd at CITYOFBOSTON.GOV (Obe, Regina DND\MIS) Date: Fri, 29 Apr 2005 11:02:51 -0400 Subject: PROJ.4 epsg file Message-ID: Is there any way to explicitly specify the location of the epsg file used by the mapserver cgi projection library without using the PROJ_LIB environment variable? From ortelius at GMAIL.COM Fri Apr 29 08:46:44 2005 From: ortelius at GMAIL.COM (Jeffrey Johnson) Date: Fri, 29 Apr 2005 08:46:44 -0700 Subject: WFS Client Problems In-Reply-To: <200504282124.16801.tylermitchell@shaw.ca> Message-ID: Not sure what you mean by 'other than for a feature query'. Isn't that what I want to do here. http://webservices.ionicsoft.com/unData/wfs/UN?request=GetFeature&service=WFS&typeName=wfs:COUNTRY Returns properly formatted GML (as far as I can tell). I'm just coming up to speed on these OGC interfaces, so maybe I am missing something. In any case, can someone direct me to another WFS server that serves up basic stuff like country, state, county bndrys etc. Thanks, Jeff On 4/28/05, Tyler Mitchell wrote: > Hi Jeffrey, > The bad news is that it isn't really a WFS server! Unless I'm seriously > missing something - this server is lying saying that it is WFS (repeatedly > used in the capabilities document). Looking its capabilities document: > http://webservices.ionicsoft.com/unData/wfs/UN?request=capabilities > doesn't show any sign of really being a WFS, but only a WMS (although the > acronym is used there a lot). > > If you know the people that put this together (anyone on this list!?), direct > them our way so we can help fix them up. Can you show us how you got it to > return GML properly, other than for a feature query? > > The good news is, it is a WMS and works. Here is the layer definition that > should work for you. > > LAYER > NAME country > TYPE RASTER > STATUS DEFAULT > CONNECTIONTYPE WMS > CONNECTION "http://webservices.ionicsoft.com/unData/wfs/UN?" > METADATA > "wms_server_version" "1.0.0" > "wms_name" "COUNTRY" > "wms_format" "PNG" > END > PROJECTION > "init=epsg:4326" > END > END > > You won't be able to style the layers or change colours, but they've done a > good job making things look alright. > > Let me know if you need more help. Please cc: me directly to get my > attention. > > Tyler > > > On April 28, 2005 02:57 pm, Jeffrey Johnson wrote: > > Hello list, > > > > I am having trouble getting mapserver to properly retrieve and display > > data via wfs, and wanted to see if anyone can help. Mapserver is > > compiled with wfs and wms client support and the wms client works > > fine. > > > > Ok, here is the layer definition in my map file. > > > > LAYER > > NAME countries > > TYPE POLYGON > > STATUS ON > > CONNECTIONTYPE WFS > > CONNECTION > > "http://webservices.ionicsoft.com/unData/wfs/UN?" METADATA > > "wfs_service" "WFS" > > "wfs_typename" "wfs:COUNTRY" > > "wfs_version" "1.0.0" > > END > > PROJECTION > > "init=epsg:4326" > > END > > CLASS > > TEMPLATE "dummy.html" > > OUTLINECOLOR 0 0 0 > > END > > END > > > > Note: dummy.html doesn't actually exist, but I dont think it has to??? > > > > There are no errors returned with this layer is activated, but the > > output in the IMAGEPATH dir looks like this, and nothing is drawn. > > > > > xsi:schemaLocation="http://www.ionicsoft.com/wfs > > http://webservices.ionicsoft.com/unData/wfs/UN?REQUEST=DescribeAllFeatureTy > >pe&SERVICE=WFS http://www.opengis.net/wfs > > http://webservices.ionicsoft.com/unData/wfs/UN/REQUEST/get/DATA/LPR/wfs/bas > >ic.xsd" xmlns:gml="http://www.opengis.net/gml" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xmlns:xlink="http://www.w3.org/1999/xlink" > > xmlns:ogcwfs="http://www.opengis.net/wfs"> > > inapplicable > > > > > > > > I assume that this means Mapserver made a request to the wfs server, > > but no results were returned. First of all, how do I find out the > > exact URL request made to the WFS server? I suppose that I may be able > > to debug it this way. I can construct a url myself and the server > > returns GML correctly. > > > > Thanks in advance, > > > > Jeff > From sgillies at FRII.COM Fri Apr 29 09:07:34 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Fri, 29 Apr 2005 10:07:34 -0600 Subject: Installing Python Mapscript on Windows XP In-Reply-To: Message-ID: Bas, Look at Python's cgitb module. It will allow your CGI script to return a more informative traceback. Another thing to check is that the PATH, PROJ_LIB, and other variables are properly set for the Apache user's environment. Sean On Apr 29, 2005, at 8:04 AM, Bas Vanmeulebrouk wrote: > Hello Howard, > > Thank you very much for reaction. I thought I had downloaded the Python > Mapscript build without SDE and Oracle support, but of course I may be > mistaken.=20 > > I have solved the gdal12.dll problem. And when I run a Python script in > which I use "import mapscript", everything runs fine. I can create a > new > mapObj and save it to an image. However, if I call this script via the > Apache webserver, I get the internal server error.=20 > > I have downloaded the FWTools package and I will try it next week. > > Kind regards, > > Bas. > > -----Original Message----- > From: Howard Butler [mailto:hobu at iastate.edu]=20 > Sent: Thursday, April 28, 2005 6:16 PM > To: Bas Vanmeulebrouk; MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: Installing Python Mapscript on Windows XP > > > Bas, > > Regarding the SDE depencency in my MapScript builds.... you need to be > = > very=20 > careful to get the exact Python MapScript you need. As you can see on > = > my=20 > website, there are *four* Python MapScript builds. At one time, you = > must=20 > have chosen either the "SDE" or "Full" build, which both have the > SDE=20 > dependency. Use the "Normal" release at all times unless you have a = > need=20 > (and the dlls) for either SDE or Oracle. > > Regarding the extra gdal12.dll's in C:\python23\ and > C:\python23\dlls... = > > The Python uninstaller doesn't deal with dlls in the main sys.prefix=20 > directory very well on Windows (especially in an uninstall-reinstall=20 > cycle). I've had to manually delete these after an uninstall of > Python=20 > MapScript (using the control panel). Python 2.4 (which I don't > provide=20 > builds for) does better at this, and will uninstall dlls in the DLLs=20 > directory. Uninstall all of the mapscripts that you have using the = > control=20 > panel and then go into the python23 directory and delete the dlls by=20 > hand. This will clean up your Python directory. If you have other=20 > gdal12.dlls, you'll either have to move the PATH, clean them up, or > do=20 > something with them as you see fit. > > Regarding the issue of not seeing which dll python can't find... run > the = > > python script using a command window (dos prompt), rather than IDLE > or=20 > Activestate. The IDEs swallow the dialog for some reason. > > FWTools is more cleanly packaged than my mapscript binaries=20 > . It comes with its own Python and=20 > everything else you might need. I suggest you try it if you continue > to = > > have trouble with my binaries. > > Howard > > > At 10:32 AM 4/28/2005, Bas Vanmeulebrouk wrote: >> Frank, >> >> Thank you very much for your reaction. I did rename the one in the >> windows/system32 directory. However, I didn't notice that there >> were=20 >> two gdal12.dll's in the Python installation directory: one in the >> root=20 >> and =3D one in the DLLs subdirectory. I have renamed the one in the = > DLLs=20 >> =3D subdirectory >> and after that got a different error message (now sde90.dll was =3D >> missing).=3D20 >> >> This errormessage always appeared, no matter from what location I =3D >> started Python. Sde90.dll was on my machine, in the C:\Program=20 >> Files\Common\ESRI directory. After I had added this directory to >> the=20 >> PATH environment variable, Python Mapscript was finally working. >> But=20 >> does this mean =3D Python >> Mapscript needs some ESRI files? The ones I have came with the =3D >> installation >> of ESRI MapObjects 2.3.=3D20 >> >> I want to use Python/Mapscript to generate a map and some HTML which >> can =3D be displayed in webbrowser. So I thought I should get a=20 >> Python/Mapscript =3D script >> which does this to work as a CGI script. I can get Apache to execute a >> Python CGI script, but when I include the line "import mapscript", I = > get =3D >> an >> internal server error and the following error messages in the Apache = > =3D >> error >> log.=3D20 >> >> Traceback (most recent call last):\n >> File "c:\\PROGRA~1\\APACHE~1\\apache\\cgi-bin\\HELLO_~1.PY", line >> 4, =3D in ?\n >> import mapscript\n >> File "C:\\programs\\python23\\Lib\\site-packages\\mapscript.py", = > line =3D >> 4, >> in ?\n >> import _mapscript\n >> ImportError: DLL load failed: The specified module could not be = > found.\n >> >> I don't have a clue which dll is missing this time. Anyone? Or is >> there >> another way to achieve this? >> >> Kind regards, >> >> Bas Vanmeulebrouk.=3D20 >> >> -----Original Message----- >> From: Frank Warmerdam [mailto:fwarmerdam at gmail.com]=3D20 >> Sent: Thursday, April 28, 2005 2:19 PM >> To: Bas Vanmeulebrouk >> Cc: MAPSERVER-USERS at lists.umn.edu >> Subject: Re: [UMN_MAPSERVER-USERS] Installing Python Mapscript on =3D >> Windows XP >> >> >> On 4/28/05, Bas Vanmeulebrouk wrote: >>> =3D20 >>> Hi list, >>> =3D20 >>> I have been trying to get Python Mapscript up and running on MS=3D20 >>> Windows XP, but I haven't succeeded yet. I have downloaded >>> the=3D20=20 >>> binaries at http://hobu.stat.iastate.edu/mapserver/. When I = > start=3D20=20 >>> Python from the directory in which I have installed Python,=20 >>> Mapscript=3D20 works fine. However, if I start Python from another=20 >>> directory, I get=3D20 the following error message when I try >>> import=20 >>> mapscript at the Python=3D20 command line: "The procedure entry=20 >>> point=3D20 ?SetnextByIndex at OGRLayer@@UAEHJ at Z could not be located in >>> = > >>> the dynamic=3D20 link library gdal12.dll.". =3D20 >>> I have found four copies of gdal12.dll on my machine. I have = > been=3D20 >>> exeprimenting with the PATH environment variable, I have renamed = > the=3D20 >>> various dll's, but the message stays the same. >>> =3D20 >>> Does anyone have an idea what might be wrong? >> >> Bas,=3D20 >> >> I am guessing that one of the 4 gdal12.dll's is in = > windows\system32,=3D20 >> right? This location takes precidence over the PATH, but even >> higher=20 >> precidence is the directory the program is running in.=3D20 >> >> I would suggest you move or rename the version in = > windows\system32.=3D20 >> >> Best regards, >> --------------------------------------- >> +------------------------------- >> ---------------------------------------+- >> ---------------------------------------+------ >> I set the clouds in motion - turn up | Frank Warmerdam, >> warmerdam at pobox.com >> light and sound - activate the windows | http://pobox.com/~warmerdam >> and watch the world go round - Rush | Geospatial Programmer for >> Rent > From ed at TOPOZONE.COM Fri Apr 29 09:19:22 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Fri, 29 Apr 2005 12:19:22 -0400 Subject: Copying shapefiles in spatially sorted (.qix) traversal code Message-ID: Richard - Thanks - this is nice stuff. Although I have not benchmarked it carefully, I believe that the reason many users see a benefit from a TILEINDEXed set of smaller shapefiles when compared to a single large shapefile is the physical grouping of geographically nearby features on disk. A sorting scheme like yours might both eliminate the need to chop up larger shapefiles (if that's not otherwise desirable to the user) and/or improve smaller shapefile performance where the data are not geographically sorted to begin with. I've got a few large vector data sets I would be happy to experiment with when the code's available. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed at topozone.com (978) 251-4242 -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Frank Warmerdam Sent: Friday, April 29, 2005 10:02 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Copying shapefiles in spatially sorted (.qix) traversal code On 4/29/05, richard.roger at agric.nsw.gov.au wrote: > I didn't get a positive response, so I did it myself. My program's > based on programs in the mapserver distribution (particularly, > maptree.c which is Frank's). If my memory serves me correctly, it's > pretty basic - reads and writes each shape one at a time, then reads > and writes the DBF file records one at a time. Nevertheless, on our > Sun system (a 480R with 16 GB), it sorted the entire cadastre for my > state (1.3 GB, 4 million polygons) in about 8 minutes. I've marginally > altered Frank's spatial indexing so that it visits nodes following a > Hilbert-Peano scan, so that sequential nodes are spatially adjacent. Richard, Cool! When you submit the code, please be fairly specific about this "Hilbert-Peano Scan" as I would potentially like to apply it in the seperate version of the spatial index code in in shapelib and OGR. > I shall re-visit my code and polish it up. It would fit in with "shptree" > and "maptree" from which it's derived. What's the best way of > contributing this to the codebase? Please submit the updates via bugzilla. Best regards, -- ---------------------------------------+-------------------------------- ---------------------------------------+------ I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From fwarmerdam at GMAIL.COM Fri Apr 29 09:35:51 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri, 29 Apr 2005 12:35:51 -0400 Subject: PROJ.4 epsg file In-Reply-To: Message-ID: On 4/29/05, Obe, Regina DNDMIS wrote: > Is there any way to explicitly specify the location of the epsg file used by > the mapserver cgi projection library without using the PROJ_LIB environment > variable? Regina, You can place the line "CONFIG PROJ_LIB /abc/def" in your mapfile or rebuild PROJ.4 to use an alternate package data directory (see configure switches). Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From dabner at OPTUSNET.COM.AU Fri Apr 29 15:12:12 2005 From: dabner at OPTUSNET.COM.AU (Nick Dabner) Date: Sat, 30 Apr 2005 08:12:12 +1000 Subject: Zooming to match a raster scale In-Reply-To: <4BF377919225F449BB097CB76FFE9BC818838D@ptolemy.topozone.com> Message-ID: Thanks Ed, BTW, is there an easy way to process an entire folder using gdalwarp? I am currently cutting and pasting pre-fashioned lines into the terminal to get 500 files processed. ND On 26/04/2005, at 1:20 PM, Ed McNierney wrote: > Nick - > ? > gdalwarp lets you specify the desired output resolution with the -tr > parameter, so you can say you want the output image to be 2.59 m/p. > ? > ???? - Ed > > Ed McNierney -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 836 bytes Desc: not available URL: From Tom.Kralidis at EC.GC.CA Fri Apr 29 15:26:57 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri, 29 Apr 2005 18:26:57 -0400 Subject: Trouble getting SLD working Message-ID: Rod, 1./ does the SLD indeed reside at http://localhost/test_sld.xml ? 2./ in your GetMap request, have you tried "...styles=myStyle&sld=http://localhost/test_sld.xml..." (note it should be "styles=", not "style=" ? 3./ Try inserting this element in the UserStyle element (after the "Name" element) 1 ..Tom > -----Original Message----- > From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Suddaby, Rod > Sent: Thursday, 28 April, 2005 18:05 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Trouble getting SLD working > > > Hi Bart, > Yes, Mapserver operates fine with the exception of the SLD. The > GetCapabilities responds with (with respect to SLD): > RemoteWFS="0"/> and the 'request=getStyles' request reports back fine > as well (indicating the styles I set in the CLASS block). > > Using the CLASS block without the SLD works as expected, too. > (BTW, under normal circumstances will the SLD override the > CLASS specified in the map > file?) > > The '&style=' parameter makes no difference whether it is > present or not. > > Does Mapserver have a debug mode where I could trace what is > going on internally? > > Still stumped, > > Rod. > > -----Original Message----- > From: Bart van den Eijnden [mailto:bartvde at xs4all.nl] > Sent: Thursday, April 28, 2005 1:26 PM > To: Rod Suddaby; MAPSERVER-USERS at lists.umn.edu > Subject: Re: [UMN_MAPSERVER-USERS] Trouble getting SLD working > > > Hi Rod, > > I can't see anything obvious wrong with what you are doing. > > A few questions: > > -is your WMS GetCapabilities working? > > -does the LAYER work without an SLD, ie when you specify a CLASS? > > -does it work if you leave out the style parameter in the request? > > -your WMS request is not a full WMS request, it should > contain a BBOX, WIDTH, HEIGHT and SRS (among others). But > Mapserver seems to be leniant towards this and probably uses > MAP file values. > > Best regards, > Bart > > On Thu, 28 Apr 2005 14:00:44 -0500, Rod Suddaby > wrote: > > > Hi List: > > I'm a newbie to SLD and I've been trying to figure out why > my build of > > mapserver will not apply the styles. I've created the following SLD > > xml > > file: > > > > [test_sld.xml] > > > xmlns="http://www.opengis.net/sld" > > xmlns:gml="http://www.opengis.net/gml" > xmlns:ogc="http://www.opengis.net/ > > ogc" xmlns:xlink="http://www.w3.org/1999/xlink" > xmlns:xsi="http://www.w3. > > org/2001/XMLSchema-instance" > > xsi:schemaLocation="http://www.opengis.net/sld > > > http://schemas.opengeospatial.net/sld/1.0.0/StyledLayerDescrip > tor.xsd"> > > > > provinces > > > > myStyle > > > > > > > > > > #00ff00 > > > > > > #0000ff > > 3 > > > > > > > > > > > > > > > > > > The layer block of my mapfile is: > > > > LAYER > > NAME provinces > > DATA prov_prj > > PROJECTION > > "init=epsg:42304" > > END > > UNITS METERS > > TYPE POLYGON > > STATUS ON > > > > # CLASS > > # COLOR 255 0 0 > > # OUTLINECOLOR 0 0 255 > > # END > > > > END > > > > > > I've sent the following request to the mapserver: > > http://localhost/cgi-bin/mapserv?map=prov.map&version=1.1. > > > 1&request=getMap&layers=provinces&styles=&sld=http://localhost > /test_sld.xml > > > > ... and all I get is a blank image. Checking the apache access_log > > shows no hit for the 'test_sld.xml' file. It seems that > mapserver is > > simply ignoring > > the sld parameter. > > I've also tried putting the "wms_sld_url" tag in the layer metadata, > > tried the "wms_sld_body" tag, and tried feeding the xml directly > > using the sld_body parameter -- same result > > > > Heres the output of mapserv -v: > > > > %dragon>./mapserv -v > > MapServer version 4.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG > OUTPUT=WBNP > > SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER > > SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT > INPUT=TIFF > > INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE > > > > O.S. Is Suse Linux 9.1 > > > > Can anyone see if I'm missing something here? > > Also, are there any other resources available regarding SLD > other than > > the spec and the HOWTO docs? > > > > Thanks, > > Rod. > > > > > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > From gmanepal at GMAIL.COM Fri Apr 29 23:51:51 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Sat, 30 Apr 2005 02:51:51 -0400 Subject: Zooming and Centering Question: Second Run In-Reply-To: Message-ID: Thanks Bob! It really helped. Can you tell me how zoomscale and zoompoint are different from a map point of view. Giridhar On 4/25/05, Bob Bruce wrote: > On Sun, 24 Apr 2005 23:01:06 -0400, Giridhar Manepalli > wrote: > > >Hello All, > >I am using php mapscript. I cannot get the image to center when I > >click on the image and with some zooming factor. > > > >I am using image coordinates (not geographical coordinates) for zooming. > > > >1.)Can anyone think of possible reasons? I can provide with any > >necessary information. > > > >2.) Also, how do I center the image based on my click without zooming? > > > >3.) Finally, does the extent of the map automatically changed by > >mapscript, when I zoom? > > > >I hope, i can get this resolved! > > > >Thanks, > >Giridhar > > > > > >Hello All, > >I tried to center the image based on a click when I zoom using > >php/mapscript. For some reason, I am failing to do so. > > > >Is it because, the lat long I calculated using javascript is wrong? > >but it almost matches with 'ArcIMS Author'.? > > > >Can anyone write the snippet of php/mapscript code that will zoom to > >the point i click, provided I have the lat-long of the click? Also, > >can you explain what the new extent will be? > > > >Thanks, > >Giridhar > > Giridhar: > > here's a code snippet that I use for zooming in: > > } elseif($_POST['mode'] == "ZoomInAtPT" ) { > $new_point = ms_newPointObj(); > > $new_point->setXY(floatval($_POST['mapimage_x']),floatval($_POST['mapimage_y'])); > $map->zoomscale($mapscale/$mapScaleZoomFactor, $new_point, > $map->width, $map->width, > > $mapRect, $maxmapRect); > > the post variables are the image coordinates of the mouse click. You should > have those anyway and it shouldn't be necessary to convert them to Lat/Long. > I get $mapscale using the statement: > > $mapscale = isset($_POST['mapscale']) ? floatval($_POST['mapscale']) : > $maxscale; > > and I set the post value of mapscale using the following statements: > > // now set up some web page display values > $currentscale = round($map->scale); > $char_scale = number_format($currentscale); > > and this is my code to re-center the draw: > > } elseif($_POST['mode'] == "recenter" ) { > $new_point = ms_newPointObj(); > > $new_point->setXY(floatval($_POST['mapimage_x']),floatval($_POST['mapimage_y'])); > $map->zoomscale($mapscale, $new_point, $map->width, $map->width, > $mapRect, $maxmapRect); > > (notice that I don't change the scale in this call) > and this is the code to set the last two values of the above call: > > if(isset($_POST['mapextent'])) { > $extents = explode("+",$_POST['mapextent']); > $mapRect = ms_newRectObj(); > > $mapRect->setextent(floatval($extents[0]),floatval($extents[1]),floatval($extents[2]),floatval($extents[3])); > $maxmapextent = $_POST['maxmapextent']; // save this for the hidden > form variable > } else { // set this for the hidden form variable using the values > from the map file > $maxmapextent = $map->extent->minx . "+" . $map->extent->miny . "+" > . $map->extent->maxx . "+" . $map->extent->maxy; > } > > if(isset($_POST['maxmapextent'])) { > $maxextents = explode("+",$_POST['maxmapextent']); > $maxmapRect = ms_newRectObj(); > > $maxmapRect->setextent(floatval($maxextents[0]),floatval($maxextents[1]),floatval($maxextents[2]),floatval($maxextents[3])); > } > > hopefully there is enough here to get you going. > > Bob Bruce > From sgillies at FRII.COM Sat Apr 30 07:58:50 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Sat, 30 Apr 2005 08:58:50 -0600 Subject: Finding Latitude and Longitude of the 4 corners of a map using mapscript. In-Reply-To: Message-ID: Troy, I'm cc'ing the list on this. First of all, you should provide a datum or ellipsoid, if known, for the latlong projection. The second thing to keep in mind is that your projected rectangle's corner points are not necessarily the same points a the original rectangle. The projected rectangle is the smallest rectangle that contains the transformation of the original one. Sean On Apr 29, 2005, at 5:50 PM, Troy R. Johnson wrote: > Hi Sean, thanks for your information. I followed the instructions and > did this after I had drawn the image and saved the file: > > $image=$map->draw(); > $image_url=$image->saveWebImage('MS_PNG',1,1,0); > > Then I do a > > $latlong_rect = $map->extent; > $latlong_rect->project( ms_newprojectionobj($map->getProjection()), > ms_newprojectionobj("proj=latlong")); > > I then print these lat long values out, but they don't match up > exactly with Lat Long > points of fixed locations. For example I have a shape file that > contains a point at > -111.383, 42.333. When I pan that point to the corner 0,0 I get a > reported lat lon > of the corner printed out of -111.351, 42.344 and this is when I'm > zoomed way in. > The opposite corner lat lon points are -111.38 and 42.318. So I'm > surprised that there > is this much error. > > Is there something else that I could be doing wrong? > > > The reason for me wanting the lat, lon points is so that I can > calculate the x,y > pixel coordinates of these points of interest in shape files. I'm > sure the map > server at some point knows what these x,y coordinates are, because it > places those > points on the image it returns, but I haven't been able to find a way > to > retrieve the x,y coordinates directly, so I'm calculating them based > on lat, lon. > > Maybe there is an easier way to do this that I'm missing? > > Any help would be appreciated. > > Thanks > > Troy > > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On > Behalf Of Sean Gillies > Sent: Tuesday, April 26, 2005 3:08 PM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Finding Latitude and Longitude of > the > 4 corners of a map using mapscript. > > > Just make sure to get and transform your extent *after* the map is > drawn because msDrawMap will fudge the map extents to fit the specified > image size. > > cheers, > Sean > > On Apr 26, 2005, at 2:57 PM, James Sohr wrote: > >> Yes, you can calculate the lat long of your current extent by using >> the >> RectObj's project method. For instance: >> >> >> $latlong_rect = $map->extent; >> $latlong_rect->project( ms_newprojectionobj($map->getProjection), >> ms_newprojectionobj("proj=latlong")); >> >> >> >> Assuming $map is your map object, the latitudes and longitudes of the >> four >> corners of your map are now stored in $latlong_rect->minx, >> $latlong_rect- >>> miny, $latlong_rec->maxx, and $latlong_rect->maxy . >> >> -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From andy.canfield at GMAIL.COM Sat Apr 30 08:59:34 2005 From: andy.canfield at GMAIL.COM (Andy Canfield) Date: Sat, 30 Apr 2005 08:59:34 -0700 Subject: Solaris 10 Message-ID: Is anyone out there running MapServer on Solaris 10? If you are could you give me some feedback on any problems you encountered and how well you feel MapServer works on Solaris 10. I am building a server for my home use and I want to put up a MapServer based web map on it when I'm done. So I'm looking into OS's and so far Solaris 10 looks like it has everything else I want on it but I don't know about MapServer on it so any feedback would be greatly appreciated. Thanks, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From stigmata_blackangel at YAHOO.COM Sat Apr 30 09:16:45 2005 From: stigmata_blackangel at YAHOO.COM (Gregor Mosheh) Date: Sat, 30 Apr 2005 09:16:45 -0700 Subject: Solaris 10 In-Reply-To: 6667 Message-ID: This doesn't apply to MS specifically, but... Solaris 9 (dunno about 10) is a hybrid of Sun's proprietary linker and libraries with GNU's compiler and utilities, and the combination makes software builds a bit iffy sometimes. With Solaris I've often had problems with compiling programs that expect to be in the "100% GNU environment" of Linux. So, if it does work for you, I recommend saving a text file of your build procedure, because you'll probably end up using special config flags and environment variables, and having them in hand for next time saves a lot of time. (Our server is FreeBSD, and we had similar issues. The software does port easily *once* you know the ins and outs for your OS.) __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From stigmata_blackangel at YAHOO.COM Sat Apr 30 09:22:35 2005 From: stigmata_blackangel at YAHOO.COM (Gregor Mosheh) Date: Sat, 30 Apr 2005 09:22:35 -0700 Subject: Solaris 10 In-Reply-To: 6667 Message-ID: I just remembered something else about Solaris 9 that may or may not apply to 10. GEOS doesn't build properly under Solaris. It will build, but you'll find out when you build PostGIS that none of the GEOS functions work: the pgsql backend crashes. You may want to check the changelog for GEOS, and see if they've corrected that. Last I heard, it was a well-known but rarely-mentioned bug and nobody was moving to fix it. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From gmanepal at GMAIL.COM Sat Apr 30 13:08:22 2005 From: gmanepal at GMAIL.COM (Giridhar Manepalli) Date: Sat, 30 Apr 2005 16:08:22 -0400 Subject: Finding Latitude and Longitude of the 4 corners of a map using mapscript. In-Reply-To: Message-ID: Troy, Did you try $map->extent after the zooming? I thought this is working for me. Let me know how it goes. Also, I thought we always have the image coordinates with us and not latitude and longitude on the browser. Because, I always use the image coordinates and convert them into latitude and longitude. How did you manage to get latitude and longitude without knowing the image coordinates? Knowing this, would do a lot of good to me. Thanks, Giridhar On 4/30/05, Sean Gillies wrote: > Troy, > > I'm cc'ing the list on this. > > First of all, you should provide a datum or ellipsoid, if known, for > the latlong projection. The second thing to keep in mind is that your > projected rectangle's corner points are not necessarily the same points > a the original rectangle. The projected rectangle is the smallest > rectangle that contains the transformation of the original one. > > Sean > > On Apr 29, 2005, at 5:50 PM, Troy R. Johnson wrote: > > > Hi Sean, thanks for your information. I followed the instructions and > > did this after I had drawn the image and saved the file: > > > > $image=$map->draw(); > > $image_url=$image->saveWebImage('MS_PNG',1,1,0); > > > > Then I do a > > > > $latlong_rect = $map->extent; > > $latlong_rect->project( ms_newprojectionobj($map->getProjection()), > > ms_newprojectionobj("proj=latlong")); > > > > I then print these lat long values out, but they don't match up > > exactly with Lat Long > > points of fixed locations. For example I have a shape file that > > contains a point at > > -111.383, 42.333. When I pan that point to the corner 0,0 I get a > > reported lat lon > > of the corner printed out of -111.351, 42.344 and this is when I'm > > zoomed way in. > > The opposite corner lat lon points are -111.38 and 42.318. So I'm > > surprised that there > > is this much error. > > > > Is there something else that I could be doing wrong? > > > > > > The reason for me wanting the lat, lon points is so that I can > > calculate the x,y > > pixel coordinates of these points of interest in shape files. I'm > > sure the map > > server at some point knows what these x,y coordinates are, because it > > places those > > points on the image it returns, but I haven't been able to find a way > > to > > retrieve the x,y coordinates directly, so I'm calculating them based > > on lat, lon. > > > > Maybe there is an easier way to do this that I'm missing? > > > > Any help would be appreciated. > > > > Thanks > > > > Troy > > > > > > -----Original Message----- > > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On > > Behalf Of Sean Gillies > > Sent: Tuesday, April 26, 2005 3:08 PM > > To: MAPSERVER-USERS at LISTS.UMN.EDU > > Subject: Re: [UMN_MAPSERVER-USERS] Finding Latitude and Longitude of > > the > > 4 corners of a map using mapscript. > > > > > > Just make sure to get and transform your extent *after* the map is > > drawn because msDrawMap will fudge the map extents to fit the specified > > image size. > > > > cheers, > > Sean > > > > On Apr 26, 2005, at 2:57 PM, James Sohr wrote: > > > >> Yes, you can calculate the lat long of your current extent by using > >> the > >> RectObj's project method. For instance: > >> > >> > >> $latlong_rect = $map->extent; > >> $latlong_rect->project( ms_newprojectionobj($map->getProjection), > >> ms_newprojectionobj("proj=latlong")); > >> > >> > >> > >> Assuming $map is your map object, the latitudes and longitudes of the > >> four > >> corners of your map are now stored in $latlong_rect->minx, > >> $latlong_rect- > >>> miny, $latlong_rec->maxx, and $latlong_rect->maxy . > >> > >> > -- > Sean Gillies > sgillies at frii dot com > http://users.frii.com/sgillies > From covariance at SHAW.CA Sat Apr 30 18:46:32 2005 From: covariance at SHAW.CA (Bob Bruce) Date: Sat, 30 Apr 2005 20:46:32 -0500 Subject: PROBLEM SOLVED: Re: Error Building MapScript on WIN32 - Unresolved references: msSLDApplySLD, msSLDApplySLDURL, msSLDGenerateSLD Message-ID: This is solved by turning on the GDAL=-DUSE_GDAL option in the main mapserver nmake.opt file. This is caused by the following statements in the mapogcsld.h file: #ifdef USE_OGR #endif all of the function declarations in this file are enclosed in this block, including the msSLDApplySLD, msSLDApplySLDURL, msSLDGenerateSLD which were undefined references in the MapScript link. Turning on the USE_OGR option allowed all of these functions to be defined in the compile of the mapscript_i.c file and everything compiled and linked OK. My question: Is this correct to enclose the entire range of function definitions within this block, or (as the comments suggest) should only the following lines should be put within this block?: #include "map.h" /* There is a dependency to OGR for the MiniXML parser */ #include "cpl_minixml.h" Bob Bruce, Winnipeg, Manitoba