[mapserver-users] itemquery, itemnquery, qstring struggles

2008-10-20 Thread Jim.Haug
I've run into a brick wall on this. I've been trying to incorporate itemquery 
in a mapserver, first just through a simple test page that does a quick query. 
The test page is a simplified form of the itemquery in the test suite. If I use 
the qitem setting I get a "msDBFGetItemIndex(): DBASE file error. Item 
'[SITE_NO]' not found" error. If I drop the qitem, I get either the first item 
in the data, or in the case of an itemnquery, all of the data.

What I'm doing is setting up a mapserver for archaeological site data in South 
Dakota. The query will let a user enter an archaeological site number (i.e. 
39RO0005). In the test case, the server should find the site and give just a 
list of the site number it found; eventually I'll work it into zooming in on 
the site on the map. The problem is, that the search either ends up in an error 
(above) or it returns site '39AU0001', which is the first site in the dataset. 
If I try itemnquery, I get all 19,000 sites.

Here is the test web page:



ItemQuery test










Site: 









and here is the layer part of the map file:

  LAYER
NAME 'sites'
TYPE POLYGON
DATA '/gisdata/sd/arch/sites.shp'
METADATA
  qstring_validation_pattern '.'
END
STATUS OFF
OPACITY 50
PROJECTION
  "init=epsg:4326"
END
LABELITEM "SITE_NO"
LABELMAXSCALEDENOM 48000
CLASS
   NAME 'sites' 
   TEMPLATE "/var/www/sd/templates/sites.html"
   LABEL
 COLOR 96 64 64
   END
   STYLE
 SYMBOL 0 
 SIZE 3 
 OUTLINECOLOR 64 64 64
 COLOR 200 64 64
   END
END
HEADER "/var/www/sd/templates/sites_h.html"
FOOTER "/var/www/sd/templates/sites_f.html"
  END


I've tried a few different qstring validation templates, but none of them seem 
to work. The line in the address on the browser I get from the server is:

http://hawken/cgi-bin/mapserv?map=/gisdata/sd/sd_x.map&mode=itemquery&qlayer=sites&qstring=39ro0005

I'm stumped. I don't know what I'm doing wrong. Any suggestions, corrections, 
ridicule, whatever?

-Jim Haug
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Is using ECW format allowed or not?

2008-10-20 Thread Frank Warmerdam

Richard Greenwood wrote:

I too would like some clarification about the ECW license,
specifically using ECW as a source in MapServer.


Jukka / Richard,

My understanding is that you would need to negotiate a license with
Leica for use of the SDK with MapServer as it's "server status" means
you cannot use it under the no-cost-to-use arrangements.

As usual, I am not a lawyer...

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, [EMAIL PROTECTED]
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


[mapserver-users] tiff raster files are not being displayed properly

2008-10-20 Thread Don
Here is a html version of my post.
http://home.comcast.net/~harterc1/rasterbug.html


I was getting output like below from may tiff files which were tiled by
mapserver.



I took look at each tiff file and examined them with utilities. The tiff
files that did not seem to work were encoded with big endian. I
converted one such file to little endian, but that did not fix the trouble.

This is the one that did not display properly:
drh:/srv/www/htdocs>tiffdump data/tn_topo2/o36087a2.tif
data/tn_topo2/o36087a2.tif:
Magic: 0x4d4d  Version: 0x2a
Directory 0: offset 8336360 (0x7f33e8) next 0 (0)
SubFileType (254) LONG (4) 1<0>
ImageWidth (256) SHORT (3) 1<5254>
ImageLength (257) SHORT (3) 1<6699>
BitsPerSample (258) SHORT (3) 1<8>
Compression (259) SHORT (3) 1<32773>
Photometric (262) SHORT (3) 1<3>
ImageDescription (270) ASCII (2) 61
StripOffsets (273) LONG (4) 6699<8 92 176 260 344 428 512 596 680 764
848 932 1018 1109 1206 1300 1388 1474 1560 1648 1738 1824 1910 1998 ...>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) SHORT (3) 1<1>
StripByteCounts (279) LONG (4) 6699<84 84 84 84 84 84 84 84 84 84 84 86
91 97 94 88 86 86 88 90 86 86 88 86 ...>
XResolution (282) RATIONAL (5) 1<250>
YResolution (283) RATIONAL (5) 1<250>
PlanarConfig (284) SHORT (3) 1<1>
ResolutionUnit (296) SHORT (3) 1<2>
Software (305) ASCII (2) 43
DateTime (306) ASCII (2) 20<1996:11:04 17:10:55\0>
Colormap (320) SHORT (3) 768<0 65280 0 51968 33536 51456 35072 65280
42752 65280 55808 53504 52992 0 0 0 0 0 0 0 0 0 0 0 ...>
33550 (0x830e) DOUBLE (12) 3<2.4384 2.4384 0>
33922 (0x8482) DOUBLE (12) 6<0 0 0 476702 3.99841e+06 0>
34735 (0x87af) SHORT (3) 20<1 0 2 4 1024 0 1 1 1025 0 1 1 3072 0 1 26716
3073 34737 25 0>
34737 (0x87b1) ASCII (2) 26

drh:/srv/www/htdocs>tiffinfo data/tn_topo2/o36087a2.tif
TIFFReadDirectory: Warning, data/tn_topo2/o36087a2.tif: unknown field
with tag 33550 (0x830e) encountered.
TIFFReadDirectory: Warning, data/tn_topo2/o36087a2.tif: unknown field
with tag 33922 (0x8482) encountered.
TIFFReadDirectory: Warning, data/tn_topo2/o36087a2.tif: unknown field
with tag 34735 (0x87af) encountered.
TIFFReadDirectory: Warning, data/tn_topo2/o36087a2.tif: unknown field
with tag 34737 (0x87b1) encountered.
TIFF Directory at offset 0x7f33e8 (8336360)
Subfile Type: (0 = 0x0)
Image Width: 5254 Image Length: 6699
Resolution: 250, 250 pixels/inch
Bits/Sample: 8
Compression Scheme: PackBits
Photometric Interpretation: palette color (RGB from colormap)
Samples/Pixel: 1
Rows/Strip: 1
Planar Configuration: single image plane
Color Map: (present)
ImageDescription: USGS GeoTIFF DRG 1:24000 Quad of White Bluff.
Product:486355
Software: USGS CD Archiver program tif2usgsdrg v.1.0
DateTime: 1996:11:04 17:10:55
Tag 33550: 2.438400,2.438400,0.00
Tag 33922: 0.00,0.00,0.00,476701.795786,3998406.010399,0.00
Tag 34735: 1,0,2,4,1024,0,1,1,1025,0,1,1,3072,0,1,26716,3073,34737,25,0
Tag 34737: UTM Zone 16 N with NAD27|





And this is the one that did display properly:
tiffdump data/tn_topo2/o35087h2.tif
data/tn_topo2/o35087h2.tif:
Magic: 0x4949  Version: 0x2a
Directory 0: offset 7225380 (0x6e4024) next 0 (0)
ImageWidth (256) SHORT (3) 1<5577>
ImageLength (257) SHORT (3) 1<6930>
BitsPerSample (258) SHORT (3) 1<8>
Compression (259) SHORT (3) 1<32773>
Photometric (262) SHORT (3) 1<3>
StripOffsets (273) LONG (4) 6930<8 98 188 282 372 464 558 659 757 860
961 1082 1218 1347 1451 1544 1638 1732 1826 1924 2018 2114 2212 2302 ...>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) SHORT (3) 1<1>
StripByteCounts (279) LONG (4) 6930<90 90 94 90 92 94 101 98 103 101 121
136 129 104 93 94 94 94 98 94 96 98 90 104 ...>
PlanarConfig (284) SHORT (3) 1<1>
Colormap (320) SHORT (3) 768<0 65280 0 51968 33536 51456 35072 65280
42752 65280 55808 53504 52992 0 0 0 0 0 0 0 0 0 0 0 ...>
33550 (0x830e) DOUBLE (12) 3<2.4 2.4 1>
33922 (0x8482) DOUBLE (12) 6<0 0 0 476364 3.98449e+06 0>
34735 (0x87af) SHORT (3) 20<1 1 0 4 1024 0 1 1 1025 0 1 1 3072 0 1 26716
3076 0 1 9001>

