11
votes
Remove unneeded columns from geographic data file?
Shapefile as a temporary file format is not necessary and it may also alter the GML data (shorten attribute names, cut strings to max 255 characters, change DATETIME to DATE etc.)
I would use ogr2ogr ...
11
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 ...
8
votes
Accepted
Is GeoJSON an OGC format
No, GeoJSON is not an OGC standard:
IETF Geographic JSON Working Group
The Internet Engineering Task Force, in conjunction with the original specification authors, has formed the Geographic JSON WG ...
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 ...
6
votes
Accepted
Is it possible to convert a .shp file to .gml?
Yes, using the command line ogr2ogr tool.
For example, given a "roads.shp" file, you could convert it using the following:
ogr2ogr -f GML roads.gml roads.shp
ogr2ogr provides a large array of ...
5
votes
Getting OS Mastermap data into QGIS?
We have a new tool which you can load large number of Ordnance Survey's MasterMap into PostGIS. The tool is written from scratch and is pretty fast compared with others:
http://www.lutraconsulting.co....
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 ...
5
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" ...
5
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")
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
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 ...
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 ...
4
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 ...
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>
&...
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>
...
3
votes
Using FME to convert a MapInfo TAB to GML with style attributes
You can't build style into a GML the same way as you can in a MapInfo tab, however you can still bring that information over into your GML as an attribute against the features.
You will need to add ...
3
votes
PostGIS: ST_Transform function conversion problem
I've been having the same problem for a few days now. I found a solution, however, I didn't use PostGIS. Instead, I used QGIS (2.0.1 - Dufour) to do so.
My problem was the same as yours. I imported a ...
3
votes
How to get GML layer CRS with OGR Python?
After some digging I found out a GetSpatialReference method for the Geometry class (note the different name to the GetSpatialRef method in the Layer class). So the code should follow something like:
$ ...
3
votes
Accepted
How to request paginated or filtered data from WFS 2.0?
Often even if filters or pagination are not supported, you can use the BBOX parameter to query features limited to a specific region. Via trial and error this can give you all the data. Just slice the ...
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.
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.
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 ...
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 ...
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
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
gml × 295wfs × 52
qgis × 40
geoserver × 33
xml × 33
postgis × 24
openlayers × 24
shapefile × 23
geotools × 22
python × 21
ogr2ogr × 21
openlayers-2 × 20
geojson × 20
gdal × 18
coordinate-system × 16
ogc × 14
arcgis-desktop × 13
convert × 13
ogr × 11
fme × 10
polygon × 9
geometry × 9
postgresql × 8
kml × 8
import × 8