Re: [mapserver-users] qGIS mapfile error!

2010-02-02 Thread James Card
On Tue, 02 Feb 2010 17:19:11 -0800, Vasile Cristian Stan  
 wrote:


I've created a mapfile using qGiS and when i run mapfile on the  
mapserver it gives me this error:


loadSymbolSet(): Unable to access file. (./symbols/symbols.txt)


Either make sure that you've got a valid symbols file at that path, or  
comment out that line of your map-file if you don't need it for labels in  
your map.


The map-file wizard does not produce a complete, ready-to-run map-file. It  
does most of the tedious layer-related stuff, but you must still edit the  
map-file to ensure that projections and paths and other details are valid.  
At least that has been my experience.


--
James Card
California CAD Solutions, Inc.
209-578-5580 - Voice
209-521-6493 - FAX
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] areas of high res

2010-02-02 Thread Rahkonen Jukka
Hi,

That's why I am doing the tileindex editing exercise every time when we get 
updates for our imagery. I remove the totally covered old images from the 
tileindex but leave the overlapping ones.  This way the double drawing is 
minimised. Have a try with shapefile editing, after doing it a few times it 
goes as fast as it takes to write how to do it.

-Jukka-


-Alkuperäinen viesti-
Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Christopher Schmidt
Lähetetty: ke 3.2.2010 3:35
Vastaanottaja: Wendell Turner
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] areas of high res
 
On Tue, Feb 02, 2010 at 11:34:05PM +, Wendell Turner wrote:
> On Tue, Feb 02, 2010 at 06:23:01PM -0500, Christopher Schmidt wrote:
> > On Tue, Feb 02, 2010 at 03:10:40PM -0800, TC Haddad wrote:
> > > use two different tile indexes and use  MIN- and MAXSCALEDENOM to control
> > > when they are each used.
> 
> Is that done by listing the higher res layer items after the
> lower res itesm in the arguments to gdaltindex?  That appears
> to work, but is it loading tiles twice where the high res
> areas are?

Sure, or making two different layers in the mapfile. And yes,
it is. If you're in an 'edge' though, you'll want to have both
on, right? So when someone gets to the viewable edge they
don't end up with white/empty space? If so, there's not 
any other practical option.

Regards,
-- 
Christopher Schmidt
MetaCarta
___
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] msplugin_mssql2008 and getFeature()

2010-02-02 Thread Gabe Codina
Hi All

I have a web mapping app based on ms 5.2.1 and php mapScript.  Our business
layers are stored in MSSQL2008 and were transferred from postgis some time
ago.

I have a requirement to highlight selected features on the map - the way
this used to work was I would add a highlight layer to the map and  addthe
selected features to it by using getShape and addFeature.

Using the mssql plugin my calls to getShape (and getFeature) always return
FALSE.  I know the features are there but they cannot be retrieved.

Info:

Sample data statement

DATA "gExtent FROM (SELECT [iId],geometry::STGeomFromWKB([binExtentWKB],
4326) AS gExtent
  ,[cIdentifiers],[cLabel],[iSessionId] FROM
[Scratch].[tManagementUnitsGeometry] WHERE [iSessionId] = 310) AS FOO USING
UNIQUE [iId] USING SRID=4326"

Some Mapscript

   if ($resTileShpIdx){
$resShape = $qLayer->getShape($resTileShpIdx,
$resShpIdx);
} else {
$resShape = $qLayer->getFeature($resShpIdx);
}

...


$newResLayer->addFeature($resShape);


Any help will be greatly appreciated.

Gabe Codina


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


Re: [mapserver-users] areas of high res

2010-02-02 Thread Christopher Schmidt
On Tue, Feb 02, 2010 at 11:34:05PM +, Wendell Turner wrote:
> On Tue, Feb 02, 2010 at 06:23:01PM -0500, Christopher Schmidt wrote:
> > On Tue, Feb 02, 2010 at 03:10:40PM -0800, TC Haddad wrote:
> > > use two different tile indexes and use  MIN- and MAXSCALEDENOM to control
> > > when they are each used.
> 
> Is that done by listing the higher res layer items after the
> lower res itesm in the arguments to gdaltindex?  That appears
> to work, but is it loading tiles twice where the high res
> areas are?