drh:/srv/www/htdocs>tiffinfo data/tn_topo2/o35087h2.tif
TIFFReadDirectory: Warning, data/tn_topo2/o35087h2.tif: unknown field
with tag 33550 (0x830e) encountered.
TIFFReadDirectory: Warning, data/tn_topo2/o35087h2.tif: unknown field
with tag 33922 (0x8482) encountered.
TIFFReadDirectory: Warning, data/tn_topo2/o35087h2.tif: unknown field
with tag 34735 (0x87af) encountered.
TIFF Directory at offset 0x6e4024 (7225380)
Image Width: 5577 Image Length: 6930
Bits/Sample: 8
Compression Scheme: PackBits
Photometric Interpretation: palette color (RGB from colormap)
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 1
Planar Configuration: single image plane
Color Map: (present)
Tag 33550: 2.40,2.40,1.00
Tag 33922: 0.00,0.00,0.00,476363.69,3984492.57,0.00
Tag 34735: 1,1,0,4,1024,0,1,1,1025,0,1,1,3072,0,1,26716,3076,0,1,9001

I then ran this command on the problem file
geotifcp -c packbits -f lsb2msb -t data/tn_topo

Re: [mapserver-users] Is using ECW format allowed or not?

2008-10-20 Thread Richard Greenwood
On Mon, Oct 20, 2008 at 11:54 AM, Rahkonen Jukka
<[EMAIL PROTECTED]> wrote:
> Gregor Mosheh wrote:
>
>>> 1. Can we use our compressed ECW images as input for MapServer WMS?
>>> 2. Can we use ECW as an output format for MapServer WCS?
>
>> The license agreement says that the ECW SDK cannot be used "on a server"
>> then goes on to define that as a computer connected to the Internet
>> which provides images. I'd say that clearly rules out MapServer
>> consuming ECW. Very unfortunate, but in my opinion very clear.
>
>> In my tests, I have found that JPEG2000 and ECW are really too slow for
>> production use anyway. Maybe that's some "sour grapes" consolation? :)
>
> Just made some tests today with a black/white ECW image covering the whole of 
> Finland with 1 m pixel size, image size about 120 by 50 pixels.  
> Debug log shows about 0.15 seconds rendering time at any output image size 
> with png output to WMS. At least with this image the speed would be enough 
> for us.  I know from earlier experience that server is slower with colour ECW 
> imagery and jpeg or png24 output but that is not a surprise.  But we are not 
> going to acquire extra ECW licensies and yearly fees so obviously we are 
> going to go on with geotiffs.
>
> -Jukka Rahkonen-

I too would like some clarification about the ECW license,
specifically using ECW as a source in MapServer.

I have had excellent results with color ECWs.  I have tested
informally against RGB TIFFs, palatalized TIFFs, and ERDAS img formats
on a basic SCSI RAID and on a single IDE drive. The palatalized TIFFs
are the fastest, but look lousy. The other formats are comparable in
speed. ECWs, being smaller in size, are easier to maintain on remote
servers. The things that appear to make a significant difference in
speed are:
1. Use low compression levels. I typically use 8:1
2. Use pyramids. I know that ECW has internal support for pyramids,
but if you want to serve up fast ECW imagery, pretend that it doesn't.

Rich

-- 
Richard Greenwood
[EMAIL PROTECTED]
www.greenwoodmap.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] cifs and shapepath

2008-10-20 Thread zach cruise
tried putting complete path under
LAYER
...
DATA "..."
...
END
without luck

could be a permission issue- how do i allow webuser (via apache)
access to data on cifs? how do i find user apache is running as?

krishna s or clint johnson?

On Mon, Oct 20, 2008 at 12:35 PM, zach cruise <[EMAIL PROTECTED]> wrote:
> how do i point to data on cifs in map file? pointer to data on local works ok.
>
> MAP
> ...
> # ? SHAPEPATH "g:/" # g: is mapped drive name
> # ? SHAPEPATH "//123.4.5.6/cifs_user_name/folder_name/"
> ...
> LAYER
> ...
> DATA "poly/cities" # cities.shp
> ...
> END
> ...
> END
>
> http://www.nabble.com/UNC-path-in-mapfile-td2744178.html
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Layer (line) with LABELITEM...

2008-10-20 Thread Steve Lime
Hi Paul: For now you must have 2 layers. There's no way to make one
style apply
to the line work and the another to a label marker. That may change in
5.4 but for
now you're stuck with 2.

Steve 

>>> "Paul james" <[EMAIL PROTECTED]> 10/17/08 12:44 PM >>>
Hello guys...
I have 2 layers, LINE and ANNOTATION...
Like that :

LAYER
NAME TestLINE
TYPE LINE
  ...
CLASS
  STYLE
SYMBOL 'circle'
SIZE 16
COLOR 175 175 175
  END  ## BG
  STYLE
SYMBOL 'circle'
SIZE 12
COLOR 247 190 33
  END
  MAXSCALE 4
END
CLASS
  MINSCALE 40001
  #NAME 'US Interstate'  ## Using Interstate Shield Symbol
Instead
  STYLE
SYMBOL 'circle'
SIZE 14
COLOR 175 175 175
  END  ## BG
  STYLE
SYMBOL 'circle'
SIZE 10
COLOR 247 190 33
  END
  MAXSCALE 45000
END
END

And I have a ANNOTATION to label the TestLINE layer:
LAYER
NAME 'road_sym'
TYPE ANNOTATION
LABELITEM 'roadnumber'
CLASS
  STYLE
SYMBOL 'road'
SIZE 28
COLOR 255 0 0
  END
  STYLE
SYMBOL 'road'
SIZE 28
COLOR 115 113 206
OUTLINECOLOR 254 254 254
  END
  LABEL
TYPE TRUETYPE
FONT Arial
SIZE 8
COLOR 254 254 254
MINDISTANCE 100
MINFEATURESIZE 10
OFFSET 0 0
PARTIALS FALSE
  END
  MAXSCALE 2000
END
  END

That works great...
But, Is that possible to make just one layer with lines and annotation..
I
tried using LABELITEM and LABEL on LINE layer... But where Am I supposed
to
write the label Style ?

[]́s

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] RE: Documentation for serving large raster images using tile cache.

2008-10-20 Thread Roger André
Hi Asif,

Best thing to do is take a look at these 2 docs first:
- http://mapserver.gis.umn.edu/docs/howto/raster_data
- http://tilecache.org/readme.html

Once you have the ability to see your raster in MapServer via a "mode=map"
request, then you will have to decide how you wish to view your data
afterwards.  There are different things to do in TileCache depending on
whether you wish to view the data in OpenLayers, or over Google Maps/MS VE.
--



On Mon, Oct 20, 2008 at 12:01 PM, Gregor Mosheh <[EMAIL PROTECTED]> wrote:

> Asif Memon wrote:
>
>> Could someone please point me to the documentation for serving large (2GB
>> to 3GB) raster images using tile cache. I want to use Minnesota Map Server
>> and GDAL to achieve this.
>>
>
> You'll want to ask the TileCache list about that, likely. Once you have
> MapServer actually serving up the imagery, get your client using MapServer
> or WMS (I like OpenLayers, myself). Then install TileCache and change the OL
> app to use TC's URL instead of MapServer's. Easy.
>
> But you may want to install OpenLayers and get it working with MapServer
> first, then hit up the OL and TC mailing lists.
>
> --
> Gregor Mosheh / Greg AllensworthBS, A+, Network+, Security+, Server+
> System Administrator, Lead Programmer
> HostGIS development & hosting services, http://www.HostGIS.com/
>
> "Remember that no one cares if you can back up,
>  only if you can restore." - AMANDA
> ___
> 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] mssql2008 binary test package available to download

