#!/users/crschmidt/bin/jython """ Usage: CLASSPATH="/Users/crschmidt/geotools-2.5.1/gt-referencing-2.5.1.jar:/Users/crschmidt/geotools-2.5.1/gt-epsg-hsql-2.5.1.jar:/Users/crschmidt/geotools-2.5.1/hsqldb-1.8.0.7.jar" jython geotools.py Example URL: http://localhost:8000/EPSG:4326 """ import org.geotools.referencing.CRS as crs import BaseHTTPServer class myhandler(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.end_headers() if self.path[1:].startswith("EPSG") or self.path[1:].startswith("CRS"): code = crs.decode(self.path[1:]) self.wfile.write(str(code)) self.wfile.write("") server_address = ('', 8000) httpd = BaseHTTPServer.HTTPServer(server_address,myhandler) httpd.serve_forever() #def run(): #print code