Re: [mapserver-users] New to mapserver; question about USGS DRG/GeoTIFF files

2010-02-01 Thread Jon Miner


 Thanks Jukka,

That did it.  I guess I need to better understand the relationship between 
EXTENT and UNITS.  I thought that my original bounds, in degrees, would have 
worked?

EXTENT -72 42 -71 44
UNITS DD

- Jon





- Original Message 
From: Rahkonen Jukka jukka.rahko...@mmmtike.fi
To: Jon Miner cp_...@yahoo.com; mapserver-users@lists.osgeo.org
Sent: Mon, February 1, 2010 12:28:09 AM
Subject: Re: [mapserver-users] New to mapserver;question about USGS  
DRG/GeoTIFF files

Hi,

One possibility is that your image is not inside the spatial window of your 
request.  Extents or the image in epsg:26719 system seem to be
Lower Left  (  295125.999, 4761593.049) ( 71d30'45.52W, 42d58'52.88N)
Upper Right (  308264.099, 4778305.843) ( 71d21'26.67W, 43d 8'6.54N)

Extents of the MAP are in epsg:4326 system EXTENT -72 42 -71 44. If the image 
is not inside this box you won't see it which is natural.

Make a test by changing the MAP estents and projection temporary to suit the 
image
EXTENT 295125.999  4761593.049 308264.099, 4778305.843
  PROJECTION
  init=epsg:26719
  END

If you get the image now with shp2img you know that everything is OK with the 
geotiff.

-Jukka Rahkonen-

Jon Miner wrote:

Hi Roger -

Thanks for the advice, but no change.  I did stumble across the advice to try 
to run shp2img and even with debug set to 5, get very little debugging 
information.

# shp2img -m test.map -all_debug 5 -o test.png
GDAL: 
GDALOpen(/opt/fgs/apps/gmap-demo-cvs_MS_VERSION_54/htdocs/./../data/o43071a4.tif,
 this=0x9bd61b0) succeeds as GTiff.
GDAL: GDALDeregister_GTiff() called.

The resulting test.png ends up being all white.

The actual TIFF file (10MB) can be found here:

http://trainguy.dyn.dhs.org/~jminer/o43071a4.tif

Thanks





From: Roger André ran...@gmail.com
To: Jon Miner cp_...@yahoo.com
Cc: mapserver-users@lists.osgeo.org
Sent: Fri, January 29, 2010 4:16:08 PM
Subject: Re: [mapserver-users] New to mapserver; question about USGS  
DRG/GeoTIFF files

Hi Jon,

You don't appear to have any projection info in your map file.  Since you have 
UNITS dd in it, I assume you want to display the map in lat/lon WGS84?  If 
so, your MAP file needs an entry that looks like this:

  PROJECTION
init=epsg:4326
  END

and your usgs LAYER (the name should be quoted btw) should have the UTM 
projection defined in it, like this:

LAYER
  NAME usgs
  PROJECTION  init=epsg:26719 END

Best of luck,

Roger
--





On Fri, Jan 29, 2010 at 4:38 AM, Jon Miner cp_...@yahoo.com wrote:




Hi -

I'm new to Mapserver, and so far impressed by it's capabilities.  I've 
installed the FGS package via 
fgs-mapserver_basic_5.6.0-fgs_9.5-linux-i386.bin and played with their demo 
program.

I'm having a problem with a USGS DRG file that is encoded as a GeoTIFF file.  
It doesn't display on the webpage, and I'm not sure where to start debugging 
this.  I've checked the file with gdalinfo:

