New answers tagged geometry
Very easy, you can use the WKT or WKB formats see Geometry_Outputs: in PostGIS: WKT: ST_AsText without CRS or ST_AsEWKT with CRS WKB:ST_AsEWKB with CRS in QGIS , see Geometry Construction: QgsGeometry.fromWkt(wkt) or WKB
As far as I know JTS does nothing with the SRID value (see this email). You will need to use GeoTools to reproject your features to a common projection and then call intersection on them. The result will then be in the common projection and you can then project back to one or both of the input projections.
You just need point.X and point.Y not geom.point.X and geom.point.Y.
You are very close, just a few minor changes should make this work. First when setting the point object x and y, the code should be: pnt.X = XMin pnt.Y = YMin Then you need to set the geometry of the feature object from the point: feat = cur.newRow() feat.shape = pnt cur.insertRow(feat)
The LGIM data supporting the application is possible issue. LOWERPARCELID field in the ParcelPublishing dataset, TaxParcel Feature Class must not have records. The Geometry Buffer Selection functionality uses the LOWERPARCELID to execute. records there will break it.
To do this you need to perform a topological sort, where the triangles are the nodes of the graph and the edge-adjacency provides the graph edges. Since you know the graph is a single line, the sort actually devolves into finding a node with only one other adjacent triangle, and then traversing the graph visiting all the other triangles in turn.
The unit for calculated area is square unit of whatever the linear unit is. check the properties of your polygon. there you can figure out the linear unit of the layer.
You could try only doing the Within() test against points that are within the polygon features envelopes, i.e. def PointsInPolygons(pointsLayer, polysLayer): nbInside = 0 polyFeat=polysLayer.GetNextFeature() while polyFeat: polyGeo = polyFeat.GetGeometryRef() pointsLayer.SetSpatialFilter(polyGeo) #<----Only test points within ...
You could add a field to your polygons and fill with some random but traceable value. Then do a Spatial join with the points, and all the points residing within a specific polygon will get the corresponding value. Not sure if this will be any faster, but at least it's an alternative approach.
What you need is a Point-In-Polygon test, which is a standard algorithm and has been covered extensively in other sources. See here or here or even this post here on GIS-SE
For PostGIS and SpatiaLite use ST_LineMerge (in Oracle Spatial it is something similar like ST_LineMerger). ST_LineMerge is different to a simple union operation in that it does not consider the order of the vertices (as stored in the database) but returns a linestring where the lines are joined topologically. This avoids unwanted jumping back and forth. ...
I'm not familiar with this software so I downloaded it to have a look. A couple of things: Do you have the latest version of this software? Do you have a paid license for this software? If so, perhaps the developers have an answer for you. Maybe you could try changing the spatial type at the bottom right of the conversion dialog box. See below:
First and last points have only two coordinates, while other have four. (note the separation of numbers by commas vs. spaces) This is most likely the cause of the problem
Top 50 recent answers are included