Hot answers tagged

4

The Understanding Coordinate Management in the Geodatabase whitepaper is still the gold standard for understanding what's happening behind the scenes. The key things to remember are: Esri coordinate references encompass far more than coordinate system The coordinate reference of a feature class cannot be changed If you let ArcGIS choose your coordinate ...


3

This should help: if layer.type() == QgsMapLayer.VectorLayer and (layer.wkbType()==QGis.WKBPoint or layer.wkbType() == QGis.WKBMultiPoint): But it is not the best approach. Just use QgsMapLayerComboBox https://qgis.org/api/classQgsMapLayerComboBox.html use: comboBox.setFilters(QgsMapLayerProxyModel.PointLayer) On your combobox object.


2

I assume you are making your selections from the attribute table. You can actually set up a rule-based symbology, which will make selected features larger than non-selected ones, or even bring them to the forefront. This requires the Expression Plus plugin. First create your symbology. Then switch to a Rule Based symbology. Leave the original rule/rules ...


1

The Example from the spatialite cookbook https://www.gaia-gis.it/gaia-sins/spatialite-cookbook/html/new-geom.html denotes: SELECT AddGeometryColumn('test_geom', 'the_geom', 4326, 'POINT', 'XY'); Strings are quoted here, so try to modify your comand to cur.execute("SELECT AddGeometryColumn('%s', '%s', %s, '%s', '%s')" %(table_name, geometry_column_name, ...


1

WKT is only a text markup language for representing vector geometry, therefore you cannot convert 3D WKT to 2D (= text to text), you need to change the geometry The problem with ogr is that it seems that all the geometries are 3D by defaut 1) Creation of a 2D point with ogr point = ogr.Geometry(ogr.wkbPoint) # 2D point point.AddPoint(1198054.34, 648493.09)...


1

You can use ST_ClosestPoint to return the projection of your point on the linestring. SELECT --poi.name, --poi.city, ST_AsText(poi.the_geog) AS poi, ST_AsText(ST_ClosestPoint(road.the_geog::geometry, poi.the_geog::geometry)::geography) AS closest_point, ST_Distance(road.the_geog, poi.the_geog)/1000.0 AS distance_km, ST_AsText(road.the_geog) AS ...


1

Try to use ST_GeogFromText instead of ST_GeomFromText select * from circles where st_intersects (towers.the_geog,ST_Buffer(ST_Transform(ST_GeogFromText('POINT(-105.04428 39.74779)', 4326), 2877), 1500));



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