12 votes
Accepted

Is srsName of "EPSG:4326" spec compliant in GML 3.1 / 3.2?

Yes, srsName="EPSG:abcd" is GML-3 compliant but only in an application context where EPSG:abcd points to a CRS definition. As of 2013, OGC best practice (documented here) is to use http URIs of the ...
Steven Kalt's user avatar
8 votes

Reading in a single polygon from a shapefile

Time to ditch the shapefile! Here's a reproducible example using a combination of packages sf, gdalUtils and dplyr: library(sf) library(dplyr) library(mapview) library(gdalUtils) ## as an example we ...
TimSalabim's user avatar
7 votes
Accepted

Load specific layer from GML to GeoPandas

GeoPandas allows the layer keyword in read_file. db = gpd.read_file('pth/to/5221132-NS7010', driver='GML', layer="my_layer_name")
martinfleis's user avatar
  • 2,417
7 votes
Accepted

Reading GML features with shapely in Python?

You can use any Python library that parse xml files (see Using Python to parse an XML containing GML tags or How to extract data from GML file for example) With pygml that provides the Geo Interface ...
gene's user avatar
  • 54.9k
6 votes
Accepted

GeoServer DescribeFeatureType response missing attribute for GML only

As far as I know, you are not seeing a bug. The schema reports anything in addition to the attributes already inherited from "gml:Feature", which already contains a "gml:name" ...
Andrea Aime's user avatar
  • 17.4k
5 votes

Using ogr2ogr to convert GML to shapefile in Python?

Eric Levine's Answer works, however the linked ogr2ogr.py is a bit outdated (file says 2013). For e.g. the flag "-nlt CONVERT_TO_LINEAR" is not implemented. Instead of using ogr2ogr (command ...
Magnus's user avatar
  • 251
5 votes
Accepted

How to convert gml:pos to latitude and longitude?

You are almost right: The false Northing is -100000, so the "real" Y coordinate is 456089 meters. The point is 50 km East and 456 km North of the natural origin, that is 2° West and 49° North. Here ...
AndreJ's user avatar
  • 76.7k
5 votes
Accepted

Using ogr2ogr to convert multiple GML files to a postgis table

Looking at your examples, I assume you are working on a Windows machine. Try the following: Copy/Move/Put the remaining 149 GML files in a directory, say D:\myGMLs. Paste the codes below into a text ...
Ralph Tee's user avatar
  • 1,722
5 votes
Accepted

OGR2OGR - converting a GML file to GeoJSON

Use the 'layer' option: ogr2ogr -f GeoJSON .\3925845-HW5929.geo.json .\3925845-HW5929.gz LayerNameHere Alternatively, if you need more control, you could use a SQL query with the '-sql' option.
Alex's user avatar
  • 487
5 votes

Selecting certain text from attribute values in QGIS using field calculator

Use regexp_match() to find the features that contain the string 'Nonconiferous Trees', see documentation: case when regexp_match( descriptiveTerm, 'Nonconiferous Trees') then 'Mixed Woodland Fill' end
Babel's user avatar
  • 71.2k
5 votes

Opening GML file with collection of geometries in QGIS

