Hot answers tagged

10 votes
Accepted

Import PNG symbols in QGIS

Your best bet is to use InkScape and convert your graphics to SVG. Polygons can be filled with rasters, but points and markers need SVG. If your symbol is available in a font, you can also use Font ...
Steven Kay's user avatar
  • 20.3k
8 votes
Accepted

Python toolbox documentation from within pyt file

This was bothering me probably more than it should have, and after getting to know python a little bit I've found that the problem is pretty easy to solve. Since I'm mostly an R user, these lines of ...
Ratnanil's user avatar
  • 973
7 votes
Accepted

Restricting values to domain codes (beyond attribute table)?

Business rules vs data integrity rules When you model your database, you specify the business logic in two spaces: a. The data integrity rules. This includes among others having an integer column so ...
Alex Tereshenkov's user avatar
7 votes
Accepted

.xml missing in shapefile, problems with displaying in arcgis

The .xml file is the metadata file. An XML/metadata file is not a compulsory file needed to form shapefiles. The minimum files needed are: .shp — shape format; the feature geometry itself .shx ...
MacroZED's user avatar
  • 2,291
7 votes
Accepted

Reading KML Files in R?

Functions in rgdal read data into sp class objects, which can only contain one type of spatial object - a set of points, or lines, or polygons. The sf package provides classes for geometry vectors ...
Spacedman's user avatar
  • 63.2k
7 votes
Accepted

XML bounding boxes to shapefile QGIS

You can use rasterio for getting geo-coordinates from pixel coordinates, and pyshp (shapefile) for creating a shapefile. import rasterio import shapefile # -> pyshp module import xml.etree....
Kadir Şahbaz's user avatar
6 votes
Accepted

Get QGIS layer symbology as xml string using PyQGIS

This works with QgsMapLayer().exportNamedStyle() the following way (here for the active layer): >>> from PyQt4.QtXml import QDomDocument >>> d = QDomDocument() >>> iface....
Jochen Schwarze's user avatar
6 votes
Accepted

Exporting vector layer's style to XML

The qml file style file you get when exporting layer styles is different from the one you get in the "Style manager" when you export. The second format is the accepted one in "Create ...
ThomasG77's user avatar
  • 30.5k
6 votes
Accepted

What is QDomNode and QDomDocument in terms of PyQGIS?

Here is what QDomNode and QDomDocument are in the Qt context: The QDomDocumentclass represents the entire XML document. Conceptually, it is the root of the document tree, and provides the primary ...
Kadir Şahbaz's user avatar
5 votes

Extract country border from OpenStreetMap

The most simple query I came with using Overpass turbo https://overpass-turbo.eu/ is [out:json]; relation["boundary"="administrative"]["admin_level"="4"]["...
Jachym's user avatar
  • 381
5 votes
Accepted

How to properly get coordinates from gpx file in python