Sure, or making two different layers in the mapfile. And yes,
it is. If you're in an 'edge' though, you'll want to have both
on, right? So when someone gets to the viewable edge they
don't end up with white/empty space? If so, there's not 
any other practical option.

Regards,
-- 
Christopher Schmidt
MetaCarta
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] qGIS mapfile error!

2010-02-02 Thread Vasile Cristian Stan

I've created a mapfile using qGiS and when i run mapfile on the mapserver it
gives me this error:

loadSymbolSet(): Unable to access file. (./symbols/symbols.txt) 

any ideas?
Thanks!


-- 
View this message in context: 
http://n2.nabble.com/qGIS-mapfile-error-tp4504943p4504943.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] areas of high res

2010-02-02 Thread TC Haddad
On Tue, Feb 2, 2010 at 3:34 PM, Wendell Turner  wrote:


> Is that done by listing the higher res layer items after the
> lower res itesm in the arguments to gdaltindex?


Yes - draw order is from top to bottom in a map file.


> That appears
> to work, but is it loading tiles twice where the high res
> areas are?
>

If you do not use a compound index, then yes (that's what Chris means by
"paint over")

Either way you should still use MAXSCALEDENOM to stop the 250k images from
being drawn at way zoomed out levels.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] areas of high res

2010-02-02 Thread Wendell Turner
On Tue, Feb 02, 2010 at 06:23:01PM -0500, Christopher Schmidt wrote:
> On Tue, Feb 02, 2010 at 03:10:40PM -0800, TC Haddad wrote:
> > use two different tile indexes and use  MIN- and MAXSCALEDENOM to control
> > when they are each used.

Is that done by listing the higher res layer items after the
lower res itesm in the arguments to gdaltindex?  That appears
to work, but is it loading tiles twice where the high res
areas are?

P.s., thanks for all the responses.

> Or just don't use min/max at all, and just paint over the lower res 
> layers with the higher res layers.
> 
> -- Chris 
> 
> > presumably you already have one tileindex working for the nationwide 500,000
> > scale images?
> > 
> > so make a second one that is a compound index - looks like the above, but
> > also includes the footprints of the 250,000 areas (replacing the 500,000
> > references in those areas). Switch between the two something like this:
> > 
> > LAYER
> >   NAME "Overview Imagery"
> >   STATUS OFF
> >   TYPE RASTER
> >   TILEINDEX "img_index_500k"
> >   TILEITEM "PATH"
> >   MINSCALEDENOM 31
> > END
> > 
> > LAYER
> >   NAME "Detailed Imagery"
> >   STATUS OFF
> >   TYPE RASTER
> >   TILEINDEX "img_index_250k"
> >   TILEITEM "PATH"
> >   MAXSCALEDENOM 30
> > END
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Tue, Feb 2, 2010 at 1:34 PM, Wendell Turner  wrote:
> > 
> > The base layer of my map has full coverage of the US at a
> > > scale of 1:500,000.  That works fine.  I have some areas of
> > > detail that have tif files at a scale of 1:250,000.  What do
> > > I put in the mapfile to say 'use high res if available for
> > > this tile, otherwise use the low res one'?
> > >
> > > Thanks,
> > >
> > > Wendell
> > >
> > > ___
> > > 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
> 
> 
> -- 
> Christopher Schmidt
> MetaCarta
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] areas of high res

2010-02-02 Thread Christopher Schmidt
On Tue, Feb 02, 2010 at 03:10:40PM -0800, TC Haddad wrote:
> use two different tile indexes and use  MIN- and MAXSCALEDENOM to control
> when they are each used.

Or just don't use min/max at all, and just paint over the lower res 
layers with the higher res layers.

-- Chris 

> presumably you already have one tileindex working for the nationwide 500,000
> scale images?
> 
> so make a second one that is a compound index - looks like the above, but
> also includes the footprints of the 250,000 areas (replacing the 500,000
> references in those areas). Switch between the two something like this:
> 
> LAYER
>   NAME "Overview Imagery"
>   STATUS OFF
>   TYPE RASTER
>   TILEINDEX "img_index_500k"
>   TILEITEM "PATH"
>   MINSCALEDENOM 31
> END
> 
> LAYER
>   NAME "Detailed Imagery"
>   STATUS OFF
>   TYPE RASTER
>   TILEINDEX "img_index_250k"
>   TILEITEM "PATH"
>   MAXSCALEDENOM 30
> END
> 
> 
> 
> 
> 
> 
> 
> 
> On Tue, Feb 2, 2010 at 1:34 PM, Wendell Turner  wrote:
> 
> The base layer of my map has full coverage of the US at a
> > scale of 1:500,000.  That works fine.  I have some areas of
> > detail that have tif files at a scale of 1:250,000.  What do
> > I put in the mapfile to say 'use high res if available for
> > this tile, otherwise use the low res one'?
> >
> > Thanks,
> >
> > Wendell
> >
> > ___
> > 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


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