2008-10-20 Thread Tamas Szekeres
2008/10/20 BrainDrain <[EMAIL PROTECTED]>:
> But can I ask you for one more favour. Could you compile with fastcgi
> support (ideally with all ms4w production release flags) or share 'your
> working buildkit' (this just will be great!, not only for me) because I
> still have problems with compiling ms4w(( but I need sql2008 support feature
> as soon as it possible for my work. I would be very appreciate.
>

I hope I'll have some time to put it together possibly to the end of this week.

Best regards,

Tamas
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Access control for wms served from mapserver cgi

2008-10-20 Thread Robert Sanson
Hi Marc
 
Where do you set this? Is it somewhere in httpd.conf?
 
Many thanks,
 
Robert Sanson

>>> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> 21/10/2008
4:21 a.m. >>>
Hello,

We are using this very basic setting:

# Demo WMS
Alias /wms-demo/usr/lib/cgi-bin/mapserver

  Deny from all
   #   My network
   Allow from  10.133
   SetHandler cgi-script
   Options ExecCGI
   SetEnv MS_MAPFILE /var/www/wms/wms-demo/wms-demo.map


Cheers

Marc Monnerat

Message d'origine
De: [EMAIL PROTECTED] 
Date: 20.10.2008 11:33
À: 
Objet: Re: [mapserver-users] Access control for wms served from
mapserver cgi

Hello Rahkonen (and Stephan),

This is an idea that I could make work...I'd have to lock-down mapserv

itself from all connections (otherwise anyone could just replace 
wms*.exe in the URL with the original mapserv.exe), though I guess I 
should be doing that anyway.

In response to Stephan Holl: I recognize there are other strategies
that 
involve proxying the WMS requests.  I was just hoping for something 
quick and easy that could be done with Apache more or less 
out-of-the-box using basic config files and/or modules like
mod_rewrite. 
  There have been a few cases where I needed to use mapserver on one 
machine to serve data using WMS to another server running mapserver as
a 
WMS client.  I just want to be able to do that with as little work as 
possible (i.e., if I can do it in Apache's config, then I can do it 
anywhere).

Essentially, my ideal solution would be if I can get something like 
mod_rewrite to say "if a request to mapserv contains 
'map=/path/to/somefile.map' in the query string, and the client is not

equal to some IP address, return 403, otherwise allow the request".  I

just don't quite know how to get mod_rewrite to work like that for me
(I 
found some promising examples online, but couldn't get them working).

Thanks again,
Mike

Rahkonen Jukka wrote:
> Hi,
> 
> If it is easy to limit access to mapserv executable, then how about
making a few copies of the executable and tie 
each copy to its own mapfile in httpd.conf?
> 
> SetEnvIf Request_URI "/cgi-bin/wms1.exe?"
MS_MAPFILE=d:/ms4w/apps/wms1.map
> SetEnvIf Request_URI "/cgi-bin/wms2.exe?"
MS_MAPFILE=d:/ms4w/apps/wms2.map
> 
> Just thinking, I do not know if this is secure at all.  
> 
> -Jukka Rahkonen-
>  
> 
>> -Alkuperäinen viesti-
>> Lähettäjä: [EMAIL PROTECTED] 
>> [mailto:[EMAIL PROTECTED] Puolesta Mike
Leahy
>> Lähetetty: 20. lokakuuta 2008 3:58
>> Vastaanottaja: mapserver-users@lists.osgeo.org 
>> Aihe: [mapserver-users] Access control for wms served from 
>> mapserver cgi
>>
>> Hello list,
>>
>> Does anyone on this list know of a simple strategy for 
>> configuring Apache to restrict access to specific mapfiles 
>> served as WMS through the cgi mapserv program?  I'd like to 
>> do is restrict access to specific IPs for URLs like the following: 
>> http://host/cgi-bin/mapserv?map=/path/to/file.map[&;...].
>>
>> It's easy enough to limit access to the mapserv executable 
>> itself, but I'd rather do it on a per-mapfile basis.  I tried 
>> a couple things using mod_rewrite in apache, but anything 
>> I've tried so far doesn't seem to work.
>>
>> I know that this sort of question has been asked before, but 
>> after searching/tinkering for a while, I haven't found a 
>> solution that works for me yet.
>>
>> Thanks for any suggestions,
>> Mike
>> ___
>> 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 

--
The contents of this email are confidential to AsureQuality. If you have 
received this communication in error please notify the sender immediately and 
delete the message and any attachments. The opinions expressed in this email 
are not necessarily those of AsureQuality. This message has been scanned for 
known viruses before delivery. AsureQuality supports the Unsolicited Electronic 
Messages Act 2007. If you do not wish to receive similar communications in 
future, please notify the sender of this message.
--


This message has been scanned for malware by SurfControl plc. 
www.surfcontrol.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] RE: Documentation for serving large raster images using tile cache.

2008-10-20 Thread Gregor Mosheh

Asif Memon wrote:
Could someone please point me to the documentation for serving large 
(2GB to 3GB) raster images using tile cache. I want to use Minnesota Map 
Server and GDAL to achieve this.


You'll want to ask the TileCache list about that, likely. Once you have 
MapServer actually serving up the imagery, get your client using 
MapServer or WMS (I like OpenLayers, myself). Then install TileCache and 
change the OL app to use TC's URL instead of MapServer's. Easy.


But you may want to install OpenLayers and get it working with MapServer 
first, then hit up the OL and TC mailing lists.


--
Gregor Mosheh / Greg AllensworthBS, A+, Network+, Security+, Server+
System Administrator, Lead Programmer
HostGIS development & hosting services, http://www.HostGIS.com/

"Remember that no one cares if you can back up,
 only if you can restore." - AMANDA
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] RE: Documentation for serving large raster images using tile cache.

2008-10-20 Thread Asif Memon
Hello,

 

Could someone please point me to the documentation for serving large
(2GB to 3GB) raster images using tile cache. I want to use Minnesota Map
Server and GDAL to achieve this. Any help is greatly appreciated.
Thanks! 

 

Sincerely,

 

Asif Memon

Software Engineer, BIRN-CC

Biomedical Informatics Research Network

University of California, San Diego

[EMAIL PROTECTED]  

www.nbirn.net  

 

 

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WMS don't load

2008-10-20 Thread Jeff McKenna

[EMAIL PROTECTED] wrote:


and I'm running out of faith... :-)

Yep I still get the curl error code 6. I asked my system admin to grant 
full access to everyone...same result.




Have you tested this on your own machine at home?  If you have a 
locked-down IIS machine trying to run MS4W I agree with Daniel that it 
is probably a permissions issue.  (in other words, try this outside of 
your work environment, and if all is ok there, then you know that it has 
something to do with your security at work)



--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WMS don't load

2008-10-20 Thread Brent Fraser

Steve,

 That's baffling.  Two computers with the same version of Mapserver and the 
same mapfile allow different data types returned (I have no clue about the 
pragma:no-cache)?  Maybe an Apache config thing?  Are the conf files the same?

Brent
 


[EMAIL PROTECTED] wrote:


Hi,
Thanks Brent,
I got the image with curl.exe
I'm sorry but I have no idea how to test libcurl.dll using a command line.

Also, I used httpLook.as suggested

As I said the mapFile containing a WMS works on my computer but not on 
another computer. They both have the same ms4w version (2.3.0)


With httpLook I can see these differences between both computers

Computer who works
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, 
application/xaml+xml, application/vnd.ms-xpsdocument, 
application/x-ms-xbap, application/x-ms-application, */*



Computer who doesn't work
Accept: */*
pragma:no-cache

Someone knows if "pragma:no-cache" can be an issue?
steve

/Steve Toutant, M. Sc./
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3

Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144_
[EMAIL PROTECTED] _
__http://www.inspq.qc.ca_ 

 


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WMS don't load

2008-10-20 Thread Steve . Toutant
Hi,
Thanks Brent,
I got the image with curl.exe
I'm sorry but I have no idea how to test libcurl.dll using a command line.

Also, I used httpLook.as suggested

As I said the mapFile containing a WMS works on my computer but not on 
another computer. They both have the same ms4w version (2.3.0)

With httpLook I can see these differences between both computers

Computer who works
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, 
application/xaml+xml, application/vnd.ms-xpsdocument, 
application/x-ms-xbap, application/x-ms-application, */*


Computer who doesn't work
Accept: */*
pragma:no-cache

Someone knows if "pragma:no-cache" can be an issue?
steve

Steve Toutant, M. Sc.
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3 
Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144
[EMAIL PROTECTED]
http://www.inspq.qc.ca
 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WMS don't load

2008-10-20 Thread Brent Fraser

Oops, I forgot to copy to the list:

Steve,

Do
curl.exe 
"http://atlas.gc.ca/cgi-bin/atlaswms_fr?LAYERS=pe_15m&REQUEST=GetMap&SERVICE=WMS&FORMAT=image/gif&STYLES=&HEIGHT=300&VERSION=1.1.1&SRS=EPSG:4326&WIDTH=400&BBOX=-80.9516220735786,44.92,-57.1183779264214,62.78&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage";
 -o temp.gif

Notice the "-o" option for output (and as Tom notes, the quotation marks).

But since you download cUrl, it really doesn't test the libcurl installation 
that comes with mapserver.  My thought was that it may be having trouble 
loading some dll it needed or something certificate-related...

Brent 


[EMAIL PROTECTED] wrote:


OuchI don't know what is this thing but when I execute this
curl.exe 
"http://atlas.gc.ca/cgi-bin/atlaswms_fr?LAYERS=pe_15m&REQUEST=GetMap&SERVICE=WMS&FORMAT=image/gif&STYLES=&HEIGHT=300&VERSION=1.1.1&SRS=EPSG:4326&WIDTH=400&BBOX=-80.9516220735786,44.92,-57.1183779264214,62.78&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_xml"; 



My computer start beeping and I get something like this




/Steve Toutant, M. Sc./
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3

Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144_
[EMAIL PROTECTED] _
__http://www.inspq.qc.ca_ 

 


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] WMS don't load

2008-10-20 Thread Steve . Toutant
OuchI don't know what is this thing but when I execute this 
curl.exe "
http://atlas.gc.ca/cgi-bin/atlaswms_fr?LAYERS=pe_15m&REQUEST=GetMap&SERVICE=WMS&FORMAT=image/gif&STYLES=&HEIGHT=300&VERSION=1.1.1&SRS=EPSG:4326&WIDTH=400&BBOX=-80.9516220735786,44.92,-57.1183779264214,62.78&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_xml
"

My computer start beeping and I get something like this




Steve Toutant, M. Sc.
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3 
Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144
[EMAIL PROTECTED]
http://www.inspq.qc.ca
 
<>___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Is using ECW format allowed or not?

2008-10-20 Thread Rahkonen Jukka
Gregor Mosheh wrote:
 
>> 1. Can we use our compressed ECW images as input for MapServer WMS?
>> 2. Can we use ECW as an output format for MapServer WCS?

> The license agreement says that the ECW SDK cannot be used "on a server" 
> then goes on to define that as a computer connected to the Internet 
> which provides images. I'd say that clearly rules out MapServer 
> consuming ECW. Very unfortunate, but in my opinion very clear.

> In my tests, I have found that JPEG2000 and ECW are really too slow for 
> production use anyway. Maybe that's some "sour grapes" consolation? :)

Just made some tests today with a black/white ECW image covering the whole of 
Finland with 1 m pixel size, image size about 120 by 50 pixels.  Debug 
log shows about 0.15 seconds rendering time at any output image size with png 
output to WMS. At least with this image the speed would be enough for us.  I 
know from earlier experience that server is slower with colour ECW imagery and 
jpeg or png24 output but that is not a surprise.  But we are not going to 
acquire extra ECW licensies and yearly fees so obviously we are going to go on 
with geotiffs.

-Jukka Rahkonen-
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] WMS don't load