Driver: GTiff/GeoTIFF
Files: o43071a4.tif
Size is 5388, 6854
Coordinate System is:
PROJCS[NAD27 / UTM zone 19N,
GEOGCS[NAD27,
DATUM[North_American_Datum_1927,
SPHEROID[Clarke 1866,6378206.4,294.9786982138982,
AUTHORITY[EPSG,7008]],
AUTHORITY[EPSG,6267]],
PRIMEM[Greenwich,0],
UNIT[degree,0.0174532925199433],
AUTHORITY[EPSG,4267]],
PROJECTION[Transverse_Mercator],
PARAMETER[latitude_of_origin,0],
PARAMETER[central_meridian,-69],
PARAMETER[scale_factor,0.9996],
PARAMETER[false_easting,50],
PARAMETER[false_northing,0],
UNIT[metre,1,
AUTHORITY[EPSG,9001]],
AUTHORITY[EPSG,26719]]
Origin = (295125.99949388772,4778305.84265616444)
Pixel Size = (2.4384000,-2.4384000)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_IMAGEDESCRIPTION=USGS GeoTIFF DRG 1:24000 Quad of Manchester North. 
 Product:522644
  TIFFTAG_SOFTWARE=USGS CD Archiver program tif2usgsdrg v.1.0
  TIFFTAG_DATETIME=1997:01:10 07:16:28
  TIFFTAG_XRESOLUTION=72
  TIFFTAG_YRESOLUTION=72
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
  COMPRESSION=PACKBITS
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  295125.999, 4778305.843) ( 71d31'7.66W, 43d 7'54.16N)
Lower Left  (  295125.999, 4761593.049) ( 71d30'45.52W, 42d58'52.88N)
Upper Right (  308264.099, 4778305.843) ( 71d21'26.67W, 43d 8'6.54N)
Lower Right (  308264.099, 4761593.049) ( 71d21'5.95W, 42d59'5.20N)
Center  (  301695.049, 4769949.446) ( 71d26'6.44W, 43d 3'29.80N)
Band 1 Block=5388x1 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 256 entries)
0: 0,0,0,255
1: 255,255,255,255
2: 0,151,164,255
3: 203,0,23,255
4: 131,66,37,255
5: 201,234,157,255
6: 137,51,128,255
7: 255,234,0,255
8: 167,226,226,255
9: 255,184,184,255
   10: 218,179,214,255
   11: 209,209,209,255
   12: 207,164,142,255
(etc...)

And my map file looks like this:

MAP
NAME DEMO
STATUS ON
SIZE 400 300
SYMBOLSET ../etc/symbols.sym
EXTENT 

Re: [mapserver-users] New to mapserver; question about USGS DRG/GeoTIFF files

2010-02-01 Thread Rahkonen Jukka
Hi,

EPSG:4326 bounds do work all the time but in order to see your image the 
epsg:4326 extents must be the same than the epsg:26719 extents of the image 
projected to epsg:4326.  

This may go wrong, I have not used cs2cs program much, but let's hope I did 
this correctly
So I tried to take the 26716 coordinates and reproject them to 4321 

d:\FWTools2.4.6cs2cs +init=epsg:26716 +to +init=epsg:4326   #reproject from 
26716 - to 4326
295125.999  4761593.049  #input coordinates 
 
89d30'45.961W  42d58'52.872N 0.000 #cs2cs output
308264.099 4778305.843   #input coordinates 
 
89d21'27.097W  43d8'6.525N 0.000   #cs2cs output

If this want OK it means that your image should be inside an epsg:4326 box 
defined by EXTENT -90 42 -89 44  
If it went wrong some more experienced cs2cs user will certainly help you 
further.

