Gonzalo, 

It looks like you have corrected the original error.  You were trying to use a 
shape file as the data source for a raster layer.  

Now, you have changed the layer type to polygon and you are getting a different 
error.  You also didn't mention that you were using pmapper.  

I recommend stripping down your map file to the bare case needed to get it 
working.  Then, you can add back complexity and determine if the problem lies 
in your map file or if it is somewhere else.  


Try using something like this for your layer definition:

LAYER
 NAME 'Argentina'
 DATA 'argentina_gg'
 STATUS DEFAULT
 TYPE Polygon

 CLASS
  NAME 'Argentina'
  STYLE
   OUTLINECOLOR 129 0 0
  END #STYLE
 END #CLASS
END #LAYER

This assumes that you have SHAPEPATH 
'/home/orsep/public_html/gis/mapoteca/presas_gis/data/' in your map file.  
Also, for testing purposes, get rid of all of the other layers in your map file 
and take any projection info out of your map file.  

Then, either use shp2img or a simple mode=map call to mapserver CGI to test 
your map file.  

e.g. 
http://127.0.0.1/cgi-bin/mapserv?mode=map&map=/home/orsep/public_html/gis/mapoteca/presas_gis/argentina.map

(Of course, you will have to modify this to point to the correct domain/ip and 
use the correct name of your map file.)

David.

-----Original Message-----
From: Gonzalo Lionel Rodriguez [mailto:[email protected]] 
Sent: Tuesday, June 02, 2009 10:56 PM
To: Fawcett, David
Subject: Re: [mapserver-users] White Picture


Hi David,

The sharedpath in .map is:

SHAPEPATH '/home/orsep/public_html/gis/mapoteca/presas_gis/data/'

There are this files:

-rw-r--r--  1 orsep orsep    5216 Apr 26  2007 argentina_gg.dbf
-rw-r--r--  1 orsep orsep     636 Apr 26  2007 argentina_gg.sbn
-rw-r--r--  1 orsep orsep     172 Apr 26  2007 argentina_gg.sbx
-rw-r--r--  1 orsep orsep 1510004 Apr 26  2007 argentina_gg.shp
-rw-r--r--  1 orsep orsep     348 Apr 26  2007 argentina_gg.shx

If in the .map set this:

LAYER
 NAME 'Argentina'
 DATA 'argentina_gg'
 STATUS on
 TYPE Polygon
 TRANSPARENCY 50
 TOLERANCE 7
 TOLERANCEUNITS pixels

 METADATA
  WMS_SRS  'epsg:4326'
  WMS_TITLE 'WMSTitel'
  WMS_FEATURE_INFO_MIME_TYPE 'text/html'
 END #METADATA

 PROJECTION
  'init=epsg:4326'
 END

 CLASSITEM 'NOMBRE'

 CLASS
  NAME 'Argentina_gg.shp'
 EXPRESSION /./

  STYLE
   #COLOR 129 0 0
   OUTLINECOLOR 129 0 0
  END #STYLE
 END #CLASS
END #LAYER

I have a Internal server error whit this apache error_log message:

[Tue Jun  2 23:30:37 2009] [error] [client 190.190.4.193] Premature end of 
script headers: /home/orsep/public_html/gis/map.phtml
[Tue Jun  2 23:33:19 2009] [error] [client 190.190.4.193] Premature end of 
script headers: /home/orsep/public_html/gis/map.phtml

If in the .map set this:

LAYER
 NAME 'Argentina'
 DATA 'argentina_gg'
 STATUS on
 TYPE Polygon
 TRANSPARENCY 50
 TOLERANCE 7
 TOLERANCEUNITS pixels

 METADATA
  WMS_SRS  'epsg:4326'
  WMS_TITLE 'WMSTitel'
  WMS_FEATURE_INFO_MIME_TYPE 'text/html'
 END #METADATA

 PROJECTION
  'init=epsg:4326'
 END

# CLASSITEM 'NOMBRE'

# CLASS
#  NAME 'Argentina_gg.shp'
#  EXPRESSION /./

 # STYLE
   #COLOR 129 0 0
 #  OUTLINECOLOR 129 0 0
#  END #STYLE
# END #CLASS
END #LAYER

Pmapper works, but dont draw. And no apache error.

Please help me :(

2009/6/3 Fawcett, David <[email protected]>:
> It sounds like MapServer can't find the raster that you are using as 
> the data source for your layer.  Have you set a SHAPEPATH at the MAP 
> level? I am guessing that you either need to put the path to your 
> raster in SHAPEPATH, or put the absolute path to your raster in the 
> LAYER DATA statement.
>
> If you have a file named 'argentina_gg' in the same directory as your 
> map file or you have correctly specified the path and file name 
> correctly, it could be a permissions issue.
>
> David.
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Gonzalo 
> Lionel Rodriguez
> Sent: Tuesday, June 02, 2009 6:56 PM
> To: [email protected]
> Subject: [mapserver-users] White Picture
>
>
> Hi everyone,
>
> I have a problem with my mapserver when i test the map, with shp2img i 
> have this error:
>
> # ./shp2img -m 
> /home/orsep/public_html/gis/mapoteca/presas_gis/presas_gis.map
> -o /home/orsep/public_html/gis/tocado.png -all_debug 3
> [Tue Jun  2 20:53:25 2009].653282 msLoadMap(): 0.002s
> [Tue Jun  2 20:53:25 2009].655864 msDrawRasterLayerLow(Argentina): 
> entering. [Tue Jun  2 20:53:25 2009].656424 msDrawRaster(): Unable to 
> access file. argentina_gg using full path argentina_gg [Tue Jun  2 
> 20:53:25 2009].656438 Unable to open file argentina_gg for layer 
> Argentina ... fatal error. [Tue Jun  2 20:53:25 2009].663669
> msDrawMap(): Image handling error. Failed to draw layer named 
> 'Argentina'.
> msDrawMap(): Image handling error. Failed to draw layer named 
> 'Argentina'. <br>
> msDrawRaster(): Unable to access file. argentina_gg using full path 
> argentina_gg <br>
>
> The layer configuration is:
>
> LAYER
>  NAME 'Argentina'
>  DATA 'argentina_gg'
>  STATUS ON
>  PROJECTION
>  'init=epsg:4326'
>  END
>
>  TYPE RASTER
>  TRANSPARENCY 50
>  TOLERANCE 7
>  TOLERANCEUNITS pixels
>
>  METADATA
>  WMS_SRS  'epsg:4326'
>  WMS_TITLE 'WMSTitel'
>  WMS_FEATURE_INFO_MIME_TYPE 'text/html'
>  END #METADATA
>
> END #LAYER
>
>
> Any idea?
>
> Regards
> _______________________________________________
> mapserver-users mailing list
> [email protected] 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to