That Inspire data has features which are hard for QGIS. some attributes are lists, like this: habitatSpecies|HabitatSpeciesType|localSpeciesName|LocalNameType|localName (StringList) = (4:Alnus ...
user30184's user avatar
  • 65.5k
4 votes

Modelling per-segment attributes in GML LineString

@dhollema is guiding you to the right direction and fortunately it seems GML supports this data type. Note that LRS(Linear Referencing) is designed and developed for this specific type of ...
Farid Cheraghi's user avatar
4 votes
Accepted

Modelling per-segment attributes in GML LineString

This falls within the field of linear referencing. The spatial feature is represented typically as a single "centerline" and non-spatial records/elements are used to record attributes along that ...
dhollema's user avatar
  • 361
4 votes
Accepted

What is the conceptual meaning of featureMember in GML?

Informally, its a single "entity" that is modelled in the data - like a row in a database or shapefile. For example in this segment, each featureMember is an airport: <gml:featureMember> &...
Spacedman's user avatar
  • 63.9k
4 votes

Read GML using Java

You've imported the wrong GML and Version you want: import org.geotools.wfs.GML; import org.geotools.wfs.GML.Version; To do this you will need to import gt-xsd-wfs using: <dependency> ...
Ian Turton's user avatar
  • 81.5k
4 votes
Accepted

Trying to determine which CRS this GML uses

Use projfinder.com. Stick your coordinates in the box, zoom the map to where you think the point should roughly be, click "Find My Projection" and it scans thousands of projections and sees ...
Spacedman's user avatar
  • 63.9k
3 votes

Server (MapServer) does not support the gml coverage

It would help a lot to mention where to get the test suite https://github.com/opengeospatial/ets-wcs20 and which exact test you run, and also study the test suite and try to analyze what is probably ...
user30184's user avatar
  • 65.5k
3 votes

Is it valid GML if the boundary of a polygon intersects itself?

As a comment to an answer by @bugmenot a quotation from GML-SF document http://portal.opengeospatial.org/files/?artifact_id=11266, GML is more than simple features. In both GML and previous Simple ...
user30184's user avatar
  • 65.5k
3 votes
Accepted

Is it valid GML if the boundary of a polygon intersects itself?

GML is built on the Simple Feature geometry model. The SFM says that a self-intersecting polygon is not "simple" and thus not valid. So I would say no, GML does not allow that.
bugmenot123's user avatar
  • 11.1k
3 votes

Is GeoJSON an OGC format

OGC Standards are listed on the OGC Standards page. As you will see GeoJSON is not amongst them.
PolyGeo's user avatar
  • 65.2k
3 votes

Linux Tool to visualize CityGML file

Aristoteles 3D (requires Java) is working on current versions of Ubuntu. From memory, the link I used was from https://www.citygmlwiki.org/index.php/Freeware, pointing to http://www.geo-kiosk.net/...
3 votes

Which topology file formats are supported by QGIS?

What is topology for you ? (same in your question Python library to create topologies). It seems to me that you mix topology, geometry and file formats From ArcUser: Understanding Topology ...
gene's user avatar
  • 54.9k
3 votes

Open data on buildings in Montreal

I'm not sure about shapefiles, but a basemap dataset ("cartographie de base") is provided here: http://donnees.ville.montreal.qc.ca/dataset/cartographie-de-base It's available in DWG format and ...
dbaston's user avatar
  • 13.1k
3 votes

Open data on buildings in Montreal

You can download the 2015 LiDAR data (including buildings - class 6) here. 3d models of buildings for certain boroughs are available here and here. You can also get OpenStreetMap extracts for ...
Brent Edwards's user avatar
3 votes

Creating simple citygml 3D models based on 2D shapefiles (alkis) shp2gml using Python?

I build my citygmls based on german alkis-files (shape-files), but it can be used also with other building information sources after changing the code. Main steps import shapefile for 2D building ...
hotzar's user avatar
  • 79
3 votes

Creating a Geoserver App-Schema mapping file for GeodesyML

I am the technical lead of GA’s effort to adopt GeodesyML. I see that you’ve solved your problem by upgrading to a later version of GeoServer. I would like to suggest a slightly different approach to ...
Lazar Bodor's user avatar
3 votes
Accepted

Geoserver WFS Feature Schema Enumeration of Strings

As far as I know, what you're attempting to do is not possible, it would require new code to be written to either: Make the schema configurable via UI (the xml schema snippets are a semi-working ...
Andrea Aime's user avatar
  • 17.4k
3 votes
Accepted

GML axis order problem in QGIS

Axis order in coordinate systems and in GML is a complicated thing. The issue is all too complicated to be handled as a gis.stacexchange answer but I recommend to start by reading this https://wiki....
user30184's user avatar
  • 65.5k
3 votes
Accepted

How can I determine the original spatial reference system of GML coordinates when I have their WGS84 equivalent but no EPSG?

If its a global coordinate set and has come from a web-based mapping system there's always a good chance its in EPSG:3857 - google's web mercator. Try that, and if everything is in the right place ...
Spacedman's user avatar
  • 63.9k
3 votes
Accepted

Trying to import Dutch Infrastructure GML using OGR GMLAS driver, but no geometries?

It turns out the secret is to list all the schemas on the command line rather than just the root one. So after fetching the schemas (look for a list of imports in the top of imkl2015-wion.xsd) you can ...
Ian Turton's user avatar
  • 81.5k

Only top scored, non community-wiki answers of a minimum length are eligible