-Jukka-


 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Jon Miner
 Lähetetty: 1. helmikuuta 2010 14:46
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: Re: [mapserver-users] New to mapserver;question about 
 USGS DRG/GeoTIFF files
 
 
 
  Thanks Jukka,
 
 That did it.  I guess I need to better understand the 
 relationship between EXTENT and UNITS.  I thought that my 
 original bounds, in degrees, would have worked?
 
 EXTENT -72 42 -71 44
 UNITS DD
 
 - Jon
 
 
 
 
 
 - Original Message 
 From: Rahkonen Jukka jukka.rahko...@mmmtike.fi
 To: Jon Miner cp_...@yahoo.com; mapserver-users@lists.osgeo.org
 Sent: Mon, February 1, 2010 12:28:09 AM
 Subject: Re: [mapserver-users] New to mapserver;question 
 about USGS  DRG/GeoTIFF files
 
 Hi,
 
 One possibility is that your image is not inside the spatial 
 window of your request.  Extents or the image in epsg:26719 
 system seem to be
 Lower Left  (  295125.999, 4761593.049) ( 71d30'45.52W, 
 42d58'52.88N)
 Upper Right (  308264.099, 4778305.843) ( 71d21'26.67W, 43d 8'6.54N)
 
 Extents of the MAP are in epsg:4326 system EXTENT -72 42 -71 
 44. If the image is not inside this box you won't see it 
 which is natural.
 
 Make a test by changing the MAP estents and projection 
 temporary to suit the image
 EXTENT 295125.999  4761593.049 308264.099 4778305.843
   PROJECTION
   init=epsg:26719
   END
 
 If you get the image now with shp2img you know that 
 everything is OK with the geotiff.
 
 -Jukka Rahkonen-
 
 Jon Miner wrote:
 
 Hi Roger -
 
 Thanks for the advice, but no change.  I did stumble across 
 the advice to try to run shp2img and even with debug set to 
 5, get very little debugging information.
 
 # shp2img -m test.map -all_debug 5 -o test.png
 GDAL: 
 GDALOpen(/opt/fgs/apps/gmap-demo-cvs_MS_VERSION_54/htdocs/./..
 /data/o43071a4.tif, this=0x9bd61b0) succeeds as GTiff.
 GDAL: GDALDeregister_GTiff() called.
 
 The resulting test.png ends up being all white.
 
 The actual TIFF file (10MB) can be found here:
 
 http://trainguy.dyn.dhs.org/~jminer/o43071a4.tif
 
 Thanks
 
 
 
 
 
 From: Roger André ran...@gmail.com
 To: Jon Miner cp_...@yahoo.com
 Cc: mapserver-users@lists.osgeo.org
 Sent: Fri, January 29, 2010 4:16:08 PM
 Subject: Re: [mapserver-users] New to mapserver; question 
 about USGS  DRG/GeoTIFF files
 
 Hi Jon,
 
 You don't appear to have any projection info in your map 
 file.  Since you have UNITS dd in it, I assume you want to 
 display the map in lat/lon WGS84?  If so, your MAP file needs 
 an entry that looks like this:
 
   PROJECTION
 init=epsg:4326
   END
 
 and your usgs LAYER (the name should be quoted btw) should 
 have the UTM projection defined in it, like this:
 
 LAYER
   NAME usgs
   PROJECTION  init=epsg:26719 END
 
 Best of luck,
 
 Roger
 --
 
 
 
 
 
 On Fri, Jan 29, 2010 at 4:38 AM, Jon Miner cp_...@yahoo.com wrote:
 
 
 
 
 Hi -
 
 I'm new to Mapserver, and so far impressed by it's 
 capabilities.  I've installed the FGS package via 
 fgs-mapserver_basic_5.6.0-fgs_9.5-linux-i386.bin and played 
 with their demo program.
 
 I'm having a problem with a USGS DRG file that is encoded 
 as a GeoTIFF file.  It doesn't display on the webpage, and 
 I'm not sure where to start debugging this.  I've checked the 
 file with gdalinfo:
 
 Driver: GTiff/GeoTIFF
 Files: o43071a4.tif
 Size is 5388, 6854
 Coordinate System is:
 PROJCS[NAD27 / UTM zone 19N,
 GEOGCS[NAD27,
 DATUM[North_American_Datum_1927,
 SPHEROID[Clarke 1866,6378206.4,294.9786982138982,
 AUTHORITY[EPSG,7008]],
 AUTHORITY[EPSG,6267]],
 PRIMEM[Greenwich,0],
 UNIT[degree,0.0174532925199433],
 AUTHORITY[EPSG,4267]],
 PROJECTION[Transverse_Mercator],
 PARAMETER[latitude_of_origin,0],
 PARAMETER[central_meridian,-69],
 PARAMETER[scale_factor,0.9996],
 PARAMETER[false_easting,50],
 

[mapserver-users] How to define a transparent background for a raster layer?

2010-02-01 Thread David Martinez Morata
I have a WMS service with a re¡aster layer, and I try to filter the white
value of the background, but I don't know how...I search in the Mapserver
Documentation but I don't found it.

Some suggestions please?

Thanks

-- 
Martinez Morata David
Thinking GIS
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] How to define a transparent background for a raster layer?

2010-02-01 Thread thomas bonfort
the keyword you're looking for is OFFSITE

--
thomas

On Mon, Feb 1, 2010 at 15:32, David Martinez Morata dama...@gmail.com wrote:
 I have a WMS service with a re¡aster layer, and I try to filter the white
 value of the background, but I don't know how...I search in the Mapserver
 Documentation but I don't found it.

 Some suggestions please?

 Thanks

 --
 Martinez Morata David
 Thinking GIS

 ___
 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] display isolines with raster data

2010-02-01 Thread windfreak