2008-10-20 Thread Kralidis,Tom [Burlington]

Put the url in double quotes, i.e.:

> curl.exe 
> "http://atlas.gc.ca/cgi-bin/atlaswms_fr?LAYERS=pe_15m&REQUEST=GetMap&SERVICE=WMS&FORMAT=image/gif&STYLES=&HEIGHT=300&VERSION=1.1.1&SRS=EPSG:4326&WIDTH=400&BBOX=-80.9516220735786,44.92,-57.1183779264214,62.78&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_xml

When I try this, I get a valid GIF image back.

..Tom





From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL 
PROTECTED]
Sent: 20 October, 2008 1:33 PM
To: Brent Fraser
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] WMS don't load



Are you familiar with curl? I don't what is it and whait it is supposed 
to return. 
I downloaded curl.exe anyway but I need help. What is the url I should 
send? 
I tried 
curl.exe 
http://atlas.gc.ca/cgi-bin/atlaswms_fr?LAYERS=pe_15m&REQUEST=GetMap&SERVICE=WMS&FORMAT=image/gif&STYLES=&HEIGHT=300&VERSION=1.1.1&SRS=EPSG:4326&WIDTH=400&BBOX=-80.9516220735786,44.92,-57.1183779264214,62.78&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage
 

But I just get a bunch of error 
 
MapServer Message 
 
 
mapserv(): Web application error. Traditional BROWSE mode requires a 
TEMPLATE in 
 the WEB section, but none was provided. 
'REQUEST' is not recognized as an internal or external 
command, 
operable program or batch file. 
'SERVICE' is not recognized as an internal or external command, 
operable program or batch file. 
Invalid parameter - /gif 
'STYLES' is not recognized as an internal or external command, 
operable program or batch file. 
'HEIGHT' is not recognized as an internal or external command, 
operable program or batch file. 
'VERSION' is not recognized as an internal or external command, 
operable program or batch file. 
'SRS' is not recognized as an internal or external command, 
operable program or batch file. 
'WIDTH' is not recognized as an internal or external command, 
operable program or batch file. 
'BBOX' is not recognized as an internal or external command, 
operable program or batch file. 
'TRANSPARENT' is not recognized as an internal or external command, 
operable program or batch file. 
'EXCEPTIONS' is not recognized as an internal or external command, 
operable program or batch file. 

Steve Toutant, M. Sc.
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3 

Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144
[EMAIL PROTECTED]  
http://www.inspq.qc.ca   

  

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WMS don't load

2008-10-20 Thread Steve . Toutant
Are you familiar with curl? I don't what is it and whait it is supposed to 
return.
I downloaded curl.exe anyway but I need help. What is the url I should 
send?
I tried 
curl.exe 
http://atlas.gc.ca/cgi-bin/atlaswms_fr?LAYERS=pe_15m&REQUEST=GetMap&SERVICE=WMS&FORMAT=image/gif&STYLES=&HEIGHT=300&VERSION=1.1.1&SRS=EPSG:4326&WIDTH=400&BBOX=-80.9516220735786,44.92,-57.1183779264214,62.78&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage

But I just get a bunch of error

MapServer Message


mapserv(): Web application error. Traditional BROWSE mode requires a 
TEMPLATE in
 the WEB section, but none was provided.
