[mapserver-users] C# connectiontype issue

2009-04-27 Thread Murty Maganti
Hi

 

I have a raster layer in map file. When I load the map file using C# map
script, at run time it shows layerObj.connectiontype as
'MS_CONNECTION_TYPE.MS_SHAPEFILE' though it is raster image. Is there
any syntax error with my map file definition.  I need to know exactly
whether it is a raster or vector layer in my application. Some logic in
my application needs to handle them differently.

 

This is the entry in map file

 

  LAYER

DATA "14m_jpg_24bit.jpg"

NAME " 14m Jpg 24bit"

STATUS ON

TYPE RASTER

UNITS METERS

  END

 

Thanks

Murty

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


Re: [mapserver-users] C# connectiontype issue

2009-04-27 Thread Steve Lime
Nothing wrong with the layer def. Why not just look at the layer type first in 
your application. Rasters will 
always have TYPE RASTER. Everything else, is vector I'm pretty sure.

Steve

>>> On 4/27/2009 at 2:41 PM, in message
, "Murty
Maganti"  wrote:
> Hi
> 
>  
> 
> I have a raster layer in map file. When I load the map file using C# map
> script, at run time it shows layerObj.connectiontype as
> 'MS_CONNECTION_TYPE.MS_SHAPEFILE' though it is raster image. Is there
> any syntax error with my map file definition.  I need to know exactly
> whether it is a raster or vector layer in my application. Some logic in
> my application needs to handle them differently.
> 
>  
> 
> This is the entry in map file
> 
>  
> 
>   LAYER
> 
> DATA "14m_jpg_24bit.jpg"
> 
> NAME " 14m Jpg 24bit"
> 
> STATUS ON
> 
> TYPE RASTER
> 
> UNITS METERS
> 
>   END
> 
>  
> 
> Thanks
> 
> Murty

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


RE: [mapserver-users] C# connectiontype issue

2009-04-27 Thread Murty Maganti
WMS layers also have type as 'Raster'. But I think I can still try 

If(layer type == Raster && connection type != WMS), hoping only WMS and
true raster have type as 'Raster'. 


Thanks
Murty

-Original Message-
From: Steve Lime [mailto:steve.l...@dnr.state.mn.us] 
Sent: Monday, April 27, 2009 4:41 PM
To: mapserver-users@lists.osgeo.org; Murty Maganti
Subject: Re: [mapserver-users] C# connectiontype issue

Nothing wrong with the layer def. Why not just look at the layer type
first in your application. Rasters will 
always have TYPE RASTER. Everything else, is vector I'm pretty sure.

Steve

>>> On 4/27/2009 at 2:41 PM, in message
, "Murty
Maganti"  wrote:
> Hi
> 
>  
> 
> I have a raster layer in map file. When I load the map file using C#
map
> script, at run time it shows layerObj.connectiontype as
> 'MS_CONNECTION_TYPE.MS_SHAPEFILE' though it is raster image. Is there
> any syntax error with my map file definition.  I need to know exactly
> whether it is a raster or vector layer in my application. Some logic
in
> my application needs to handle them differently.
> 
>  
> 
> This is the entry in map file
> 
>  
> 
>   LAYER
> 
> DATA "14m_jpg_24bit.jpg"
> 
> NAME " 14m Jpg 24bit"
> 
> STATUS ON
> 
> TYPE RASTER
> 
> UNITS METERS
> 
>   END
> 
>  
> 
> Thanks
> 
> Murty

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


RE: [mapserver-users] C# connectiontype issue

2009-04-27 Thread Venkat Rao Tammineni
Hi,

 

  I am using below map file code for loading raster data. below is my code.
I think the problem with jpeg.convert into tiff or geo tiff etc.. it may
work.

 

## Heat Maps ###

Layer # Layer starts here

  Name "Hyderabad"

  GROUP "Heat Maps"

  Data "..\Raster\hyderabad.tif"

  PROCESSING "SCALE=1,15399.12305" // these are optional you need not use 

  PROCESSING "SCALE_BUCKETS=10" // these are optional you need not use 

 

  CLASSITEM "[pixel]"

 

  TYPE RASTER

  Status On

   

 CLASS

   Name "Class One"

   EXPRESSION ([pixel] > 1  AND  [pixel] <  5133.041016)

STYLE

  COLOR  255 255 0

END

  END

 

   CLASS

  Name "Class Two"

  EXPRESSION ([pixel] > 5133.041017AND  [pixel] < 10266.08203)

STYLE

  COLOR  0 166 255

END

  END

 

   CLASS

  Name "Class Three"

  EXPRESSION ([pixel] > 10266.08204   AND  [pixel] < 15399.12305 )

STYLE

  COLOR  255 0 0

END

  END

  

   

End # end of the State Layer

 

Thanks,

 

Venkat

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Murty Maganti
Sent: Tuesday, April 28, 2009 1:11 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] C# connectiontype issue

 

Hi

 

I have a raster layer in map file. When I load the map file using C# map
script, at run time it shows layerObj.connectiontype as
'MS_CONNECTION_TYPE.MS_SHAPEFILE' though it is raster image. Is there any
syntax error with my map file definition.  I need to know exactly whether it
is a raster or vector layer in my application. Some logic in my application
needs to handle them differently.

 

This is the entry in map file

 

  LAYER

DATA "14m_jpg_24bit.jpg"

NAME " 14m Jpg 24bit"

STATUS ON

TYPE RASTER

UNITS METERS

  END

 

Thanks

Murty

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


Re: [mapserver-users] C# connectiontype issue

2009-04-28 Thread Frank Warmerdam
I have a raster layer in map file. When I load the map file using C# map 
script, at run time it shows layerObj.connectiontype as 
‘MS_CONNECTION_TYPE.MS_SHAPEFILE’ though it is raster image. Is there 
any syntax error with my map file definition.  I need to know exactly 
whether it is a raster or vector layer in my application. Some logic in 
my application needs to handle them differently.


 


This is the entry in map file

 


  LAYER

DATA "14m_jpg_24bit.jpg"

NAME " 14m Jpg 24bit"

STATUS ON

TYPE RASTER

UNITS METERS

  END


Murty,

I believe the connectiontype value is left to the default for raster
layers, which happens to be MS_SHAPEFILE.  The connectiontype does not
really apply for layers of type RASTER.

I think to distingish layer types properly you will need to examine both
the TYPE and CONNECTIONTYPE fields.

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