I am wondering if it's possible to present isolines from raster data. I have
NETCDF/GRIB/HDF5 data and want to plot lines. Until now I haven't found any
examples like that.

If it's not possible, I think the best workaround is to create an
application that generates shapefiles from raster data. Then I can use these
shapefiles to plot lines with mapserver. Do you have suggestions for better
workarounds?

-
http://www.topspots.org
-- 
View this message in context: 
http://n2.nabble.com/display-isolines-with-raster-data-tp4495049p4495049.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] display isolines with raster data

2010-02-01 Thread Frank Warmerdam

windfreak wrote:

I am wondering if it's possible to present isolines from raster data. I have
NETCDF/GRIB/HDF5 data and want to plot lines. Until now I haven't found any
examples like that.

If it's not possible, I think the best workaround is to create an
application that generates shapefiles from raster data. Then I can use these
shapefiles to plot lines with mapserver. Do you have suggestions for better
workarounds?


Windfreak,

MapServer does not support computing isolines on the fly, though you might
get a vaguely similar effect by defining a class for each iso level with
different colors.

You can use the GDAL/OGR gdal_contour utility to produce iso-contours from
a raster file. Be aware that it produces very fine isolines with one segment
for each pixel crossed so some simplification might be appropriate before
using the results for map rendering.

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


[mapserver-users] FW: [OSGeo-Discuss] FOSS4G 2010 Call for Abstract

2010-02-01 Thread Lime, Steve D (DNR)
Apologies for the cross post...

Steve

-Original Message-
From: discuss-boun...@lists.osgeo.org [mailto:discuss-boun...@lists.osgeo.org] 
On Behalf Of Tyler Mitchell (OSGeo)
Sent: Monday, February 01, 2010 12:21 PM
To: OSGeo Discussions
Subject: [OSGeo-Discuss] FOSS4G 2010 Call for Abstract

We are pleased to announce the Call for Abstract for the FOSS4G (Free
and Open Source Software for Geospatial) 2010 conference, being held
September 6-9, in beautiful Barcelona, Spain.

Held annually, FOSS4G is the premier conference for the open source
geospatial community, providing a full-immersion experience in
established and leading edge geospatial technologies for developers,
users, and people new to open source geospatial.

http://2010.foss4g.org

FOSS4G 2010 presentations are 25 minute talks, with 5 minute question
and answer sessions at the end. Presentations cover the use or
development of open source geospatial software. Anyone can can submit a
presentation proposal and take part in the conference as a presenter.

Some topics of interest for this year are:

* Case Studies: Relate the experiences of you and your organization
  using open source geospatial. Where do things work well? Poorly?
  What problems did you solve, and at what cost? What do you
  recommend for others? Why?
* Benchmarks: Comparisons between pieces of geospatial software. How
  do features compare? Speed? Ease of use? What do you recommend for
  others?
* Visualization: Tell about your tips and tricks for effective
  visualization. How do you present information in a compelling way?
  3D? Cartographic tricks? Labelling and naming ideas? Graphs and
  hybrid map/data combinations?
* Development: What are the new developments in your open source
  geospatial software product? How does it work, how do people use
  it, what are the technical issues you are running into?
* Hacks and Mashing: Have you put together something novel or cool
  this year? What did you stick together, how did it work, show us
  your gizmo!
* Collaboration: What techniques are you using to improve
  collaboration between organizations and between individuals.
  Public geodata, collaborative data collection, data sharing, open
  standards, de facto standards, and more!

If you have an open source geospatial story to tell, we want to hear it!

For more information, see the FOSS4G site:

http://2010.foss4g.org/presentations.php

The deadline for abstract submissions is April 1, 2010. Submit early,
submit often!


Academic Track

The FOSS4G 2010 academic track aims to bringing together researchers,
developers, users and practitioners carrying out research and
development in the geospatial and the free and open source fields and
willing to share original and recent research developments and experiences.

The academic track will act as an inventory of current research topics,
but the major goal is to promote cooperative research between OSGeo
developers and the academia. The academic track is the right forum to
highlight the most important research challenges and trends in the
domain, and let them became the basis for an informal OSGeo research
agenda. It will foster interdisciplinary discussions in all aspects of
the geospatial and free and open source domains. It will be organized in
a way to promote networking between the participants, to initiate and
favour discussions regarding cutting-edge technologies in the field, to
exchange research ideas and to promote international collaboration.


  Submission guidelines