'REQUEST' is not recognized as an internal or external 
command,
operable program or batch file.
'SERVICE' is not recognized as an internal or external command,
operable program or batch file.
Invalid parameter - /gif
'STYLES' is not recognized as an internal or external command,
operable program or batch file.
'HEIGHT' is not recognized as an internal or external command,
operable program or batch file.
'VERSION' is not recognized as an internal or external command,
operable program or batch file.
'SRS' is not recognized as an internal or external command,
operable program or batch file.
'WIDTH' is not recognized as an internal or external command,
operable program or batch file.
'BBOX' is not recognized as an internal or external command,
operable program or batch file.
'TRANSPARENT' is not recognized as an internal or external command,
operable program or batch file.
'EXCEPTIONS' is not recognized as an internal or external command,
operable program or batch file.

Steve Toutant, M. Sc.
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3 
Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144
[EMAIL PROTECTED]
http://www.inspq.qc.ca
 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Is using ECW format allowed or not?

2008-10-20 Thread Gregor Mosheh

1. Can we use our compressed ECW images as input for MapServer WMS?
2. Can we use ECW as an output format for MapServer WCS?


The license agreement says that the ECW SDK cannot be used "on a server" 
then goes on to define that as a computer connected to the Internet 
which provides images. I'd say that clearly rules out MapServer 
consuming ECW. Very unfortunate, but in my opinion very clear.


In my tests, I have found that JPEG2000 and ECW are really too slow for 
production use anyway. Maybe that's some "sour grapes" consolation? :)


 --
Gregor Mosheh / Greg AllensworthBS, A+, Network+, Security+, Server+
System Administrator, Lead Programmer
HostGIS development & hosting services, http://www.HostGIS.com/

"Remember that no one cares if you can back up,
 only if you can restore." - AMANDA
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] RE: strange png alpha behavior

2008-10-20 Thread Charlton Galvarino
Figured it out.  Type=UInt16 was the culprit on the source .png's.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:mapserver-users-
> [EMAIL PROTECTED] On Behalf Of Charlton Galvarino
> Sent: Sunday, October 19, 2008 2:15 PM
> To: Mapserver Users (mapserver-users@lists.osgeo.org)
> Subject: [mapserver-users] strange png alpha behavior
>
> Hi, all.  I'm stumped, and I've tried everything I can think of.
> Rebuilding gdal, rebuilding libpng, rebuilding mapserver.  Even the
> version of mapserver doesn't really matter to me, but I have tried the
> latest and greatest.
>
> MapServer version 5.2.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV
> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR
> INPUT=GDAL INPUT=SHAPEFILE
>
> If I pass b.png thru a normal WMS request, it looks beautimous.  If I pass
> a, it is incorrect.  a.png and b.png were made on different boxes against
> the same source data, and in spite of my best efforts to make those boxes'
> builds identical wrt gdal, ogr, etc. something is still different.
>
> for b . . .
>
> Driver: PNG/Portable Network Graphics
> Files: /home/charlton/Temp/b.png
> Size is 640, 720
> Coordinate System is `'
> Origin = (-100.00342881923,49.5659723)
> Pixel Size = (0.06241319444,-0.06241319444)
> Image Structure Metadata:
>   INTERLEAVE=PIXEL
> Corner Coordinates:
> Upper Left  (-100.0034288,  49.566)
> Lower Left  (-100.0034288,   5.0624566)
> Upper Right ( -60.0589844,  49.566)
> Lower Right ( -60.0589844,   5.0624566)
> Center  ( -80.0312066,  27.5312066)
> Band 1 Block=640x1 Type=Byte, ColorInterp=Red
>   Mask Flags: PER_DATASET ALPHA
> Band 2 Block=640x1 Type=Byte, ColorInterp=Green
>   Mask Flags: PER_DATASET ALPHA
> Band 3 Block=640x1 Type=Byte, ColorInterp=Blue
>   Mask Flags: PER_DATASET ALPHA
> Band 4 Block=640x1 Type=Byte, ColorInterp=Alpha
>
> for a . . .
>
> Driver: PNG/Portable Network Graphics
> Files: /home/charlton/Temp/a.png
> Size is 640, 720
> Coordinate System is `'
> Origin = (-100.00342881923,49.5659723)
> Pixel Size = (0.06241319444,-0.06241319444)
> Image Structure Metadata:
>   INTERLEAVE=PIXEL
> Corner Coordinates:
> Upper Left  (-100.0034288,  49.566)
> Lower Left  (-100.0034288,   5.0624566)
> Upper Right ( -60.0589844,  49.566)
> Lower Right ( -60.0589844,   5.0624566)
> Center  ( -80.0312066,  27.5312066)
> Band 1 Block=640x1 Type=UInt16, ColorInterp=Red Band 2 Block=640x1
> Type=UInt16, ColorInterp=Green Band 3 Block=640x1 Type=UInt16,
> ColorInterp=Blue Band 4 Block=640x1 Type=UInt16, ColorInterp=Alpha
>
> I don't know enough about PNG to know what PER_DATASET ALPHA is.  But is
> this what might be upsetting the final product?
>
> Plugging a or b into udig directly looks fine, and the a,b images look
> great.  But you can see that after I pass it thru a WMS request, I get
> bad_output.png.
>
> Any ideas?
>
> TIA,
>
> Charlton
>
>
>
>
>
> Charlton Galvarino
> 1 (803) 233-6205 : voice
> 1 (803) 223-9579 :   fax
> [EMAIL PROTECTED]
>
> P.O. Box 50960
> Columbia, SC 29250
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] cifs and shapepath

2008-10-20 Thread zach cruise
how do i point to data on cifs in map file? pointer to data on local works ok.

MAP
...
# ? SHAPEPATH "g:/" # g: is mapped drive name
# ? SHAPEPATH "//123.4.5.6/cifs_user_name/folder_name/"
...
LAYER
...
DATA "poly/cities" # cities.shp
...
END
...
END

http://www.nabble.com/UNC-path-in-mapfile-td2744178.html
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: Missing row of pixels in MapServer generated tiles

2008-10-20 Thread Roger André
Nope, that's not it.  Had the correct params in that entry after all:

<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0
+y_0=0 +k=1.0 +units=m [EMAIL PROTECTED] +no_defs

This matches documentation at
http://spatialreference.org/ref/user/google-projection/

Reprojected my data file with gdalwarp to epsg 900913, then updated the
mapfile to reflect that input layer is in that projection and tested.  Got
rid of the missing rixel rows at the bottom of tiles, but now the image only
extends between 80 to -80 latitude, and there is a weird, scalloped seam at
the international dateline.  So something is still not right, but it would
appear that it's projection related.
--


On 10/19/08, Roger André <[EMAIL PROTECTED]> wrote:
>
> One thing I did notice is that my EPSG file definition for "Spherical
> Mercator" is missing a parameter, "[EMAIL PROTECTED]".  I'll test tomorrow to
> see if adding it to the definition removes the problem.
> --
>
>
> On Sat, Oct 18, 2008 at 7:25 PM, Roger André <[EMAIL PROTECTED]> wrote:
>
>> This is probably more of a TileCache question, than a MapServer one, but I
>> figure one of you may have had the same issue in the past.  I'm using
>> MapServer to feed TileCache a fairly large GeoTiff with global extents,
>> which I'm then displaying in Google Maps as a tile layer.  This has worked
>> well in the past, but now I'm encountering a weird problem.  Some of my
>> tiles are being rendered by MapServer with a row of pixels missing on the
>> bottom of the image.  So for example, in Zoom Level 2, all of the 0.png
>> tiles will be 256 x 256 pixels, but row 256 will not contain data from my
>> global image, but instead will be set entirely to whatever background color
>> I have set in my Mapfile. The problem appears in multiple, but not all, Zoom
>> levels, and at different geographic locations, but always at the bottom row
>> of a tile.
>>
>> The source image doesn't have the lines in then, so I have to believe that
>> the "dead" row is an artifact of the rendering process.  My seed image is in
>> lat/lon WGS84, and the tiles are being requested in EPSG:900913.  The
>> reprojection seems to be working correctly, insofar as image lineup with
>> Google Maps seems to indicate.  If I take the seed image and create a very
>> reduced resolution version of it, then run it through TileCache, I don't get
>> any lines.  So it seems like the lines *might* be a result of downsampling,
>> but since they're not present at the bottom of every image, I'm not
>> convinced that's the problem.
>>
>> Oh, and I'm using the GD driver.
>>
>> Any ideas?
>>
>> Roger
>> --
>>
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Spatial Query problem with ODBC layer

