Title: ArcIMS Emulation with IMSEMU
1ArcIMS Emulationwith IMSEMU
- A Short Introduction to ArcXML and Reverse
Engineering
Paul RamseyRefractions Research
2What Map Servers Do
- Tell me what you have!?!
- I have some layers.
- Give me a map of this place!! Use these layers!
- OK, heres a map.
3Map Server Languages
- OpenGIS Web Map Server (URL GET)
- GETCAPABILITIES
- GETMAP
- GETFEATUREINFO
- ESRI ArcXML (XML POST)
- ltGET_SERVICE_INFOgt
- ltGET_IMAGEgt
- ltGET_FEATURESgt
4ArcIMS Emulation
- Goal Speak ArcXML Like a Native
MapScript
5(No Transcript)
6(No Transcript)
7EMU
- IMSEMU
- Perl CGI
- Mapscript
- com.esri.esrimap.Esrimap
- Requires HTTP Server, Perl with,
XMLParser XMLWriter Perl Mapscript
8ArcIMS ? Mapserver
- ArcIMS
- One Server, Multiple Services
- Projection ID
- WKT Projection
- Mapserver
- One Server, Multiple Map Files
- EPSG Number
- Proj4 Projection
9IMSEMU Installation
- Copy com.esri.esrimap.Esrimap to CGI directory
- Edit httpd.conf to alias servlets
- ScriptAlias /servlet/ "/home/www/mapserv/cgi-bin/"
- Edit head of script to point to valid map files
- my _at_files (92K,26910,/home/www/mapserv/maps/92
k.map,PGIS,42102,/home/www/mapserv/maps/pgsql.m
ap)
10IMSEMU Operation
- Responds to ArcIMS-style requests
- http//mapserver.refractions.net /servlet/com.es
ri.esrimap.Esrimap ?ServiceNamecatalog CustomS
treamFalse -
11POST /servlet/com.esri.esrimap.Esrimap
?ServiceNameBCView CustomStreamFalse
HTTP/1.1Content-Length 120User-Agent
Mozilla/4.0 (compatible MSIE 5.01 Windows
NT)Host mapserver.refractions.netConnection
Keep-AliveCache-Control no-cachelt?xml
version"1.0" encoding"UTF-8"?gtltARCXML
version"1.0.1"gtltREQUEST dpi"96"gtltGET_SERVICE_I
NFO/gtlt/REQUESTgtlt/ARCXMLgt
12HTTP/1.1 200 OKServer Microsoft-IIS/5.0Date
Wed, 24 Oct 2001 17 0842 GMTContent-Type
text/plainConnection Keep-Alivelt?xml
version"1.0" ?gtltARCXML version"1.1"gtltRESPONSEgtlt
SERVICESgtltSERVICE NAME"ActiveMODIS Fires"
SERVICEGROUP"FeatureServer1" ACCESS"PUBLIC"
TYPE"FeatureServer" DESC"" group""
STATUS"ENABLED"gtltENVIRONMENTgtltLOCALE
country"US" language"en" /gtltUIFONT
name"Arial" /gtlt/ENVIRONMENTgtlt/SERVICEgtlt/SERVIC
ESgtlt/RESPONSEgtlt/ARCXMLgt
13Learning the Lingo
- Read the ArcXML Reference
- google arcxml reference
- Sniff the Wire
ArcXML
ESRI ClientArcMap ArcExplorerWeb Page
ArcIMS
14HTTPLook
15ngrep
ngrep -d eth0 host 192.168.50.71 and tcp port 80
T 128.128.40.6880 -gt 192.168.50.712044 AP
HTTP/1.1 200 ..Date Tue, 01 Jun 2004 041207
GMT..Server Apache/2.0.42 ( Win32)
mod_jk/1.2.4..Content-Language en..Keep-Alive
timeout15, max99.. Connection
Keep-Alive..Transfer-Encoding chunked..Content-Ty
pe text/plai n charsetISO-8859-1....160.....d
....lt?xml version"1.0" encoding"UTF-8"?
gt..ltARCXML version"1.1"gt..ltRESPONSEgt..ltIMAGEgt..ltE
NVELOPE minx"-86.5816123 189285"
miny"30.3584262004056" maxx"-86.4186258678133"
maxy"30.482580309 1411" /gt.....d....ltOUTPUT
url"http//coastalmap.marine.usgs.gov/output/GoM
ex_shoreline_change_KAI24668574026.jpg"
/gt..lt/IMAGEgt..lt/RESPONSEgt..lt/ARCXML gt.....f..
16perl
use LWPUserAgent url "http//198.102.62.145
/servlet/com.esri.esrimap.Esrimap?ServiceNameESR
I_WorldCustomStreamTrueClientLocaleen_USClie
ntVersion3.1" my ua new LWPUserAgent my
req HTTPRequest-gtnew(POST gt
url) req-gtcontent(qqlt?xml version"1.0"
encoding"UTF-8"?gtltARCXML version"1.1"gtltREQUESTgtlt
GET_IMAGEgtltPROPERTIESgtltENVELOPE
minx"-209.08653257226464" miny"-143.954474147845
05" maxx"187.68158936045373" maxy"158.2816455794
2696" /gtltIMAGESIZE width"596" height"454"
dpi"96" /gtltLAYERLIST order"true"gtltLAYERDEF
id"V1 Coverage 3" visible"true
/gtlt/LAYERLISTgtlt/PROPERTIESgtlt/GET_IMAGEgtlt/REQUESTgtlt
/ARCXMLgt) my res ua-gtrequest(req) if
(res-gtis_success) print res-gtcontent
dĆ
lt?xml version"1.0" encoding"UTF-8"?gt ltARCXML
version"1.1"gt ltRESPONSEgt ltIMAGEgt ltENVELOPE
minx"-209.086532572264" miny"-143.954474147845"
maxx"187.681589360453" maxy"158.281645579426"
/gt dĆltOUTPUT file"/net/dbserver/work/common/geone
t/maps/ESRI_World_bluemap11910313481.gif"
url"http//redlands.geographynetwork.com/out/maps
/ESRI_World_bluemap11910313481.gif"
/gt lt/IMAGEgt lt/RESPONSEgt lt/ARCXMLgt f
17hexedit
00 00 00 64 00 00 00 C5 3C 3F 78 6D 6C 20 76
65 72 73 69 6F ...d....lt?xml versio 6E 3D 22 31
2E 30 22 20 65 6E 63 6F 64 69 6E 67 3D 22 55
54 n"1.0" encoding"UT 46 2D 38 22 3F 3E 0D 0A
3C 41 52 43 58 4D 4C 20 76 65 72 73
F-8"?gt..ltARCXML vers 69 6F 6E 3D 22 31 2E 31 22
3E 0D 0A 3C 52 45 53 50 4F 4E 53
ion"1.1"gt..ltRESPONS 45 3E 0D 0A 3C 49 4D 41 47
45 3E 0D 0A 3C 45 4E 56 45 4C 4F
Egt..ltIMAGEgt..ltENVELO 50 45 20 6D 69 6E 78 3D 22
2D 32 30 39 2E 30 38 36 35 33 32 PE
minx"-209.086532 35 37 32 32 36 34 22 20 6D 69
6E 79 3D 22 2D 31 34 33 2E 39 572264"
miny"-143.9 35 34 34 37 34 31 34 37 38 34 35
22 20 6D 61 78 78 3D 22 31 54474147845"
maxx"1 38 37 2E 36 38 31 35 38 39 33 36 30 34
35 33 22 20 6D 61 78 87.681589360453" max 79 3D
22 31 35 38 2E 32 38 31 36 34 35 35 37 39 34
32 36 22 y"158.281645579426" 20 2F 3E 0D 0A 00
00 00 64 00 00 00 CF 3C 4F 55 54 50 55 54
/gt.....d....ltOUTPUT 20 66 69 6C 65 3D 22 2F 6E
65 74 2F 64 62 73 65 72 76 65 72
file"/net/dbserver 2F 77 6F 72 6B 2F 63 6F 6D
6D 6F 6E 2F 67 65 6F 6E 65 74 2F
/work/common/geonet/ 6D 61 70 73 2F 45 53 52 49
5F 57 6F 72 6C 64 5F 72 65 64 6D
maps/ESRI_World_redm 61 70 35 33 37 30 33 31 33
34 33 33 2E 67 69 66 22 20 75 72
ap5370313433.gif" ur 6C 3D 22 68 74 74 70 3A 2F
2F 72 65 64 6C 61 6E 64 73 2E 67
l"http//redlands.g 65 6F 67 72 61 70 68 79 6E
65 74 77 6F 72 6B 2E 63 6F 6D 2F
eographynetwork.com/ 6F 75 74 2F 6D 61 70 73 2F
45 53 52 49 5F 57 6F 72 6C 64 5F
out/maps/ESRI_World_ 72 65 64 6D 61 70 35 33 37
30 33 31 33 34 33 33 2E 67 69 66
redmap5370313433.gif 22 20 2F 3E 0D 0A 3C 2F 49
4D 41 47 45 3E 0D 0A 3C 2F 52 45 "
/gt..lt/IMAGEgt..lt/RE 53 50 4F 4E 53 45 3E 0D 0A
3C 2F 41 52 43 58 4D 4C 3E 0D 0A
SPONSEgt..lt/ARCXMLgt.. 00 00 00 66
...f
18ArcIMS Modes
- ServiceNamecatalog
- CustomStreamTrueFalse
- EncodeTrueFalse
- FormTrueFalse
- ClientLocaleen_US
- ClientVersion3.1
19IMSEMU Capabilities
- Image Serving
- GET_CLIENT_SERVICES
- GET_SERVICE_INFO
- GET_IMAGE
- FILTER_COORDSYS (Coordinate Reprojection)
- CustomStreamTrueFalse
- EncodeTrueFalse
20IMSEMU To Do
- Feature Serving
- GET_FEATURE(default, xml, xmlnew)
- SPATIALQUERY / QUERYFILTER
- Image Serving with Selections and Acetates
- Inline LAYER objects.
21Questions?