Re: [mapserver-users] Prevalence of the use of queryfiles...
We may need to consider caching to a shapefile or something like that. You'd be free then to reference that file as a layer. Slinging ids around is another idea I've used with OpenLayers. You pass the id into a "selection layer" by changing an expression on-the-fly and in that case you'd have full symbology control. A shapefile cache would work similarly but you'd swap the DATA... Steve >>> BrainDrain 03/16/09 4:39 AM >>> I need queryfiles to persist query results (serialize to string/binary method wanted!) as a part of whole map 'state'. But I need more convenient, handy way to configure style of queried (selected) features. Style section to setup {border (color, line pattern, transparency), filling (color, fill pattern, transparency), maybe some symbolization} instead of just highlight color. It will be very useful (currently I need to dump query results into some temp table in spatial db - which has a spec. layer section (sections - for each feature type) in map file). For. ex. if my 'selection' is small - I can highlight it with vector features (good looking and fast, flexible styling!, no raster (all tiles! - can't decide which tile to redraw for general queries) data requests and redrawing - in OpenLayers), but when selection is big - I need to highlight it on server and re-request map tiles. Steve Lime wrote: > > Hi all: Consider this a survey of sorts. I'm wondering how many of you > make use of saving queries, either via the CGI or MapScript. It's an old > feature that isn't terribly useful and I'm trying to understand the pain > the community might incur if they go away in 6.0. If you didn't know they > existed or how you might use them then it's safe to say you don't need > 'em. > > Steve > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- View this message in context: http://n2.nabble.com/Prevalence-of-the-use-of-queryfiles...-tp2471795p2484926.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Prevalence of the use of queryfiles...
The problem we have is that to efficiently process result sets from database-based drivers we need to reference rows in the result set rather than rows in the dataset. That means the results (with those types of DATA/CONNECTIONs) can't be cached using the current mechanism. Shapefiles would still work ok. The faster query processing is much faster, as much as 24x faster with DB-based data that it's not practical to do things the old way. Steve >>> Martin Kofahl 03/15/09 2:35 PM >>> We use them with MapScript. Maybe it's possibile to activate saved queries only with with a compiler option? Steve Lime wrote: > Hi all: Consider this a survey of sorts. I'm wondering how many of > you make use of saving queries, either via the CGI or MapScript. It's > an old feature that isn't terribly useful and I'm trying to > understand the pain the community might incur if they go away in 6.0. > If you didn't know they existed or how you might use them then it's > safe to say you don't need 'em. > > Steve ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] msQueryByAttributes - regex problem
Hi list I'm facing a problem using msQueryByAttributes. I'm still using php/mapscript v4.0.2. If I search for a string ending with UF or uf, f.e. 525UF, I get the following message: Warning: [MapServer Error]: msQueryByAttributes(): No matching record(s) found. in [...]. The entry 525UF is definitely there! I did some debugging and it seams that this problem has to do with php. I'm still using php 4.3.10. At the time I compiled php, we were forced to compile php with regex=system. If I remember well, this was due to some unresolved problems in the code of mapserver. I would like to avoid an upgrade of php and mapserver right now. Is there a way to solve this problem? Kind regards, Roman ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Scalebar align issue
Hi Setting the scalebar align property to 'left' or 'right' is truncating some text towards that edge. Works fine for 'center' align. For example, I have scalebar with units as miles and align set to right, scalebar label is displaying only 'm' instead of displaying 'mi' for miles. If I change the align to left, part of the 0 is sliced. Is there any property that I can use so that full text is displayed. I have tried buffer and offset properties of label but both did not work. Thanks Murty ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Two questions about WMS and outputformats
Rahkonen Jukka wrote: Hi, By default, without having any OUTPUTFORMAT sections in the mapfile, Mapserver is advertising following imageformats in WMS GetCapabilities document: image/gif image/png image/png; mode=24bit image/jpeg image/vnd.wap.wbmp image/tiff image/svg+xml Some users have been confused because WMS client builds menu items according to that list, but at least "image/png; mode 24bit" and "image/tiff" do not give any output. What is the reason to include these formats in getCapabilities by default, if they do not work without creating OUTPUTFORMATs in the mapfile first? Jukka, I don't know why image/tiff and image/png; mode=24bit would not work. Perhaps you could file a ticket with minimal details to reproduce this problem. Please include the mapserv -v string in the ticket so I can try to reproduce a similar scenario. Assign the ticket directly to me. Second question is about JPEG outputformat. It works through GD with these settings OUTPUTFORMAT NAME "jpeg" MIMETYPE "image/jpeg" DRIVER "GD/JPEG" EXTENSION "jpg" IMAGEMODE RGB END If I change driver to "GDAL/JPEG" I get this error on ms errorlog [Mon Mar 16 11:16:05 2009].825000 msSaveImageGDAL(): General error message. Failed to create output JPEG file. JPEG driver doesn't support 4 bands. Must be 1 (grey) or 3 (RGB) bands. What makes GDAL/JPEG driver to believe that I want 4 bands? Or is it just best to use DG/JPEG always? I'm surprised. This should not occur with IMAGEMODE RGB. I would appreciate your also filing a ticket on this issue and assigning it to me. Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] cannot able to test the mapfile-database eror
Hey Syed, You should also check whether geometry functions are available with your installed postgres. Its the most common error. Check whether this function exists or not - force_2d(geom) Cheers, Ritesh syed mohseen wrote: > > hi all, > i am a new bie to fgs and i want to test one of my mapfile with > connecting to my database. > here is my mapfile > > > NAME "test" > SIZE 800 600 > IMAGECOLOR 249 245 186 > IMAGETYPE png > EXTENT -1.00 -1.00 1.00 1.00 > LAYER > CONNECTIONTYPE postgis > NAME "test" > CONNECTION "user=postgres password=hellopostgres dbname=postgres > host=localhost" > DATA "geom FROM test" > STATUS ON > TYPE POINT >END > END > > > > whenever i test the file as *shp2img** *i get the following error > > > msDrawMap(): Image handling error. Failed to draw layer named 'test'. > prepare_database(): Query error. Error executing POSTGIS DECLARE (the > actual > query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT > asbinary(force_collection(force_2d(geom)),'NDR'),OID::text from test WHERE > geom && setSRID('BOX3D(-1.3338898163606 -1,1.3338898163606 1)'::BOX3D, > find_srid('','test','geom') )' > > Postgresql reports the error as 'ERROR: find_srid() - couldnt find the > corresponding SRID - is the geometry registered in the GEOMETRY_COLUMNS > table? Is there an uppercase/lowercase missmatch? > ' > > More Help: > > Error with POSTGIS data variable. You specified 'check your .map file'. > Standard ways of specifiying are : > (1) 'geometry_column from geometry_table' > (2) 'geometry_column from (sub query) as foo using unique column name > using > SRID=srid#' > > Make sure you put in the 'using unique column name' and 'using SRID=#' > clauses in. > > For more help, please see http://postgis.refractions.net/documentation/ > > Mappostgis.c - version of Jan 23/2004. > > > > > >any solutions will be appreciated > > >regards >SyedMohseen > > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- View this message in context: http://n2.nabble.com/cannot-able-to-test-the-mapfile-database-eror-tp2484211p2486081.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MapServer 5.4 Beta 3 is now available...
Thomas, Extracts from map file are : OUTPUTFORMAT NAME 'AGG' DRIVER AGG/PNG IMAGEMODE RGB END and LEGEND KEYSIZE 18 12 LABEL TYPE BITMAP SIZE SMALL COLOR 0 0 137 END STATUS ON END Before and after legend images attached. Thanks Tony - Original Message - From: "thomas bonfort" To: "Tony Frame" Cc: Sent: Sunday, 15 March, 2009 5:56 PM Subject: Re: [mapserver-users] MapServer 5.4 Beta 3 is now available... Tony, the 5.4 codebase has been branched, and the code in trunk is now milestoned for the 6.0 version, so these kind of changes aren't unexpected given the rendering changes that will come with the new version. as for the the legend issue you raised, could you please show your mapfile legend block, tell what renderer you're using, and ideally show a before/after screenshot of the changes? thanks, thomas On Sat, Mar 7, 2009 at 13:59, Tony Frame wrote: Steve, 5.4 Beta 3 works fine for me in cgi mode on Fedora 7 & 10 but the latest svn version (IDs itself as 5.5.0) generates the legend differently. In particular the key image sizes have changed and the vertical spacing between images is very small / zero - I'm pretty sure it worked ok yesterday with 5.4 Beta 3. My compile options : --with-agg --with-freetype --with-gdal --with-ogr --with-proj --with-wfs Regards Tony - Original Message - From: "Steve Lime" To: ; Sent: Friday, 06 March, 2009 12:05 PM Subject: [mapserver-users] MapServer 5.4 Beta 3 is now available... Greetings all: MapServer 5.4 Beta 3 is now available for download at http://mapserver.org/download. A small number of bugs uncovered during testing of the second beta have been fixed. The next release should be a release candidate and will be available mid-next week. As always any help in testing the software is greatly appreciated. Findings should be sent to the mapserver-dev (or even just mapserver-users) mailing list. The updated 5.4 release plan can be found at: http://trac.osgeo.org/mapserver/wiki/54ReleasePlan Steve ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users <><>___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Flash support
Hi All, I wanted to know if MS supports ming library version 0.3? I am trying to generate swf output from MS and installed ming library (0.3) and ran configure to support swf output. This was the output of configure: MapServer is now configured for /usr/local/php-5.2.6/ext/gd -- Compiler Info - C compiler:gcc -g -O2 -fPIC -Wall C++ compiler: g++ -g -O2 -fPIC -Wall Debug: -g -DNEED_NONBLOCKING_STDERR Generic NINT: Threading support: -DUSE_THREAD -- Renderer Settings - zlib support: -DUSE_ZLIB png support: jpeg support: iconv support: -DUSE_ICONV AGG support: AGG Freetype support: Ming(flash) support: -DUSE_MING_FLASH PDFLib support: -- Data Format Drivers --- native tiff support: -DUSE_TIFF PostGIS support: -DUSE_POSTGIS Proj.4 support:-DUSE_PROJ EPPL7 support: -DUSE_EPPL ArcSDE support: OGR support: -DUSE_OGR GDAL support: -DUSE_GDAL GEOS support: -DUSE_GEOS Oracle Spatial support: FastCGI support: -- OGC Services -- WMS Server:-DUSE_WMS_SVR WMS Client:-DUSE_WMS_LYR WFS Server: WFS Client:-DUSE_WMS_LYR WCS Server:-DUSE_WCS_SVR SOS Server:-DUSE_SOS_SVR -- MapScript - PHP MapScript: yes But ./mapserv -v doesn't show output=swf. Any idea as to what could be wrong? Thanks a lot. Subha ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] php-mpascript -- map not displaying
Dear users, I am using mapserver-5.0.3 (php-mapscript) on fedora 9. I am trying with the example given in the mapserver site for php-mapscript. when i call the link http://localhost/mapfiles/sampletest/htdocs/kerala.php Fortunately the imagecolor of the map is showing but unfortunately the layers of the map is not displaying. then i checked the apache error_log file. I got the following error [Mon Mar 16 16:01:06 2009] [notice] caught SIGTERM, shutting down [Mon Mar 16 16:01:17 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Mon Mar 16 16:01:17 2009] [notice] Digest: generating secret for digest authentication ... [Mon Mar 16 16:01:17 2009] [notice] Digest: done PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/php_mapscript.so' - /usr/lib/php/modules/php_mapscript.so: undefined symbol: php_gd_gdImageCopy in Unknown on line 0 PHP Warning: Module 'dbase' already loaded in Unknown on line 0 [Mon Mar 16 16:01:19 2009] [notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.8 configured -- resuming normal operations what could be a problem? someone please help me out tips will be appreciated Thanks, kapil ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] mapserver-users Digest, Vol 14, Issue 35
+ http://code.google.com/p/mscompanion/ Verusa Domethildes wrote: > > > > Hi! > > I'm working in a GIS project and I have to implement a web portal. I know > MapLab, but I'd like to user another site for this application. Do you > know another suites of web-based tools to create and manage MapServer web > mapping applications and map files, like MapLab? > > Thanks in advance! > > Verusa > > > > > > > _ > Conheça o Windows Live Spaces, a rede de relacionamentos do Messenger! > http://www.amigosdomessenger.com.br/ > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- View this message in context: http://n2.nabble.com/RE%3A-mapserver-users-Digest%2C-Vol-14%2C-Issue-35-tp2475712p2485144.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] mapserver-users Digest, Vol 14, Issue 35
Hi, Most valuable part of MapLab was that it was able to create an interactive internet map application for total newbies. Mapfile creation was more like a side effect. I think there is no other such easy to use application builder than MapLab, but you can have a look at http://maptools.org/ms4w/index.phtml?page=downloads.html for some alternatives. -Jukka Rahkonen- > -Alkuperäinen viesti- > Lähettäjä: mapserver-users-boun...@lists.osgeo.org > [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta BrainDrain > Lähetetty: 16. maaliskuuta 2009 11:52 > Vastaanottaja: mapserver-users@lists.osgeo.org > Aihe: RE: [mapserver-users] mapserver-users Digest, Vol 14, Issue 35 > > > I'd recomend you to learn map file reference and create map > files from scratch - it's the Mapserver's holy of holies - > you just need to know it. No tool support's all flexibility > and features. Mapserver publishers - QGis tool and arcgis > (arcmap) plugin - can help you with first steps. > > Verusa Domethildes wrote: > > > > > > > > Hi! > > > > I'm working in a GIS project and I have to implement a web > portal. I > > know MapLab, but I'd like to user another site for this > application. > > Do you know another suites of web-based tools to create and manage > > MapServer web mapping applications and map files, like MapLab? > > > > Thanks in advance! > > > > Verusa > > > > > > > > ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] apache warning TIFFReadDirectory
Hi, I means only what is says. There is some non-GeoTIFF tag in the image and that is not recognised, but if everything works there is no need to worry. -Jukka Rahkonen- Sven Schroeter wrote: > [mapserver-users] apache warning TIFFReadDirectory > > Hi, > I'm working with MapServer version 5.0.2 (php mapscript) on a > Apache 2.2.4 webserver. > Everything works fine but Apache logs following warning: > > Warning 1: > TIFFReadDirectory:Unknown field with tag 37522 (0x9292) encountered > > I'm using raster-data (.tif with .tfw) in an image catalogue. > Any idea? > Thanks > Sven ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Two questions about WMS and outputformats
Hi, By default, without having any OUTPUTFORMAT sections in the mapfile, Mapserver is advertising following imageformats in WMS GetCapabilities document: image/gif image/png image/png; mode=24bit image/jpeg image/vnd.wap.wbmp image/tiff image/svg+xml Some users have been confused because WMS client builds menu items according to that list, but at least "image/png; mode 24bit" and "image/tiff" do not give any output. What is the reason to include these formats in getCapabilities by default, if they do not work without creating OUTPUTFORMATs in the mapfile first? Second question is about JPEG outputformat. It works through GD with these settings OUTPUTFORMAT NAME "jpeg" MIMETYPE "image/jpeg" DRIVER "GD/JPEG" EXTENSION "jpg" IMAGEMODE RGB END If I change driver to "GDAL/JPEG" I get this error on ms errorlog [Mon Mar 16 11:16:05 2009].825000 msSaveImageGDAL(): General error message. Failed to create output JPEG file. JPEG driver doesn't support 4 bands. Must be 1 (grey) or 3 (RGB) bands. What makes GDAL/JPEG driver to believe that I want 4 bands? Or is it just best to use DG/JPEG always? -Jukka Rahkonen- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] mapserver-users Digest, Vol 14, Issue 35
I'd recomend you to learn map file reference and create map files from scratch - it's the Mapserver's holy of holies - you just need to know it. No tool support's all flexibility and features. Mapserver publishers - QGis tool and arcgis (arcmap) plugin - can help you with first steps. Verusa Domethildes wrote: > > > > Hi! > > I'm working in a GIS project and I have to implement a web portal. I know > MapLab, but I'd like to user another site for this application. Do you > know another suites of web-based tools to create and manage MapServer web > mapping applications and map files, like MapLab? > > Thanks in advance! > > Verusa > > > > > > > _ > Conheça o Windows Live Spaces, a rede de relacionamentos do Messenger! > http://www.amigosdomessenger.com.br/ > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- View this message in context: http://n2.nabble.com/RE%3A-mapserver-users-Digest%2C-Vol-14%2C-Issue-35-tp2475712p2484968.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Prevalence of the use of queryfiles...
I need queryfiles to persist query results (serialize to string/binary method wanted!) as a part of whole map 'state'. But I need more convenient, handy way to configure style of queried (selected) features. Style section to setup {border (color, line pattern, transparency), filling (color, fill pattern, transparency), maybe some symbolization} instead of just highlight color. It will be very useful (currently I need to dump query results into some temp table in spatial db - which has a spec. layer section (sections - for each feature type) in map file). For. ex. if my 'selection' is small - I can highlight it with vector features (good looking and fast, flexible styling!, no raster (all tiles! - can't decide which tile to redraw for general queries) data requests and redrawing - in OpenLayers), but when selection is big - I need to highlight it on server and re-request map tiles. Steve Lime wrote: > > Hi all: Consider this a survey of sorts. I'm wondering how many of you > make use of saving queries, either via the CGI or MapScript. It's an old > feature that isn't terribly useful and I'm trying to understand the pain > the community might incur if they go away in 6.0. If you didn't know they > existed or how you might use them then it's safe to say you don't need > 'em. > > Steve > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- View this message in context: http://n2.nabble.com/Prevalence-of-the-use-of-queryfiles...-tp2471795p2484926.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] apache warning TIFFReadDirectory
Hi, I'm working with MapServer version 5.0.2 (php mapscript) on a Apache 2.2.4 webserver. Everything works fine but Apache logs following warning: Warning 1: TIFFReadDirectory:Unknown field with tag 37522 (0x9292) encountered I'm using raster-data (.tif with .tfw) in an image catalogue. Any idea? Thanks Sven ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Need advice to support caching mechanism
Hi. I need to debate web map images caching technique. I'm using OpenLayers with tiled mapserver layer. But now I dissatisfied mapserver image request url scheme because it has variable map config file name (path) as a part (parameter), and some may be some other variable parts (for ex. OL use random '_olSalt' parameter to force HTTPRequest layer map redraw, time stamps, session id's etc.). I decide to change this scheme to have constant url for map image tile of the same bbox (extent), config & data 'stamps' to support browser caching. Map file can be constant but not in 'true' multiuser environment where they are customized for each user needs, according their rights (privileges). So map file name vary often by session (id) indirectly. We can exclude other url variables painlessly. Final tasks: - overwraiting some OL code to build correct url - create http handler to wrap mapserver cgi (and may be support intranet clusterization) - but how to provide some hash key for mapserver (all layers/styles...) config and data 'stamps'. Currently (for test purpose) I use CRC32 of map SLD as this hash. I can support versioning with some 'seed' metadata in map file for config and/or in (spatial-) database for data (for each layer in service table 'data_version'). Seed (version info) will be changed (by some way) after each 'publishing operation'. May be another way exists (other comprehensive map object string serialization/dumping to calculate checksum from it, some wms/wfs command)? -- View this message in context: http://n2.nabble.com/Need-advice-to-support-caching-mechanism-tp2484552p2484552.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] cannot able to test the mapfile-database eror
Hi, The Problem may be either u don't have geom. Or find out whether geom. Field is existed or not ? or you have to use SRID.Please check my map file below I have given MAP NAME Test STATUS ON SIZE 650 400 UNITS dd IMAGECOLOR 102 153 153 EXTENT 64.881 5.469 97.898 37.762 PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' '' END SYMBOL NAME "border" TYPE VECTOR POINTS 0 0 1 0 1 0.8 0 0.8 0 0 END STYLE 10 6 1 6 END FILLED TRUE END # Background color for the map canvas -- change as desired # IMAGECOLOR 192 192 192 IMAGEQUALITY 95 IMAGETYPE png OUTPUTFORMAT NAME jpeg DRIVER "GD/JPEG" MIMETYPE "image/jpeg" IMAGEMODE RGB EXTENSION "jpg" END SCALEBAR INTERVALS 2 UNITS kilometers STYLE 1 POSITION lc STATUS embed LABEL SIZE small COLOR 0 0 0 END END LAYER NAME "India" TYPE POLYGON CONNECTIONTYPE POSTGIS CONNECTION "host=localhost dbname=GIS password=administrator user=postgres port=5432" Data "the_geom from (select gid,name,pincode,district,address,website,phnumber,areaname,category,longitu de,latitude,metroname,the_geom from indiaparks) as Foo USING UNIQUE gid USING 'srid=24047'" STATUS ON TRANSPARENCY 40 MinScale 7054330 LABELITEM "cntry_name" #label Item CLASSITEM "cntry_name" TEMPLATE "query.html" CLASS NAME 'India' STYLE SYMBOL "border" SIZE 6 OUTLINECOLOR 0 0 0 COLOR 251 252 179 END LABEL #label class start POSITION auto #label Position FONT sans SIZE SMALL #lable size COLOR 0 38 237 # label color END # label end END END END END Thanks Venkat. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of syed mohseen Sent: Monday, March 16, 2009 11:01 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] cannot able to test the mapfile-database eror hi all, i am a new bie to fgs and i want to test one of my mapfile with connecting to my database. here is my mapfile NAME "test" SIZE 800 600 IMAGECOLOR 249 245 186 IMAGETYPE png EXTENT -1.00 -1.00 1.00 1.00 LAYER CONNECTIONTYPE postgis NAME "test" CONNECTION "user=postgres password=hellopostgres dbname=postgres host=localhost" DATA "geom FROM test" STATUS ON TYPE POINT END END whenever i test the file as shp2img i get the following error msDrawMap(): Image handling error. Failed to draw layer named 'test'. prepare_database(): Query error. Error executing POSTGIS DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT asbinary(force_collection(force_2d(geom)),'NDR'),OID::text from test WHERE geom && setSRID('BOX3D(-1.3338898163606 -1,1.3338898163606 1)'::BOX3D, find_srid('','test','geom') )' Postgresql reports the error as 'ERROR: find_srid() - couldnt find the corresponding SRID - is the geometry registered in the GEOMETRY_COLUMNS table? Is there an uppercase/lowercase missmatch? ' More Help: Error with POSTGIS data variable. You specified 'check your .map file'. Standard ways of specifiying are : (1) 'geometry_column from geometry_table' (2) 'geometry_column from (sub query) as foo using unique column name using SRID=srid#' Make sure you put in the 'using unique column name' and 'using SRID=#' clauses in. For more help, please see http://postgis.refractions.net/documentation/ Mappostgis.c - version of Jan 23/2004. any solutions will be appreciated regards SyedMohseen ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users