2008-10-20 Thread Emerson, Gabe
Hi all,

My issue with ODBC queries has been resolved. I needed a consistent
unique identifier in the SQL table, otherwise Mapserver just returned
the records in the order they appeared in the table. 

The OVF File also needed the identifier column specified as FID:

P_Recno

Thanks,

-Gabe



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Emerson,
Gabe
Sent: Thursday, October 16, 2008 10:45 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Spatial Query problem with ODBC layer

I recently switched one of my layers from a static shapefile to an ODBC
SQL connection. The data points are correctly displayed on the map, but
when I use the "query" or "nquery" modes, I get results that don't
correspond at all to the clicked point. I tend to get the same set of
points, in various orders, none of which are anywhere near eachother and
all outside the tolerance of the query. 

I'm assuming the problem is projection related, but I'm stumped as to
how to fix it. Do I need a  entry in my OVF file? I left it
out since it was causing problems, and I read that it was unnecessary if
a projection is defined in the layer. If  is needed, how
should I use it? I tried setting it to WGS84 and NAD83, both caused my
points to float in the Caribbean. I've seen EPSG codes used in example
OVF files, but I got an error when I tried that.

Here's my ODBC layer:

LAYER
NAME "brokerage"
STATUS off
TYPE POINT
DATA "GIS"
UNITS DD
CONNECTION "eBrochure_XY.ovf"
CONNECTIONTYPE OGR
PROJECTION
   "init=epsg:4326"
END
  METADATA
"wms_srs"   "4326"
"wms_title"   "coal-test"
  END
HEADER "../local/brokerage_header.html"
FOOTER "../local/layer_footer.html"
TOLERANCE 25
TOLERANCEUNITS pixels
CLASSITEM "P_PropertyType"
LABELITEM "P_Name"

 ## -- Various class definitions left out -- ##

END


And my OVF file (minus the account info):


ODBC:/[EMAIL PROTECTED] 
GIS 
wkbPoint 

 





___
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] WMS don't load

2008-10-20 Thread Steve . Toutant
and I'm running out of faith... :-)

Yep I still get the curl error code 6. I asked my system admin to grant 
full access to everyone...same result.

Brent just sent me a hint. I'll try it
Thanks for your ideas.
Steev


Steve Toutant, M. Sc.
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3 
Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144
[EMAIL PROTECTED]
http://www.inspq.qc.ca
 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Access control for wms served from mapserver cgi

2008-10-20 Thread [EMAIL PROTECTED]
Hello,

We are using this very basic setting:

# Demo WMS
Alias /wms-demo/usr/lib/cgi-bin/mapserver

  Deny from all
   #   My network
   Allow from  10.133
   SetHandler cgi-script
   Options ExecCGI
   SetEnv MS_MAPFILE /var/www/wms/wms-demo/wms-demo.map


Cheers

Marc Monnerat

Message d'origine
De: [EMAIL PROTECTED]
Date: 20.10.2008 11:33
À: 
Objet: Re: [mapserver-users] Access control for wms served from mapserver cgi

Hello Rahkonen (and Stephan),

This is an idea that I could make work...I'd have to lock-down mapserv 
itself from all connections (otherwise anyone could just replace 
wms*.exe in the URL with the original mapserv.exe), though I guess I 
should be doing that anyway.

In response to Stephan Holl: I recognize there are other strategies that 
involve proxying the WMS requests.  I was just hoping for something 
quick and easy that could be done with Apache more or less 
out-of-the-box using basic config files and/or modules like mod_rewrite. 
  There have been a few cases where I needed to use mapserver on one 
machine to serve data using WMS to another server running mapserver as a 
WMS client.  I just want to be able to do that with as little work as 
possible (i.e., if I can do it in Apache's config, then I can do it 
anywhere).

Essentially, my ideal solution would be if I can get something like 
mod_rewrite to say "if a request to mapserv contains 
'map=/path/to/somefile.map' in the query string, and the client is not 
equal to some IP address, return 403, otherwise allow the request".  I 
just don't quite know how to get mod_rewrite to work like that for me (I 
found some promising examples online, but couldn't get them working).

Thanks again,
Mike

Rahkonen Jukka wrote:
> Hi,
> 
> If it is easy to limit access to mapserv executable, then how about making a 
> few copies of the executable and tie 
each copy to its own mapfile in httpd.conf?
> 
> SetEnvIf Request_URI "/cgi-bin/wms1.exe?" MS_MAPFILE=d:/ms4w/apps/wms1.map
> SetEnvIf Request_URI "/cgi-bin/wms2.exe?" MS_MAPFILE=d:/ms4w/apps/wms2.map
> 
> Just thinking, I do not know if this is secure at all.  
> 
> -Jukka Rahkonen-
>  
> 
>> -Alkuperäinen viesti-
>> Lähettäjä: [EMAIL PROTECTED] 
>> [mailto:[EMAIL PROTECTED] Puolesta Mike Leahy
>> Lähetetty: 20. lokakuuta 2008 3:58
>> Vastaanottaja: mapserver-users@lists.osgeo.org
>> Aihe: [mapserver-users] Access control for wms served from 
>> mapserver cgi
>>
>> Hello list,
>>
>> Does anyone on this list know of a simple strategy for 
>> configuring Apache to restrict access to specific mapfiles 
>> served as WMS through the cgi mapserv program?  I'd like to 
>> do is restrict access to specific IPs for URLs like the following: 
>> http://host/cgi-bin/mapserv?map=/path/to/file.map[&;...].
>>
>> It's easy enough to limit access to the mapserv executable 
>> itself, but I'd rather do it on a per-mapfile basis.  I tried 
>> a couple things using mod_rewrite in apache, but anything 
>> I've tried so far doesn't seem to work.
>>
>> I know that this sort of question has been asked before, but 
>> after searching/tinkering for a while, I haven't found a 
>> solution that works for me yet.
>>
>> Thanks for any suggestions,
>> Mike
>> ___
>> 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


Re: [mapserver-users] WMS don't load

2008-10-20 Thread Brent Fraser

Steve,

 Perhaps running a http sniffer (such as HTTPLook) would help track down the 
problem?

Or maybe not.  The fact that the URL works interactively using shp2img or a browser but not from a service implies that the problem might be related to the permissions of the account Apache/Mapserver/Curl is running under.  Does that account have permission to access to the needed files and temporary directories?  


And the fact that curl seems to be generating a error is interesting.  You 
could try executing the url using curl from the commandline to see if curl will 
give more error information.

Best Regards,
Brent Fraser


[EMAIL PROTECTED] wrote:


Sounds like a DNS config problem on your server... can you double-check
your network settings?
There is no proxy, no firewall the DNS seems ok since I can ping and get 
to http://atlas.gc.ca


Did you try opening the URL using I.E. directly on the server that 
produces the error?

YES and the image shows up.

I also tried with this WMS that everyone knows
LAYER
  NAME "prov_bound"
  TYPE RASTER
  STATUS ON
  CONNECTION "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?";
  CONNECTIONTYPE WMS
  METADATA
"wms_srs" "EPSG:42304"
"wms_name""prov_bound"
"wms_server_version"  "1.1.1"
"wms_format"  "image/gif"
  END
END

Same behaviour. I got a blank image. If I add a layer based on a 
shapefile, I see the shapefile but not the wms.

The Os is Windows Server 2003 R2 SP2 Multilingue and IE6

Steve


/Steve Toutant, M. Sc./
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3

Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144_
[EMAIL PROTECTED] _
__http://www.inspq.qc.ca_ 

 





___
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] WMS don't load