Re: [mapserver-users] areas of high res

2010-02-02 Thread TC Haddad
use two different tile indexes and use  MIN- and MAXSCALEDENOM to control
when they are each used.

presumably you already have one tileindex working for the nationwide 500,000
scale images?

so make a second one that is a compound index - looks like the above, but
also includes the footprints of the 250,000 areas (replacing the 500,000
references in those areas). Switch between the two something like this:

LAYER
  NAME "Overview Imagery"
  STATUS OFF
  TYPE RASTER
  TILEINDEX "img_index_500k"
  TILEITEM "PATH"
  MINSCALEDENOM 31
END

LAYER
  NAME "Detailed Imagery"
  STATUS OFF
  TYPE RASTER
  TILEINDEX "img_index_250k"
  TILEITEM "PATH"
  MAXSCALEDENOM 30
END








On Tue, Feb 2, 2010 at 1:34 PM, Wendell Turner  wrote:

The base layer of my map has full coverage of the US at a
> scale of 1:500,000.  That works fine.  I have some areas of
> detail that have tif files at a scale of 1:250,000.  What do
> I put in the mapfile to say 'use high res if available for
> this tile, otherwise use the low res one'?
>
> Thanks,
>
> Wendell
>
> ___
> 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] areas of high res

2010-02-02 Thread Rahkonen Jukka
Hi,

Easy solution is to push all the images into same tileindex.  Add a new 
attribute, let's say "draw_order" and give value 1 for 1:50 images, value 2 
for 1:25 images.  Run the tileindex through "sortshp" utility and sort it 
by draw_order.  Now Mapserver will draw both tiffs in overlapping area, but 
high-resolution will be on top.

Improved way is to remove those tiles which will not be drawn from the 
tileindex. It goes well with OpenJUMP but there is a little bit work.  

- create tileindex of 1:50 with draw_order field
- create tileindex of 1:25 with draw_order field
- make union of all polygons in the 1:25 tileindex
- select polygons from 1:50 which are covered by the union
- delete selected polygons
- combine what is left from 1:50 tileindex and 1:25 tileindex
- sort with "sortshp".

Now there will be less double rendering and 1:25 areas will be faster.

-Jukka Rahkonen-
 


-Alkuperäinen viesti-
Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Wendell Turner
Lähetetty: ti 2.2.2010 23:34
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] areas of high res
 
The base layer of my map has full coverage of the US at a
scale of 1:500,000.  That works fine.  I have some areas of
detail that have tif files at a scale of 1:250,000.  What do
I put in the mapfile to say 'use high res if available for
this tile, otherwise use the low res one'?

Thanks,

Wendell

___
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] areas of high res

2010-02-02 Thread Wendell Turner
The base layer of my map has full coverage of the US at a
scale of 1:500,000.  That works fine.  I have some areas of
detail that have tif files at a scale of 1:250,000.  What do
I put in the mapfile to say 'use high res if available for
this tile, otherwise use the low res one'?

Thanks,

Wendell

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


Re: [mapserver-users] Using e00 files

2010-02-02 Thread Jon Miner
I've added the output from `ogrinfo -summary` at the bottom off this thread...


-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jon Miner
Sent: Tuesday, February 02, 2010 10:32 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Using e00 files

Making progress... Thanks to everyone's help, I have a simple app displaying a 
USGS Topo sheet using GeoTIFF.

Now, I'm trying to layer on information from the GRANIT website:

http://www.granit.unh.edu/

ftp://ftp.granit.sr.unh.edu/pub/GRANIT_Data/Vector_Data/Transportation_Networks/d-railroads/rrnh.e00

These files are "e00" files. Based on some other mailing list entries,  I used 
the ogr2ogr command to convert the file into Shapefiles:

ogr2ogr -f "ESRI Shapefile" temp ../data/rrnh.e00

