Hot answers tagged

11

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 not by dropping unwanted attributes but by selecting those which are wanted. The SQLite SQL dialect is more standard than the defauld OGR dialect, that's why I ...


11

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 form http://www.opengis.net/def/crs/EPSG/0/4326. The GML-3.0.0 spec (OCG 02-023r4) section v.2, page xiv states aliasing CRSs is kosher: in GML we have found ...


9

You can delete a field using OGR SQL and choosing an OGR format which supports the field deletion. Unfortunately GML doesn't support it, so you have to pass through another format, e.g. SHP: ogr2ogr temp.shp input.gml ogrinfo temp.shp -sql "ALTER TABLE temp DROP COLUMN field_to_drop" ogr2ogr -f GML output.gml temp.shp


8

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 take nc shapefile from package sf shpfile = system.file("shape/nc.shp", package = "sf") ## set working directory (where to save the converted file) setwd("...


7

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 to standardize the format. Work continues on GitHub at https://github.com/geojson/draft-geojson.


6

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 options, so you might want to review them prior to executing. You can also use the tool to create only a subset of the input data and also reproject the output.


5

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.uk/products/ostranslator-ii/ http://www.lutraconsulting.co.uk/blog/2015/02/23/loading-mastermap-free-easy-fast/


5

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 file and save it with a .bat or .cmd extension, say "D:\Work\do_149.cmd". set dirgml=D:\myGMLs set app=ogr2ogr set opt=-update -append -progress ...


5

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" attribute. If the output of a GetFeature has a "gml:name" attribute with the value in your table, then everything fits and declaring the attribute in ...


5

GeoPandas allows the layer keyword in read_file. db = gpd.read_file('pth/to/5221132-NS7010', driver='GML', layer="my_layer_name")


4

One usually sets options in C with CPLSetConfigOption. In python it would be gdal.SetConfigOption(option, value), e.g., gdal.SetConfigOption('PG_USE_COPY', 'YES')


4

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 centerline with start and end measures. I see ISO does have a published specification. ISO 19148-http://www.iso.org/iso/iso_catalogue/catalogue_tc/...


4

@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 applications. The first reason to use LRS is that Many organizations collect data about linear features as point locations along the line as an alternative to expressing ...


4

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 you see a grid of EPSG:27700 together with the origin and your railway station:


4

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> <airports fid="0"> <NAME>Bigfork Municipal Airport</NAME> <LAT> 47.7789</LAT> <LON> -93.6500</...


4

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> <groupId>org.geotools.xsd</groupId> <artifactId>gt-xsd-wfs</artifactId> <version>${geotools.version}</...


3

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 attributes to you GML feature to accept your MapInfo pen, color and width . Then link the exposed mapinfo_pen_* attributes to those attributes. Once that is ...


3

FYI not all WMS implicitly deploy WFS. Having said this, there are a couple of approaches to help: 1./ scan the Capabilities XML for (optional) Layer/DataURL elements. If they exist, DataURL/@xlink:href should point to a download of the data 2./ Use the WMS DescribeLayer operation to examine whether there are associated WFS or WCS endpoints (ref: http://...


3

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: $ python Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license&...


3

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 area of interest into BBOXes that return less features than what the WFS is limited to. For example &BBOX=395000,5815000,400000,5820000 for a part of ...


3

OGC Standards are listed on the OGC Standards page. As you will see GeoJSON is not amongst them.


3

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

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 Features (SF) specifications for OGC, such as Simple Features for SQL (SF-SQL) [10], features are considered to be objects which can have geometry and other ...


3

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 happening. I did some fast research. Failure message is referring to GML Coverage format. By WCS 2.0 core standard WCS 2.0 servers are not required to support ...


3

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 Mathematical topology assumes that geographic features occur on a two-dimensional plane. Through planar enforcement, spatial features can be represented through nodes ...


3

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 contains a buildings layer:


3

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 Montreal from MapZen here.


3

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 information caculate 3D polygons (simple way) creating citygml adding 3D buildings to the gml this file is published to help others to find a accelerated start ...


3

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 your mapping and share with you our own implementation of a GeodesyML web feature service, which you may find helpful. Our interpretation is that GeodesyML ...


3

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 hidden hack) Make the schema parsing code realize that thing is really just a string (my guess is that currently something that some object describing the string ...


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