New answers tagged

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)...


0

ST_Split will split a line by a multi polygon and return a geometry collection by which you can retreive the lat,long of the start and endpoints. This statement: uses some similiar test geometry of 1 multiline and 3 polygon circles: combines the 3 circles into a single geometry with Union All and ST_Union gets the intersected geometry between the line and ...


0

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 ...


0

I think the problem is that your st_intersects mixes a geography and a geometry; I guess that Postgres is trying to cast your geometry to geography, and that fails because srid 2877 is, as your error messages says, not a lat/lon coordinate system. Easiest way is to do everything using geographies and st_geogfromtext (the st_buffer will also draw the circle ...


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));


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 ...


0

You are confusing the PostgreSQL polygon geometric type with the PostGIS geometry type. They are are different approaches, and don't normally mix together. Try converting the bytea to geometry instead: ALTER TABLE polygon ALTER COLUMN geom TYPE geometry USING geom::geometry; And if you want to restrict it to just Polygon geometry types with ...


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.


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 ...


0

There appears to be a flaw in my process because when I look at the first listed self-intersection (OBJECTID = 883) and draw the feature class it came from with the appended feature class there is clearly a case of polygons collapsing. I will investigate things like the spatial domain suggested by @MichaelMiles-Stimson in his comment to see if I can resolve ...


1

I would convert the Polygons to Polylines, combine the lines you desire, creating a new closed line. The Construct Polygon tool on Advanced Editing toolbar works nicely to create a Polygon from polylines.


0

As you want to use Postgis, what about this (tested) workaround: migrate your large SHP to your Postgis; Create a Geoserver SQL View Layer with the SQL filter logic, using, for example, ST_Intersects; This layer also use "SQL view parameters" to pass the ID (or name, or whatever field you want) so you can pass the value with "viewparams" parameter. ...


2

Two possibilities. The picture you have there seems like a movement with the correct scale and form already. That can be done by finding the exact displacement and moving it back via the "move" delta x/y from the editor options. Measure the distance and use for example good old pythagoras or some tool to get the delta x/y. The second possibility includes ...


0

I might expect the results for area calculated in the projected space to be different from those using geographic coordinates. It just depends what areas the tool claim to compute. Consider the "square" whose corners are at the UTM coordinates 18n 528007 4467447 18n 528008 4467447 18n 528008 4467448 18n 528007 4467448 It might be plausible to ...



Top 50 recent answers are included