then copied the files into my data directory, and added a new layer to the map 
file:

LAYER
  NAME "rail"
  TYPE LINE
  STATUS on
  DATA nhrail
  CLASS
NAME "Railroads"
SYMBOL 0
COLOR 168 0 184
  END
END

Something is wrong since the line data does not get rendered. Maybe there is a 
better approach instead of converting to Shapefiles?
-
$ ogrinfo -summary nhrail.shp nhrail

INFO: Open of `nhrail.shp'
  using driver `ESRI Shapefile' successful.

Layer name: nhrail
Geometry: Line String
Feature Count: 2207
Extent: (745250.25, 70273.328000) - (1231517.80, 915630.00)
Layer SRS WKT:
PROJCS["NAD83 / New Hampshire",
GEOGCS["GCS_North_American_1983",
DATUM["North_American_Datum_1983",
SPHEROID["GRS_1980",6378137,298.257222101]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",42.5],
PARAMETER["central_meridian",-71.67],
PARAMETER["scale_factor",0.7],
PARAMETER["false_easting",984250.031003876],
PARAMETER["false_northing",0],
UNIT["Foot_US",0.3048006]]
UserId: Real (11.0)
FNODE_: Real (11.0)
TNODE_: Real (11.0)
LPOLY_: Real (11.0)
RPOLY_: Real (11.0)
LENGTH: Real (12.3)
RRNH#: Integer (5.0)
RRNH-ID: Integer (5.0)
GRANITID: Integer (8.0)
RRA: Integer (2.0)


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


[mapserver-users] Maxextent , resolution and zoom issue

2010-02-02 Thread jbloc1878

Hi, i have been struggling with this problem for some time now.

Basically I am trying to display two layers. 50k and 250K of the uk.  
Can anyone explain further what resolution, maxextent and zoom values  
I should have to display these layers correctly? My layers cover the  
whole of the UK. I have tried quite a few different values however I  
cannot make sense of how this works. The example I am referring to is  
below.


Thanks for any help in advance

Create an options object that holds a limited set of map resolutions  
and a maximum bounding extent to show the map. A new OS OpenSpace map  
object is created by passing in our 'map' HTML div element id and the  
map options.


1.  var options = {resolutions: [10, 5],
2.maxExtent: new OpenSpace.MapBounds(40,  
10, 45, 15) );

3.  osMap = new OpenSpace.Map('map', options);
We now set the centre of the map and set the initial map zoom level to  
1 (corresponding to the second defined layer in the resolutions array).


1.  osMap osMap.setCenter(new OpenSpace.MapPoint(40,10), 1);

Cheers

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


[mapserver-users] Re: GetFeatureINFO errors in Mapserver notoccurringin Geoserver.

2010-02-02 Thread Michelle Douvil

Just an update to the problem we are having with the spatial views in
ORACLE/SDE..
It turns out that some, and I am not sure all, of our spatial views in SDE
9.1 will work with a GetFEATUREINFO request IF the OBJECTID is dropped from
the SVW. 

This is not an ideal solution however, since other applications (Arcgis
Desktop, Geoserver etc), may start to have a problems without the OBJECTID
in the the SVW. 

This is counterintuitive to what I understand about OBJECTIDs..
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=About_ObjectID_fields
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=About_ObjectID_fields
 

It would be great if we could narrow down what it is about OBJECTIDs in
Spatial Views that Mapserver does not like..

Many thanks!

Michelle


-- 
View this message in context: 
http://n2.nabble.com/GetFeatureINFO-errors-in-Mapserver-not-occurring-in-Geoserver-tp2686390p4502863.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] Using e00 files

2010-02-02 Thread Jon Miner
Hi David,

The layer name is explicitly called out in the URL; changing it to DEFAULT has 
no effect.

- Jon



- Original Message 
From: "Fawcett, David (MPCA)" 
To: Jon Miner ; "mapserver-users@lists.osgeo.org" 

Sent: Tue, February 2, 2010 12:07:29 PM
Subject: RE: [mapserver-users] Using e00 files

Jon, 

If you are not calling the layer name explicitly in the URL, try setting the 
layer status to DEFAULT.

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jon Miner
Sent: Tuesday, February 02, 2010 10:32 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Using e00 files

Making progress... Thanks to everyone's help, I have a simple app displaying a 
USGS Topo sheet using GeoTIFF.

Now, I'm trying to layer on information from the GRANIT website:

http://www.granit.unh.edu/

ftp://ftp.granit.sr.unh.edu/pub/GRANIT_Data/Vector_Data/Transportation_Networks/d-railroads/rrnh.e00

These files are "e00" files. Based on some other mailing list entries,  I used 
the ogr2ogr command to convert the file into Shapefiles:

ogr2ogr -f "ESRI Shapefile" temp ../data/rrnh.e00

then copied the files into my data directory, and added a new layer to the map 
file:

LAYER
  NAME "rail"
  TYPE LINE
  STATUS on
  DATA nhrail
  CLASS
NAME "Railroads"
SYMBOL 0
COLOR 168 0 184
  END
END

Something is wrong since the line data does not get rendered. Maybe there is a 
better approach instead of converting to Shapefiles?



  
___
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] Using e00 files

2010-02-02 Thread Brent Fraser
You haven't defined the LAYER's PROJECTION (we really should enhance mapserver 
to read .prj files!)




Jon Miner wrote:

Making progress... Thanks to everyone's help, I have a simple app displaying a 
USGS Topo sheet using GeoTIFF.

Now, I'm trying to layer on information from the GRANIT website:

http://www.granit.unh.edu/

ftp://ftp.granit.sr.unh.edu/pub/GRANIT_Data/Vector_Data/Transportation_Networks/d-railroads/rrnh.e00

These files are "e00" files. Based on some other mailing list entries,  I used 
the ogr2ogr command to convert the file into Shapefiles:

ogr2ogr -f "ESRI Shapefile" temp ../data/rrnh.e00

then copied the files into my data directory, and added a new layer to the map 
file:

LAYER
  NAME "rail"
  TYPE LINE
  STATUS on
  DATA nhrail
  CLASS
NAME "Railroads"
SYMBOL 0
COLOR 168 0 184
  END
END

Something is wrong since the line data does not get rendered. Maybe there is a 
better approach instead of converting to Shapefiles?



  
___

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] Using e00 files