GPX files use XML namespaces (look at Parsing XML with namespace in Python via 'ElementTree' or Read GPX using Python ElementTree.register_namespace? for example). The namespace is {http://www....
gene's user avatar
  • 54.7k
5 votes
Accepted

QGIS 3.4. project file editing

You have to unzip Qgz file first. Then you can edit the qgs file with any text editor.
Julien Maignan's user avatar
5 votes

Import XML on QGIS, not working LandXML

If you go to the link inside the <alternateIdentifier> tag near the top: http://ipt.naturalsciences.be/ipt/resource?r=be_rbins_vertebrates_aves You can use the option Download data as a DwC-A ...
Matt's user avatar
  • 16k
5 votes
Accepted

Reading Inspire XML with GeoPandas

This is a GML file with layers. To read a layer, pass the layer name: In [6]: db = gpd.read_file("DB-Netz_INSPIRE_20200217.xml",layer="RailwayLine") /home/rowlings/.local/lib/...
Spacedman's user avatar
  • 63.2k
5 votes

Reading Inspire XML with GeoPandas

You can list all the layers using fiona.listlayers(datasource): import fiona as fio import geopandas as gpd gml = "/vsizip/DB_Inspire_XML_2019.zip" for layer in fio.listlayers(gml): ...
user2856's user avatar
  • 65.3k
5 votes

What is QDomNode and QDomDocument in terms of PyQGIS?

After certain trials and errors, I was able to perform exporting/importing configurations of the layer's attribute table, see Saving and applying layout of columns in QGIS Attribute Table. Despite a ...
Taras's user avatar
  • 32.6k
4 votes
Accepted

Restoring public.layer_styles table from PostGIS dump

You can add this statement SET XML OPTION DOCUMENT; at the beginning of the SQL backup file. Source : https://hub.qgis.org/issues/10079
etrimaille's user avatar
  • 7,230
4 votes

Turn off the setting of QGIS to produce XML when closing Raster layer

To disable the creation of .aux.xml files after deleting the raster layer - place the startup.py file in the C:\Users\%USERNAME%\AppData\Roaming\QGIS\QGIS3 folder with this code: from osgeo import ...
Comrade Che's user avatar
  • 7,051
4 votes
Accepted

How to save in a given XML schema in QGIS?

As far as i know there is no such tool, as the last comment in your Linked Question mentioned. The problem with xml is that it is extensible... It means anyone can create a new schema or alter an ...
Matte's user avatar
  • 6,235
4 votes

Importing XML data into QGIS

XML files can hold any kind of data. If a software like QGIS should be able to read it, the software (or the developer) needs to know the XML schema of the data. QGIS is able to read Openstreetmap ...
AndreJ's user avatar
  • 76.6k
4 votes

Converting xml -> dict -> xml using Python?

I just realized that the problem was in dictoxml or dom parsing. I changed my code a bit everything works nicely: xml = open(path, "r") org_xml = xml.read() dict_xml = xmltodict.parse(org_xml, ...
W. Tom's user avatar
  • 668
4 votes
Accepted

Editing ArcGIS metadata elements using Python?

I have some comments/suggestions for you. You mention that you do not have any admin privileges on your machine to be able to install the metadata module. Good news here, you don't need admin to ...
crmackey's user avatar
  • 8,484
4 votes
Accepted

Reading an ESRI XML Workspace Document with python or other FOSS

For the geometry encoding, see Spec for ArcGIS XML Schema of GeoDatabase, Appendix A. Geometry types in xml geodatabase I don't see any reference to the esri:polygonb tag, but to my eyes this looks ...
Steven Kay's user avatar
  • 20.3k
4 votes

GeoServer WPS Chaining problem

I can confirm it's an issue. It's probably a side effect of the Wicket 7 migration. I'd open a bug report at https://osgeo-org.atlassian.net/projects/GEOS/issues
Andrea Aime's user avatar
  • 17.3k
4 votes
Accepted

Using zip function into distance calculating program?

Look at How to calculate distances in a point sequence?, you need to iterate by pair of points to compute the distances points = zip(lats,lons) # or directly with a list comprehension points = ...
gene's user avatar
  • 54.7k
4 votes
Accepted

Problem getting map using XML file with gdal_translate

The error message is misleading when it gives a hint about using for ignoring the error. The essential information is in this message HTTP status code: 0, error: SSL certificate problem: self ...
user30184's user avatar
  • 64.5k
4 votes
Accepted

Can I reference a way (street) in a node (representing a shop)?

Since this is mainly a mapping question you are better off at http://help.openstreetmap.org/. OSM has different address schemes. The most popular scheme is the Karlsruhe Schema where you add at ...
scai's user avatar
  • 6,080
4 votes
Accepted

How to SortBy a GetFeature WFS request by FeatureId (fid) in XML?

That is not supposed to work. SortBy is defined in the WFS 1.1.0 standard as The SORTBY parameter is used to specify a list of property names whose values should be used to order (upon ...
user30184's user avatar
  • 64.5k
4 votes

XML schema for QGIS symbology

As far as I know, this schema doesn't exist. (Similarly, there is no schema for QGIS project files, which are XML as well.)
underdark's user avatar
  • 84k
4 votes
Accepted

Importing DBF files into Microsoft Excel

The ### are a way for openoffice to tell you that your column is too narrow for the data it contains. If you adjust it, you should start seeing your data. Therefore, if you open your dbf file with ...
Kantan's user avatar
  • 1,917

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