/* Package GeoTools/WMS Implementation * Copyright (C) 2001 Cameron Shorter (camerons@users.sourceforge.net) * Artur Hefczyc (kobit@users.sourceforge.net) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: OGCConstants.java,v 1.12 2002/01/31 10:20:34 ianturton Exp $ * $Author: ianturton $ * $Date: 2002/01/31 10:20:34 $ */ package uk.ac.leeds.ccg.ogc; /** * Class OGCConstants contains the most important * OGC constants used by many other OGC classes. * Constants are divided by OGC Specification Version * to allow easy use data from different WMSServers.
* Current GeoTools-OGC package tries to implement specification * version 1.1.0 and 1.0.0 * * @author Cameron Shorter * @author Artur Hefczyc * @version $Revision: 1.12 $ */ public class OGCConstants { /* Constants */ /* Constants for spec version 1.1.0 */ public static final String VERSION_V110 = "1.1.0"; /* Parameters names for spec ver 1.1.0 */ public static final String PAR_V110_VERSION = "VERSION"; public static final String PAR_V110_SERVICE = "SERVICE"; public static final String PAR_V110_REQUEST = "REQUEST"; public static final String PAR_V110_UPDATESEQUENCE = "UPDATESEQUENCE"; /* Parameters values for spec ver 1.1.0 */ public static final String VAL_V110_WMS = "WMS"; public static final String VAL_V110_GETCAPABILITIES = "GetCapabilities"; /* Constants for spec version 1.0.0 */ public static final String VERSION_V100 = "1.0.0"; /* Parameters names for spec ver 1.0.0 */ public static final String PAR_V100_VERSION = "WMTVER"; public static final String PAR_V100_REQUEST = "REQUEST"; /* Parameters values for spec ver 1.1.0 */ public static final String VAL_V100_GETCAPABILITIES = "capabilities"; /* OGC-Specific MIME Types, MT_ is shortcut for MIME_TYPE_*/ public static final String MT_HTML = "text/html"; public static final String MT_XML_TEXT = "text/xml"; public static final String MT_XML_OGC_GENERIC = "application/xml"; public static final String MT_XML_CAPABILITIES = "application/vnd.ogc.wms_xml"; public static final String MT_XML_GML = "application/vnd.ogc.gml"; public static final String MT_XML_SE = "application/vnd.ogc.se_xml"; public static final String MT_XML_SE_INIMAGE = "application/vnd.ogc.se_inimage"; public static final String MT_XML_SE_BLANK = "application/vnd.ogc.se_blank"; /* * Constant to specify the image format as specified by WMS spec from * Open GIS Consortium. Not all these * formats are supported by Geotools. Similarly, each remote WMS need only * support one of these formats. */ /** * Constant GIF for mime type "image/gif" */ public static final int GIF = 1; /** * Constant JPEG for mime type "image/jpeg" */ public static final int JPEG = 2; /** * Constant PNG for mime type "image/x-png" */ public static final int PNG = 3; /** * Constant TIFF for mime type "image/tiff" */ public static final int TIFF = 4; /** * Constant GeoTIFF for mime type "image/???" */ public static final int GeoTIFF = 5; /** * Constant PPM for mime type "image/x-portable-pixmap" */ public static final int PPM = 6; /** * Constant WBMP for mime type "image/???" */ public static final int WBMP = 7; /** * Constant WebCGM for mime type "image/???" */ public static final int WebCGM = 8; /** * Constant SVG for mime type "???/???" */ public static final int SVG = 9; /** * Constant GML1 for mime type "application/x-cubestor-gml.1" */ public static final int GML1 = 10; /** * Constant GML2 for mime type "application/x-cubestor-gml.2" */ public static final int GML2 = 11; /** * Constant GML3 for mime type "application/x-cubestor-gml.3" */ public static final int GML3 = 12; /** Mime Type of each format */ public static final String[] MAP_FORMATS = { "none", "image/gif", "image/jpeg", "image/png", "image/tiff", "image/???", "image/x-portable-pixmap", "image/???", "image/???", "???/???", "application/x-cubestor-gml.1", "application/x-cubestor-gml.2", "application/x-cubestor-gml.3" }; /** Constants to pass into the "FORMAT" field in OGC service requests */ public static final String[] MAP_FORMAT_DESCRIPTION = { "NONE", "GIF", "JPEG", "PNG", "TIFF", "GeoTIFF", "PPM", "WBMP", "WebCGM", "SVG", "GML_1", "GML_2", "GML_3" }; } /* * Changes in file: * * $Log: OGCConstants.java,v $ * Revision 1.12 2002/01/31 10:20:34 ianturton * modified setFormat(String name) to handle new formats better added new * format style names to constants * * Revision 1.11 2001/12/20 15:27:23 ianturton * various fixes and small mods to make WMSExample actually run. Can now * display an image if you remember to choose gif or jpg as output. Still * crashes if you zoom in. * * Revision 1.10 2001/10/24 09:40:18 kobit * Added LOG cvs keyword to the end of file * * */