[OpenLayers-Users] On SHP files, projections and SRS

Christopher Schmidt crschmidt at crschmidt.net
Fri Jul 21 05:42:32 CDT 2006


On Fri, Jul 21, 2006 at 12:12:04PM +0200, Marcos Cobeña wrote:
> 			"wms_onlineresource" "http://localhost:8080/cgi-bin/DGIS/mapserv.exe?map=DGIS_12c.map&"
> 		NAME "12c_linea"
> 		TYPE LINE
> 		STATUS ON
> 		DATA Data/12c/12c_linea


> GET /cgi-bin/DGIS/mapserv.exe?MAP=DGIS_12c.map&LAYERS=12c_linea&TRANSPARENT=true&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=-180,25.200000000000003,-64.8,140.4&WIDTH=256&HEIGHT=256
> HTTP/1.1

Run ogrinfo -sum /path/to/Data/12c/12c_linea 12c_linea

You should see something like:

Layer name: zt25_d00
Geometry: Polygon
Feature Count: 648
Extent: (-73.508142, 41.237964) - (-69.928261, 42.886589)

Use that extent, but copy paste it into your WMS URL:

http://localhost:8080/cgi-bin/DGIS/mapserv.exe?MAP=DGIS_12c.map&LAYERS=12c_linea&TRANSPARENT=true&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=-73,41,-69,42&width=256&HEIGHT=256

Obviously this is just an example -- you'll need to modify the data to
fit what your ogrinfo says, rather than using mine :)

This should let you see whether the data renders at all, and also get an
idea for where the data should be in the world.

If you don't get any data, then the problem is likely with your
Mapserver set up, and you may want to ask the question to the
Mapserver_Users mailing list, where you'll probably get much more
competent help :) I don't see any indication of a problem in OpenLayers
-- it seems to be requesting your WMS tiles perfectly -- so the next
step is to go to figure out what's wrong with the WMS output.

If you get the WMS working, and OpenLayers still doesn't seem to be,
please feel free to come back to the list with more questions.
-- 
Christopher Schmidt
Web Developer


More information about the Users mailing list