2008-10-20 Thread Daniel Morissette

Hi Steve,

I'm starting to run out of ideas... do you still get Curl error code 6 
in all cases? Perhaps double-check and make sure that the directory 
specified in your IMAGEPATH parameter exists and is writable by the web 
user... this directory is used to temporarily store the image received 
from the remote WMS server before it is included in the final output.


Daniel

[EMAIL PROTECTED] wrote:


Sounds like a DNS config problem on your server... can you double-check
your network settings?
There is no proxy, no firewall the DNS seems ok since I can ping and get 
to http://atlas.gc.ca


Did you try opening the URL using I.E. directly on the server that 
produces the error?

YES and the image shows up.

I also tried with this WMS that everyone knows
LAYER
  NAME "prov_bound"
  TYPE RASTER
  STATUS ON
  CONNECTION "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?";
  CONNECTIONTYPE WMS
  METADATA
"wms_srs" "EPSG:42304"
"wms_name""prov_bound"
"wms_server_version"  "1.1.1"
"wms_format"  "image/gif"
  END
END

Same behaviour. I got a blank image. If I add a layer based on a 
shapefile, I see the shapefile but not the wms.

The Os is Windows Server 2003 R2 SP2 Multilingue and IE6

Steve


/Steve Toutant, M. Sc./
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3

Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144_
[EMAIL PROTECTED] _
__http://www.inspq.qc.ca_ 

 





___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



--
Daniel Morissette
http://www.mapgears.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[MAPSERVER-USERS] Single Template getfeatureinfo query

2008-10-20 Thread Tellett

Hello all,

I've been trying to apply the single template idea (using a template driver
in an OUTPUTFORMAT) to a getfeatureinfo request,but with no joy at all.
Looking at it, I guess for it to work it would need some of the source code
to be added to, or altered. In the RFC 36 Steve Lime suggested:

maptemplate.c: Write a new single template processing function similar to
msReturnQuery() in that same source file, something like
msReturnSingleTemplateQuery().

And:

mapserv.c: Add code at the end of the query processing switch statement to
look at the value of web->queryformat. If it references an existing output
format by name then use the file the format points to with
msReturnSingleTemplateQuery(), otherwise process as currently done.

Do you know if these changes have been made? I tried looking at the
ms-rfc.txt files in the beta source files but couldn't find ms-rfc36.txt
referenced.
I'm using the beta MS4W binary but I presume this is compiled from the
latest beta source code. 

If the above changes have been made then I guess it should be possible to
simply add QUERYFORMAT 'kml' (or xml etc, whatever the OUTPUTFORMAT 'name'
is) under the Web obj, use qformat instead of info_format in the url call
and the template referenced under the relevant OUTPUTFORMAT should be used.
This does not seem to be happening at present however. 

One other quick question, do I still need to reference a template (be it
blank or whatever) in my layer obj's to make the layer queryable or is it
now possible to use the QUERYABLE TRUE idea? I'm presuming I still need to
reference a template as I've tried this and simply get a parsing error.

Any help would be much appreciated, I'm going round in circles on this one!

Cheers

Tom
-- 
View this message in context: 
http://www.nabble.com/Single-Template-getfeatureinfo-query-tp20070152p20070152.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] Is using ECW format allowed or not?

2008-10-20 Thread Rahkonen Jukka
Hi,

I know that I can use ECW format with MapServer both as input and
output. What I cannot figure out is if I am allowed to do so. Reading
the document "ECW/JP2 CODEC SDK End-User License Agreement" that I found
from the still existing ER Mapper download page does not help me a bit.
We can create however big ECW images for local use because we have ER
Mapper image compressor license, but how about using ECW with MapServer?

1. Can we use our compressed ECW images as input for MapServer WMS?
2. Can we use ECW as an output format for MapServer WCS?

-Jukka Rahkonen-

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WMS don't load

2008-10-20 Thread Steve . Toutant
Sounds like a DNS config problem on your server... can you double-check 
your network settings?
There is no proxy, no firewall the DNS seems ok since I can ping and get 
to http://atlas.gc.ca

Did you try opening the URL using I.E. directly on the server that 
produces the error?
YES and the image shows up.

I also tried with this WMS that everyone knows 
LAYER
  NAME "prov_bound"
  TYPE RASTER
  STATUS ON
  CONNECTION "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?";
  CONNECTIONTYPE WMS
  METADATA
"wms_srs" "EPSG:42304"
"wms_name""prov_bound"
"wms_server_version"  "1.1.1"
"wms_format"  "image/gif"
  END
END

Same behaviour. I got a blank image. If I add a layer based on a 
shapefile, I see the shapefile but not the wms.
The Os is Windows Server 2003 R2 SP2 Multilingue and IE6

Steve


Steve Toutant, M. Sc.
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3 
Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144
[EMAIL PROTECTED]
http://www.inspq.qc.ca
 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Access control for wms served from mapserver cgi

2008-10-20 Thread Mike Leahy

Hello Rahkonen (and Stephan),

This is an idea that I could make work...I'd have to lock-down mapserv 
itself from all connections (otherwise anyone could just replace 
wms*.exe in the URL with the original mapserv.exe), though I guess I 
should be doing that anyway.


In response to Stephan Holl: I recognize there are other strategies that 
involve proxying the WMS requests.  I was just hoping for something 
quick and easy that could be done with Apache more or less 
out-of-the-box using basic config files and/or modules like mod_rewrite. 
 There have been a few cases where I needed to use mapserver on one 
machine to serve data using WMS to another server running mapserver as a 
WMS client.  I just want to be able to do that with as little work as 
possible (i.e., if I can do it in Apache's config, then I can do it 
anywhere).


Essentially, my ideal solution would be if I can get something like 
mod_rewrite to say "if a request to mapserv contains 
'map=/path/to/somefile.map' in the query string, and the client is not 
equal to some IP address, return 403, otherwise allow the request".  I 
just don't quite know how to get mod_rewrite to work like that for me (I 
found some promising examples online, but couldn't get them working).


Thanks again,
Mike

Rahkonen Jukka wrote:

Hi,

If it is easy to limit access to mapserv executable, then how about making a 
few copies of the executable and tie each copy to its own mapfile in httpd.conf?

SetEnvIf Request_URI "/cgi-bin/wms1.exe?" MS_MAPFILE=d:/ms4w/apps/wms1.map
SetEnvIf Request_URI "/cgi-bin/wms2.exe?" MS_MAPFILE=d:/ms4w/apps/wms2.map

Just thinking, I do not know if this is secure at all.  


-Jukka Rahkonen-
 


-Alkuperäinen viesti-
Lähettäjä: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] Puolesta Mike Leahy

Lähetetty: 20. lokakuuta 2008 3:58
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Access control for wms served from 
mapserver cgi


Hello list,

Does anyone on this list know of a simple strategy for 
configuring Apache to restrict access to specific mapfiles 
served as WMS through the cgi mapserv program?  I'd like to 
do is restrict access to specific IPs for URLs like the following: 
http://host/cgi-bin/mapserv?map=/path/to/file.map[&;...].


It's easy enough to limit access to the mapserv executable 
itself, but I'd rather do it on a per-mapfile basis.  I tried 
a couple things using mod_rewrite in apache, but anything 
I've tried so far doesn't seem to work.


I know that this sort of question has been asked before, but 
after searching/tinkering for a while, I haven't found a 
solution that works for me yet.


Thanks for any suggestions,
Mike
___
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] mssql2008 binary test package available to download

2008-10-20 Thread BrainDrain

Thank you very much, Tamas.
getFeature works fine now.