2010-02-02 Thread Peter N. Schweitzer

On 02/02/2010 11:32 AM, Jon Miner wrote:

Now, I'm trying to layer on information from the GRANIT website:

http://www.granit.unh.edu/

ftp://ftp.granit.sr.unh.edu/pub/GRANIT_Data/Vector_Data/Transportation_Networks/d-railroads/rrnh.e00

These files are "e00" files. Based on some other mailing list entries,  I used 
the ogr2ogr command to convert the file into Shapefiles:

ogr2ogr -f "ESRI Shapefile" temp ../data/rrnh.e00

then copied the files into my data directory, and added a new layer to the map 
file:

LAYER
   NAME "rail"
   TYPE LINE
   STATUS on
   DATA nhrail
   CLASS
 NAME "Railroads"
 SYMBOL 0
 COLOR 168 0 184
   END
END

Something is wrong since the line data does not get rendered. Maybe there is a 
better approach instead of converting to Shapefiles?


Jon,

The rr data are in NH state plane coordinates--are the other data you
are using in the same projection?

Peter
--
Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192)
(703) 648-6533  FAX: (703) 648-6252  email: pschweit...@usgs.gov

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


RE: [mapserver-users] Using e00 files

2010-02-02 Thread Fawcett, David (MPCA)
Jon, 

If you are not calling the layer name explicitly in the URL, try setting the 
layer status to DEFAULT.

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jon Miner
Sent: Tuesday, February 02, 2010 10:32 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Using e00 files

Making progress... Thanks to everyone's help, I have a simple app displaying a 
USGS Topo sheet using GeoTIFF.

Now, I'm trying to layer on information from the GRANIT website:

http://www.granit.unh.edu/

ftp://ftp.granit.sr.unh.edu/pub/GRANIT_Data/Vector_Data/Transportation_Networks/d-railroads/rrnh.e00

These files are "e00" files. Based on some other mailing list entries,  I used 
the ogr2ogr command to convert the file into Shapefiles:

ogr2ogr -f "ESRI Shapefile" temp ../data/rrnh.e00

then copied the files into my data directory, and added a new layer to the map 
file:

LAYER
  NAME "rail"
  TYPE LINE
  STATUS on
  DATA nhrail
  CLASS
