One question I have is:
1. The PROJECTION settings from spatialreference.org for
NAD_1983_HARN_StatePlane_Washington_North_FIPS_4601_Feet is
PROJECTION
"proj=lcc"
"lat_1=47.5"
"lat_2=49.73333333333333"
"lat_0=47.0"
"lon_0=-120.83333333333333"
"x_0=500000.0000000001"
"y_0=0"
"ellps=GRS80"
"to_meter=0.3048006096012192"
"no_defs"
END
I can see where all the settings come fro mthe .PRJ file except for the x_0 and
y_0, where did these come from?
I though tit might be the "False_Easting"/"False_Northing" settings but
changing x_0 = 1640416.666666667 caused the images to disapear so that's not
it.
The .PRJ file is:
PROJCS["NAD_1983_HARN_StatePlane_Washington_North_FIPS_4601_Feet",
GEOGCS["GCS_North_American_1983_HARN",
DATUM["D_North_American_1983_HARN",
SPHEROID["GRS_1980",6378137.0,298.257222101]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Lambert_Conformal_Conic"],
PARAMETER["False_Easting",1640416.666666667],
PARAMETER["False_Northing",0.0],
PARAMETER["Central_Meridian",-120.8333333333333],
PARAMETER["Standard_Parallel_1",47.5],
PARAMETER["Standard_Parallel_2",48.73333333333333],
PARAMETER["Latitude_Of_Origin",47.0],
UNIT["Foot_US",0.3048006096012192]],
VERTCS["NAVD_1988",
VDATUM["North_American_Vertical_Datum_1988"],
PARAMETER["Vertical_Shift",0.0],
PARAMETER["Direction",1.0],
UNIT["Foot_US",0.3048006096012192]]
I need to be able to create the PROJECTION settings from the .PRJ file. My
application needs to allow users to upload shape files on their own. The
PROJECTION settings is the last part.
-----Original Message-----
From: Fawcett, David (MPCA) [mailto:[email protected]]
Sent: Wednesday, January 20, 2010 11:06 AM
To: Kent Morrison; 'Rahkonen Jukka'; [email protected]
Subject: RE: [mapserver-users] RE: Images returning blank
If you were just trying to display the data in a simple map, you could go
without the projection info and still see something if you only wanted to
display that layer.
Let's add a PROJECTION obj to your layer:
Take a look at http://spatialreference.org/ref/esri/102740/. I am pretty sure
that this is the spatial reference system (SRS) that your data is in.
MapServer uses SRS definitions in Proj.4 format. Here is a link to this SRS in
Proj.4: http://spatialreference.org/ref/esri/102740/proj4/
In your LAYER, add
PROJECTION
"proj=lcc"
"lat_1=28.38333333333333"
"lat_2=30.28333333333334"
"lat_0=27.83333333333333"
"lon_0=-99"
"x_0=600000.0000000001"
"y_0=4000000"
"ellps=GRS80"
"datum=NAD83"
"to_meter=0.3048006096012192"
"no_defs"
END
Does this work?
David.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Kent Morrison
Sent: Wednesday, January 20, 2010 10:45 AM
To: 'Rahkonen Jukka'; [email protected]
Subject: RE: [mapserver-users] RE: Images returning blank
Removing the PROJECTION from the trafficflow_2007 map results in the following
error:
Cannot set new SRS on a map that doesn't have any projection set. Please
make sure your mapfile has a PROJECTION defined at the top level.
So what I need to do is figure out how to setup the PROJECTION. Which I have no
idea on.
The .prj file that can with the shp file is:
PROJCS["NAD_1983_StatePlane_Texas_South_Central_FIPS_4204_Feet",
GEOGCS["GCS_North_American_1983",
DATUM["D_North_American_1983",
SPHEROID["GRS_1980",6378137.0,298.257222101]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Lambert_Conformal_Conic"],
PARAMETER["False_Easting",1968500.0],
PARAMETER["False_Northing",13123333.33333333],
PARAMETER["Central_Meridian",-99.0],
PARAMETER["Standard_Parallel_1",28.38333333333333],
PARAMETER["Standard_Parallel_2",30.28333333333334],
PARAMETER["Latitude_Of_Origin",27.83333333333333],
UNIT["Foot_US",0.3048006096012192]]
So now I am trying to figure out PROJECTIONS... Any suggestions or sites with
examples that will help me here would be greatly appreciated.
Thanks
Kent
-----Original Message-----
From: Rahkonen Jukka [mailto:[email protected]]
Sent: Tuesday, January 19, 2010 4:25 PM
To: Kent Morrison; [email protected]
Subject: Re: [mapserver-users] RE: Images returning blank
Hi,
The non-working one is in some other projection than epsg:4326. You will get
that layer visible by removing projection also from the MAP level and using the
extents from ogrinfo, but in order to show both layers together you should know
the correct projection for both datasets.
If projection is given at map level it must suit the extents. Epsg:4326 and
EXTENT 2460247.751004 232706.929725 2507483.898985 294550.472704 do not suit.
-Jukka-
-----Alkuperäinen viesti-----
Lähettäjä: [email protected] puolesta: Kent Morrison
Lähetetty: ke 20.1.2010 0:14
Vastaanottaja: 'Fawcett, David (MPCA)'; '[email protected]'
Aihe: [mapserver-users] RE: Images returning blank
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:[email protected]]
Sent: Tuesday, January 19, 2010 3:28 PM
To: Kent Morrison; '[email protected]'
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: [email protected]
[mailto:[email protected]] On Behalf Of Kent Morrison
Sent: Tuesday, January 19, 2010 3:17 PM
To: '[email protected]'
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
_______________________________________________
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