But can I ask you for one more favour. Could you compile with fastcgi
support (ideally with all ms4w production release flags) or share 'your
working buildkit' (this just will be great!, not only for me) because I
still have problems with compiling ms4w(( but I need sql2008 support feature
as soon as it possible for my work. I would be very appreciate.

Tamas Szekeres wrote:
> 
> Folks,
> 
> Yes, I've run into the same issue when using the getFeature method
> with the driver. Here is the corresponding ticket I've created:
> http://trac.osgeo.org/mapserver/ticket/2795
> 
> Attached the C# test case with this ticket:
> http://trac.osgeo.org/mapserver/attachment/ticket/2795/Program.cs
> 
> 
> I've fixed this issue in the SVN-trunk and the stable branch, here is
> my daily snapsot of the binaries you can test with:
> http://vbkto.dyndns.org:1280/tests/release-1400-20081018.zip
> 
> If you encounter further problems with the driver don't hesitate to
> file a ticket describing the issue.
> 
> Just for a note: This driver doesn't make any character encodings with
> the values retieved as plain byte arrays from MSSQL, however your
> default database setting corresponds to the
> 1251 codepage, so explicit character conversion may be required in C#,
> like:
> 
> byte[] bytes = Encoding.Convert(Encoding.Unicode, Encoding.Default,
> Encoding.Unicode.GetBytes(shape.getValue(k)));
> string str = Encoding.GetEncoding(1251).GetString(bytes);
> 
> 
> Best regards,
> 
> Tamas
> 
> 
> 
> 2008/10/17 BrainDrain <[EMAIL PROTECTED]>:
>>
>> hmm
could you provide an example to this
>> how can I help If I use mapscript?
>>[WebService(Namespace = "http://www.wem.volgadmin.ru/wemlib";)]
>>[WebServiceBinding(ConformsTo = WsiProfiles.None)]
>>[ScriptService]
>>public class MapParser : System.Web.Services.WebService
>>{
>>[WebMethod(EnableSession = true)]
>>[ScriptMethod(UseHttpGet = true)]
>>public object RequestFeatureAttributes(object mapIndex, object
>> layerIndex, int[] featureIndexes, string[] fieldNames, bool envelope)
>>{
>>mapObj map;
>>layerObj layer = null;
>>shapeObj shape;
>>int entryIndex = -1, i, j, len = featureIndexes.Length;
>>object[] res = new object[len];
>>Dictionary valueBag, record;
>>
>>if (Util.isNumeric(mapIndex.ToString(), NumberStyles.Integer))
>>{
>>mapIndex = (object)Convert.ToInt32(mapIndex);
>>}
>>if (Util.isNumeric(layerIndex.ToString(),
>> NumberStyles.Integer))
>>{
>>layerIndex = (object)Convert.ToInt32(layerIndex);
>>}
>>KeyValuePair entry =
>> Util.getEntry((Dictionary)Session["maps"],
>> (mapIndex.GetType() == typeof(int)) ? mapIndex :
>> Util.normalizePath((string)mapIndex), out entryIndex);
>>map = (mapObj)entry.Value;//.clone()
>>if (layerIndex.GetType() == typeof(int))
>>{
>>layer = map.getLayer((int)layerIndex);
>>}
>>else
>>{
>>if (layerIndex.GetType() == typeof(string))
>>{
>>layer = map.getLayerByName((string)layerIndex);
>>}
>>}
>>
>>layer.open();
>>object def;
>>List fieldIndexes = new List();
>>List list = new List();
>>if (fieldNames != null)
>>{
>>for (i = 0; i < layer.numitems; i++)
>>{
>>if
>> (((ICollection)fieldNames).Contains(layer.getItem(i)))
>>{
>>fieldIndexes.Add(i);
>>}
>>}
>>}
>>
>>for (i = 0; i < len; i++)
>>{
>>try
>>{
>>using (shape = layer.getFeature(featureIndexes[i],
>> -1))
>> //here exception occurs
>>{
>>
>>string[] values;
>>
>>if (fieldNames != null)
>>{
>>if (fieldNames.Length > 0)
>>{
>>list.Clear();
>>for (j = 0; j < fieldIndexes.Count; j++)
>>{
>>   
>> list.Add(shape.values[fieldIndexes[j]]);
>>}
>>values = list.ToArray();
>>}
>>else
>>{
>>values = new string[1] {
>> featureIndexes[i].ToString() };
>>}
>>}
>>else
>>{
>>values = shape.values

Re: [mapserver-users] Access control for wms served from mapserver cgi

2008-10-20 Thread Rahkonen Jukka
Hi,

If it is easy to limit access to mapserv executable, then how about making a 
few copies of the executable and tie each copy to its own mapfile in httpd.conf?

SetEnvIf Request_URI "/cgi-bin/wms1.exe?" MS_MAPFILE=d:/ms4w/apps/wms1.map
SetEnvIf Request_URI "/cgi-bin/wms2.exe?" MS_MAPFILE=d:/ms4w/apps/wms2.map

Just thinking, I do not know if this is secure at all.  

-Jukka Rahkonen-
 

> -Alkuperäinen viesti-
> Lähettäjä: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Puolesta Mike Leahy
> Lähetetty: 20. lokakuuta 2008 3:58
> Vastaanottaja: mapserver-users@lists.osgeo.org
> Aihe: [mapserver-users] Access control for wms served from 
> mapserver cgi
> 
> Hello list,
> 
> Does anyone on this list know of a simple strategy for 
> configuring Apache to restrict access to specific mapfiles 
> served as WMS through the cgi mapserv program?  I'd like to 
> do is restrict access to specific IPs for URLs like the following: 
> http://host/cgi-bin/mapserv?map=/path/to/file.map[&;...].
> 
> It's easy enough to limit access to the mapserv executable 
> itself, but I'd rather do it on a per-mapfile basis.  I tried 
> a couple things using mod_rewrite in apache, but anything 
> I've tried so far doesn't seem to work.
> 
> I know that this sort of question has been asked before, but 
> after searching/tinkering for a while, I haven't found a 
> solution that works for me yet.
> 
> Thanks for any suggestions,
> Mike
> ___
> 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] Access control for wms served from mapserver cgi

2008-10-20 Thread Stephan Holl
Hello Mike,

Mike Leahy <[EMAIL PROTECTED]>, [20081020 - 13:58:06]

> Hello list,
> 
> Does anyone on this list know of a simple strategy for configuring 
> Apache to restrict access to specific mapfiles served as WMS through
> the cgi mapserv program?  I'd like to do is restrict access to
> specific IPs for URLs like the following: 
> http://host/cgi-bin/mapserv?map=/path/to/file.map[&;...].
> 
> It's easy enough to limit access to the mapserv executable itself,
> but I'd rather do it on a per-mapfile basis.  I tried a couple things
> using mod_rewrite in apache, but anything I've tried so far doesn't
> seem to work.
> 
> I know that this sort of question has been asked before, but after 
> searching/tinkering for a while, I haven't found a solution that
> works for me yet.

I am not sure if this is what you need, but we use a simple security
proxy inbetween[1] which filters the mapfile based on a given username
who is doing WMS/WFS requests. Desktop-GIS can be used with
InteProxy[2], if they do not have the ability to aquire user/pwd by
itself.

But perhaps this is too much for you?!

Best

Stephan

[1]
http://wald.intevation.org/plugins/scmsvn/viewcvs.php/docs/documentation/igeosecurity/deegree_owsproxy_documentation_en.pdf?rev=14255&root=deegree&view=log
[2] http://inteproxy.wald.intevation.org

-- 
Stephan Holl <[EMAIL PROTECTED]>  | Tel.: +49 (0)541-33 50 8 32
Intevation GmbH, Neuer Graben 17, 49074 OS  |  AG Osnabrück - HR B 18998
Geschäftsführer:  Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner


signature.asc
Description: PGP signature
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users