NAME "Railroads"
SYMBOL 0
COLOR 168 0 184
  END
END

Something is wrong since the line data does not get rendered. Maybe there is a 
better approach instead of converting to Shapefiles?



  
___
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] Using e00 files

2010-02-02 Thread Jon Miner
Making progress... Thanks to everyone's help, I have a simple app displaying a 
USGS Topo sheet using GeoTIFF.

Now, I'm trying to layer on information from the GRANIT website:

http://www.granit.unh.edu/

ftp://ftp.granit.sr.unh.edu/pub/GRANIT_Data/Vector_Data/Transportation_Networks/d-railroads/rrnh.e00

These files are "e00" files. Based on some other mailing list entries,  I used 
the ogr2ogr command to convert the file into Shapefiles:

ogr2ogr -f "ESRI Shapefile" temp ../data/rrnh.e00

then copied the files into my data directory, and added a new layer to the map 
file:

LAYER
  NAME "rail"
  TYPE LINE
  STATUS on
  DATA nhrail
  CLASS
NAME "Railroads"
SYMBOL 0
COLOR 168 0 184
  END
END

Something is wrong since the line data does not get rendered. Maybe there is a 
better approach instead of converting to Shapefiles?



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


Re: [mapserver-users] dinamic layer mapfile

2010-02-02 Thread Jana Golinowski

Hi Paul,


Hello, im using mapserver, since a while, but i have a dout, there is a way
to make a layer from a view, im using postgis, and i want to make a dinamic
layer using a view insted of a table, is this posible, which is the best way
to do it?


you have to insert your view into geometry_columns at least.


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


[mapserver-users] dinamic layer mapfile

2010-02-02 Thread Paul Alarcon

Hello, im using mapserver, since a while, but i have a dout, there is a way
to make a layer from a view, im using postgis, and i want to make a dinamic
layer using a view insted of a table, is this posible, which is the best way
to do it?

Thanks a lot 

Paul A.

-- 
View this message in context: 
http://n2.nabble.com/dinamic-layer-mapfile-tp4501207p4501207.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] Projection and mapquery

2010-02-02 Thread Morten Sickel
OK, i found a workaround to the original problem:

> I presently have a set up in which I plot some measurements on some 
> background maps. Things work fine, but I want to add the possibility 
> to query the measurement data set by clicking on a measurement. The 
> measurements have coordinates in lat lon and I only manage to query 
> those data if I plot the entire map in the same projection. 
(the map should be in utm, I would prefer not having to reproject the 
measurement locations)

I create a new map object with the layer to be queried, set the projection of 
the new map object to the same as the queried layer and then I do a 
queryByPoint on the new map object. This works to get find a object. To plot 
the query map, I get a unique id for the selected point, do a queryByAttributes 
on the corresponding layer in the drawn map. 


-- 
Morten Sickel
Norwegian Radiation Protection Authority


=== php code  == some parts removed

// I am querying a map layer called "mobile" 

// I am using smarty templating for my php script, if you don't know that, just 
consider the 
// $smarty->assign calls as a way to get something printed out.

function pix2geo($mapx,$mapy,$minx,$miny,$maxx,$maxy,$sizex,$sizey)
// calculates geographical coordinates in the map from click coordinates on the 
image
{
list($miny,$maxy)=array($maxy,$miny); 
// swaps miny and max y since the coordinates acsends upwards in the 
map, downwards in the picture
$geopoint=array();
foreach( array('x','y') as $dim){
$p=array();
foreach(array('map','min','max','size') as $par){
$name="$par$dim";
$p[$par]=$$name;
}
$geowidth=$p['max']-$p['min'];
$geopoint[$dim]=$p['map']/$p['size']*$geowidth+$p['min'];
}
return(array($geopoint['x'],$geopoint['y']));
}

$map=ms_newMapObj($map_path.'mobilweb.map');