All submissions to the academic track must be original unpublished work
written in English. Papers should not exceed the 6000 words limit.
Formatting guidelines will be available soon. Submitted papers will be
thoroughly reviewed by three members of the international scientific
committee and refereed for their quality, originality and relevance.


  Submission deadline (full paper for the academic track) - May,
  31th, 2010


upcoming milestones

* 15 Jan 2010, Call for Workshops/Tutorials opens
* 30 Jan 2010, Call for Workshops/Tutorials closes
* 1 Feb 2010, Call for Abstracts opens
* 16 Feb 2010, Notification of acceptance for workshops/tutorials
* 22 Feb 2010, Registration for workshop and tutorials opens
* 1 Apr 2010, Abstract submission deadline
* 1 May 2010, Presenters notified of acceptance for talks
* 15 Jun 2010, Author/Early registration deadline
* 15 Jul 2010 Full article submission deadline
* Aug 2010, Completed program available
* 6-7 Sep 2010, FOSS4G Workshops
* 7-9 Sep 2010, FOSS4G Presentations and Tutorials
* 10 Sep 2010, FOSS4G Code Sprint

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

[mapserver-users] transparent on black for tindex layers?

2010-02-01 Thread Chris Nicholas
greetings - I was wondering if 'there are ways' to have the same
'transparent on black' performed on raster tindex layers, as is done so
well by the gdal_merge.py routine. 

gotta few thousand
reprojected images in Haiti suffering the black-triangle blues when I
make them a single layer; see 1:5000 and below on the varioous layers
at:

http://wms.cis.rit.edu/cgi-bin/mapserv.csh?map=/local2/home/cnicholas/mapfiles/haiti.mapRequest=GetCapabilities

thanks!

Chris

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


[mapserver-users] php mapscript loadQuery problem

2010-02-01 Thread Moen, Paul T.
I have not been able to get loadQuery to work.  The saveQuery command creates 
the file and returns MS_SUCCESS.  When I try to load the file using loadQuery, 
it always returns MS_FAILURE.  I get no other errors.   The permissions are 
good.  Is there a way to enable more verbose error logging to find out what is 
going on?  Is there any documentation on what should be in the saved file?

The following is the text from one of the saved query files.

MapServer Query - Generated by msSaveQuery()
1 2 83 -1
-1 -1 0 0
2183769.22727273 944435.909090909 2331977.40909091 1066349.09090909
-1 -1 1
NULL
NULL
-1
0

This is my version.

MapServer version 5.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO 
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER 
SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Thanks,

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


RE: [mapserver-users] php mapscript loadQuery problem

2010-02-01 Thread Lime, Steve D (DNR)
I'll send you more details when I get time tonite (I hope) and can test things. 
I've been using 5.6 save/load query functions a ton via the CGI but not PHP. I 
tested a bunch with Perl MapScript and will have to check those methods against 
what PHP is doing. Here's what the lines mean:

Line - Contents
0 - magic string
1 - mode, type (single or multiple), qlayer, slayer
2 - point x, point y, buffer, max results (queryByPoint)
3 - query rect (minx, miny, maxx, maxy) (queryByRect)
4 - shp index, tile index, clear cache flag (queryByIndex)
5 - qitem or NULL (queryByAttribute)
6 - qstring or NULL
7 - operator (used by WFS)
8+ - query shape (queryByShape)

Basically each line or so after the first couple match a MapServer query method 
and it's parameters. The file contents look fine to me. The query file parser 
will throw a detailed error message if it has a parsing problem.

Steve

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Moen, Paul T.
Sent: Monday, February 01, 2010 2:42 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] php mapscript loadQuery problem

I have not been able to get loadQuery to work.  The saveQuery command creates 
the file and returns MS_SUCCESS.  When I try to load the file using loadQuery, 
it always returns MS_FAILURE.  I get no other errors.   The permissions are 
good.  Is there a way to enable more verbose error logging to find out what is 
going on?  Is there any documentation on what should be in the saved file?

The following is the text from one of the saved query files.

MapServer Query - Generated by msSaveQuery()
1 2 83 -1
-1 -1 0 0
2183769.22727273 944435.909090909 2331977.40909091 1066349.09090909
-1 -1 1
NULL
NULL
-1
0

This is my version.

MapServer version 5.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO 
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER 
SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE


Thanks,


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