What Is .GML
Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.
Last updated: April 10, 2026
Key Facts
- GML became an official OGC standard in 2000 and is maintained by the Open Geospatial Consortium
- It is built on XML, making GML human-readable and machine-parseable for geographic data
- GML supports multiple geometry types including Point, LineString, Polygon, and complex multi-part geometries
- The standard integrates with OGC Web Feature Services (WFS) for standardized data exchange across web services
- GML is used by government agencies, mapping platforms, and enterprises for sharing geospatial datasets
Overview
Geography Markup Language (GML) is an XML-based international standard for encoding and representing geographic and spatial data. Maintained by the Open Geospatial Consortium (OGC) since its initial release in 2000, GML provides a structured format that describes geographic features—such as cities, roads, water bodies, and administrative boundaries—in a way that both humans and computer systems can understand and process.
GML was designed to overcome limitations of earlier proprietary formats by offering a universal, open standard for geospatial data exchange. Organizations use GML to share map data across different platforms, databases, and applications without losing structural integrity or semantic meaning. The format's XML foundation ensures compatibility with web services and modern data infrastructure, making it essential for government spatial data portals, environmental monitoring systems, urban planning applications, and global mapping services.
How It Works
GML encodes geographic information through a hierarchical XML structure that combines geometric data with semantic attributes. Here's how its core components function:
- Geometry Types: GML supports basic geometries (Point, LineString, Polygon) and complex multi-part geometries. A single GML document can represent a city as a Point with latitude/longitude coordinates alongside attributes like population, establishment date, and administrative classification.
- Feature Objects: GML organizes data as feature objects that bundle geometry with properties. A building feature might include polygon boundaries, height attributes, construction date, and ownership information in a single, cohesive structure.
- Coordinate Reference Systems: GML enables specification of which coordinate system is used (WGS84, UTM, or local projections), ensuring accurate spatial interpretation across different mapping applications and regions worldwide.
- WFS Integration: GML works seamlessly with OGC Web Feature Services (WFS), which use GML as their primary data exchange format. WFS servers respond to queries with GML-encoded features, enabling real-time geospatial data retrieval across the internet.
- Schema Validation: GML documents can be validated against XML schemas, ensuring data quality and consistency before processing. This validation prevents malformed geographic records from corrupting downstream mapping or analysis systems.
Key Comparisons
| Format | Structure | Primary Use | Complexity |
|---|---|---|---|
| GML | XML-based hierarchical | Complex geospatial features with attributes | High—supports advanced geometry and references |
| GeoJSON | JSON key-value pairs | Web mapping and simple feature sharing | Low—streamlined for web APIs |
| Shapefiles | Binary proprietary format | Desktop GIS applications | Medium—limited to basic geometry types |
| KML | XML-based simplified | Google Earth and casual map visualization | Low—focused on presentation rather than data richness |
Why It Matters
- Standardization: As an OGC standard, GML ensures consistent data representation across organizations, governments, and technology platforms. This interoperability reduces barriers when integrating geospatial datasets from multiple sources.
- Data Richness: Unlike simpler formats, GML preserves complex spatial relationships, temporal information, and domain-specific attributes. Environmental agencies use GML to encode species habitats with precise geometry and biodiversity metrics that inform conservation decisions.
- Enterprise Integration: GML's compatibility with enterprise web services, databases, and cloud platforms makes it suitable for large-scale infrastructure projects. Utilities manage networks of water pipes, electrical grids, and telecommunications lines using GML-encoded feature collections.
- Regulatory Compliance: Many government spatial data infrastructure initiatives mandate GML as the official exchange format. The European INSPIRE directive, for example, requires member states to publish geospatial data in GML format for interoperability.
As geographic data becomes increasingly critical for urban planning, climate monitoring, disaster response, and infrastructure management, GML remains the foundational standard that bridges proprietary systems and ensures geospatial information can be reliably shared across organizational and technological boundaries.
More What Is in Daily Life
Also in Daily Life
More "What Is" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
Missing an answer?
Suggest a question and we'll generate an answer for it.