[mapserver-users] RE: Images returning blank
Kent Morrison
KMorrison at advantrack.com
Tue Jan 19 14:14:37 PST 2010
I ran ogrinfo.exe on the non-working file.
C:\ms4w\tools\gdal-ogr>ogrinfo.exe c:\mapserverdata\shapefiles\1\trafficflow_200
7.shp trafficflow_2007 -so
INFO: Open of `c:\mapserverdata\shapefiles\1\trafficflow_2007.shp'
using driver `ESRI Shapefile' successful.
Layer name: trafficflow_2007
Geometry: Line String
Feature Count: 4212
Extent: (2460247.751004, 232706.929725) - (2507483.898985, 294550.472704)
Layer SRS WKT:
(unknown)
CounterID: Integer (10.0)
Location: String (50.0)
StartDate: Date (10.0)
ADT_Total: Integer (10.0)
AWD_Total: Integer (10.0)
XCoord: Real (19.8)
YCoord: Real (19.8)
StreetID: String (16.0)
Shape_len: Real (19.11)
I added:
EXTENT 2460247.751004 232706.929725 2507483.898985 294550.472704
to the map file and changed the Layer Status to Default.
[Tue Jan 19 21:43:35 2010].791000 CGI Request 1 on process 2676
[Tue Jan 19 21:43:35 2010].791000 msTileSetExtent (-13073784.538762, 6051371.431753) (-13071348.108486, 6053807.862029)
[Tue Jan 19 21:43:35 2010].791000 msDrawMap(): Layer 0 (SpokaneTrafficFlows), 0.000s
[Tue Jan 19 21:43:35 2010].791000 msDrawMap(): Drawing Label Cache, 0.000s
[Tue Jan 19 21:43:35 2010].791000 msDrawMap() total time: 0.000s
[Tue Jan 19 21:43:35 2010].822000 msSaveImage() total time: 0.031s
[Tue Jan 19 21:43:35 2010].822000 mapserv request processing time (loadmap not incl.): 0.031s
[Tue Jan 19 21:43:35 2010].822000 msFreeMap(): freeing map at 01A5AF10.
Still a blank image.
When I ran ogrinfo.exe on the working shapefile:
C:\ms4w\tools\gdal-ogr>ogrinfo.exe c:\mapserverdata\shapefiles\1\co48_d00.shp -s
o co48_d00
INFO: Open of `c:\mapserverdata\shapefiles\1\co48_d00.shp'
using driver `ESRI Shapefile' successful.
Layer name: co48_d00
Geometry: Polygon
Feature Count: 265
Extent: (-106.645646, 25.837377) - (-93.516407, 36.500704)
Layer SRS WKT:
(unknown)
AREA: Real (20.5)
PERIMETER: Real (20.5)
CO48_D00_: Real (11.0)
CO48_D00_I: Real (11.0)
STATE: String (2.0)
COUNTY: String (3.0)
NAME: String (90.0)
LSAD: String (2.0)
LSAD_TRANS: String (50.0)
The Extents on the working file are in lat/lon. In the non-working file it looks to be in something else.
I'm trying to return VE image tiles..
not sure where to go from here to get the first file to work.
Thanks
________________________________
From: Fawcett, David (MPCA) [mailto:David.Fawcett at state.mn.us]
Sent: Tuesday, January 19, 2010 3:28 PM
To: Kent Morrison; 'mapserver-users at lists.osgeo.org'
Subject: RE: Images returning blank
Based on the errors, it looks like you will need EXTENT to your map file at the MAP level.
What do you get when you run ogrinfo against the two shapefiles? Any difference?
Are you adding a URL var for the layer name? Try setting LAYER STATUS to DEFAULT for both layers and see if you get an image back.
David.
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Kent Morrison
Sent: Tuesday, January 19, 2010 3:17 PM
To: 'mapserver-users at lists.osgeo.org'
Subject: [mapserver-users] Images returning blank
I have mapserver 5.4.2 installed.
I have two different shape files, one renders properly the other only returns blank images
The debug log for the one that does not work returns:
[Tue Jan 19 20:34:59 2010].212000 CGI Request 1 on process 1180
[Tue Jan 19 20:34:59 2010].212000 mapserv(): Web application error. No way to generate map extent.
[Tue Jan 19 20:34:59 2010].212000 msCalculateScale(): General error message. Invalid image extent, minx=-1.000000, miny=-1.000000, maxx=-1.000000, maxy=-1.000000.
[Tue Jan 19 20:34:59 2010].212000 msTileSetExtent (-13090872.991896, 6046512.903143) (-13071381.549686, 6066004.345353)
[Tue Jan 19 20:34:59 2010].227000 msDrawMap(): Layer 0 (SpokaneTrafficFlows), 0.000s
[Tue Jan 19 20:34:59 2010].227000 msDrawMap(): Drawing Label Cache, 0.000s
[Tue Jan 19 20:34:59 2010].227000 msDrawMap() total time: 0.015s
[Tue Jan 19 20:34:59 2010].274000 msSaveImage() total time: 0.047s
[Tue Jan 19 20:34:59 2010].274000 mapserv request processing time (loadmap not incl.): 0.062s
[Tue Jan 19 20:34:59 2010].274000 msFreeMap(): freeing map at 01A5AF00.
[Tue Jan 19 20:34:59 2010].274000 freeLayer(): freeing layer at 020E4160.
the map file is:
MAP
IMAGETYPE AGG
SIZE 256 256
SHAPEPATH "/MapServerData/ShapeFiles/1"
IMAGECOLOR 255 255 255
TRANSPARENT ON
FONTSET "../../fonts/fonts.list"
CONFIG PROJ_LIB "c:\ms4w\proj\nad\"
CONFIG MS_ERRORFILE "c:\ms4w\tmp\errors2.txt"
DEBUG 5
PROJECTION
"init=epsg:4326"
END
OUTPUTFORMAT
NAME 'AGG'
DRIVER AGG/PNG
IMAGEMODE RGB
END #Outputformat
LAYER
NAME SpokaneTrafficFlows
DATA TrafficFlow_2007
STATUS ON
TYPE LINE
DEBUG 5
CLASS
NAME "classSpokaneTrafficFlows"
STYLE
COLOR 127 255 64
OPACITY 50
OUTLINECOLOR 255 128 64
WIDTH 3
END #style
END #class
END #layer
END #Map
running shp2img.exe returns:
msLoadMap(): Image handling error. Unable to initialize image
msCalculateScale(): General error message. invalid image extent ....
I get the same results for shp2img on the working shapefile/map file.
THE FOLLOWING WORKS:
MAP
IMAGETYPE AGG
SIZE 256 256
SHAPEPATH "/MapServerData/ShapeFiles/1"
IMAGECOLOR 255 255 255
TRANSPARENT ON
FONTSET "../../fonts/fonts.list"
CONFIG PROJ_LIB "c:\ms4w\proj\nad\"
PROJECTION
"init=epsg:4326"
END
OUTPUTFORMAT
NAME 'AGG'
DRIVER AGG/PNG
IMAGEMODE RGB
END #Outputformat
LAYER
NAME TxCounties
DATA co48_d00
STATUS ON
TYPE Polygon
CLASS
NAME "classTxCounties"
STYLE
COLOR 0 255 0
OPACITY 25
OUTLINECOLOR 0 0 0
WIDTH 2
END #style
END #class
END #layer
END #Map
Anyone have any idea's why this might not work in the first case? Or what else can I do to debug the problem?
Kent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100119/045efd02/attachment.htm>
More information about the MapServer-users
mailing list