$foundresults=false;
if($_GET['extent']){
list($minx,$miny,$maxx,$maxy)=explode(" ",$_GET['extent']);
$map->setextent($minx,$miny,$maxx,$maxy);
}
$clickpoint=ms_newpointObj();
$clickpoint->setXY($_GET['MAP_x']*1,$_GET['MAP_y']*1);
if(!isset($_GET['update'])){
if($_GET['action']=='QUERY'){

list($geoX,$geoY)=pix2geo($_GET['MAP_x']*1,$_GET['MAP_y']*1,$minx,$miny,$maxx,$maxy,$map->width,$map->height);
$geopoint=ms_newpointObj();
$geopoint->setXY($geoX,$geoY);
$mapproj=$map->getProjection();
$layerproj=$map->getlayerbyname('mobil')->getProjection();
if($mapproj!=$layerproj){
$oMapproj=ms_newProjectionObj($mapproj);
$oLayerproj=ms_newProjectionObj($layerproj);
$geopoint->project($oMapproj, $oLayerproj); 
// projects the point from the projection of the map to 
the projection of layer
$newmap=$map->clone(); // Might be better to make a new 
object and then add the querylayer to that object
$newmap->setProjection($layerproj);
$querymap=$newmap;
}else{
$querymap=$map;
}
$resu...@$querymap->queryByPoint($geopoint, MS_SINGLE , -1);
if ( $result==MS_FAILURE ) {$smarty->assign('mapmessage','No 
data found');}
$layername='mobil'; 
$layerfield='id'; 
$oLayer = $querymap->GetLayerByName($layername);
$numResults = $oLayer->getNumResults();
if($numResults){
$foundresults=true;
$oLayer->open();
for ($iRes=0; $iRes < $numResults; $iRes++)
{
$oRes = $oLayer->getResult($iRes);
$oShape = 
$oLayer->getShape($oRes->tileindex,$oRes->shapeindex);
$result=$oShape->values[$layerfield];
$smarty->assign('queryresult',$result);
$smarty->assign('querytime',date("Y.m.d 
H:i:s",$oShape->values['utctime']));
$oShape->free;
}
$oLayer->close;
if($querymap!=$map){ // Must transfer the information 
back to the map that is to be plotted
// NB, the field I'm using is the primary index 
in the database table, i know it is unique.
$oLayer=$map->GetLayerByName($layername);

$oLayer->queryByAttributes($layerfield,$result,MS_SINGLE);
}
}

}
}


___
mapserver-users mailing list
m

[mapserver-users] high quality print from external wms

2010-02-02 Thread Basti2025

Hi all,
i got an external wms included in my mapfile, like this:

 LAYER
NAME 'grenzen_5'
TYPE RASTER
STATUS ON
CONNECTION 'http://..?SERVICE=WMS&;'
CONNECTIONTYPE WMS
METADATA
'wms_srs' 'EPSG:31467'
'wms_title' 'Grenzen 5'
'wms_name' 'grenzen_5'
'wms_format' 'image/png'
'wms_server_version' '1.1.1'
'wms_onlineresource'
'http://..SERVICE=WMS&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=grenzen_5&format=image/png&STYLE=default'
END
END

Normaly the wms is not able to print with 288dpi.

My question is, how can i mod my mapfile so that i can use high quality
print with an external wms.

thx,
basti 
-- 
View this message in context: 
http://n2.nabble.com/high-quality-print-from-external-wms-tp4500369p4500369.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] Projection and mapquery

2010-02-02 Thread Morten Sickel
 
Josh, Thanks, but could you please elaborate this a bit? Do you mean that you 
are doing a reprojection in mapscript of the projected layer or that you are 
projecting the layer 'as saved' before mapserver gets to see i at all?

since the query is towards the map object, I cannot see how I can do any more 
reprojection of the layer, except what has been done when the layer was plotted.

-- 
Morten Sickel
Norwegian Radiation Protection Authority


-Original Message-
From: Josh Hevenor [mailto:jheve...@rogers.com] 
Sent: Thursday, January 28, 2010 8:42 PM
To: Morten Sickel
Subject: Re: [mapserver-users] Projection and mapquery

I have to wrap my head around this subject every time I come back to it.
I've only done this using $layer->queryByPoint() and I tend to project both the 
layer and the point into the map projection.

Not much of a hint but something to consider, Josh

Morten Sickel wrote:
> I presently have a set up in which I plot some measurements on some 
> background maps. Things work fine, but I want to add the possibility 
> to query the measurement data set by clicking on a measurement. The 
> measurements have coordinates in lat lon and I only manage to query 
> those data if I plot the entire map in the same projection. 

> Are there any ways to overcome this? As I am mostly working on maps from 60 
> deg north and upwards, geographical projection 
> is not the projection of choise and I would prefer not having to reproject 
> the measurement data.
>
> ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users