Tag Info

New answers tagged

7

You can do it via the geography type, using a geography index, or via the geometry type with some math to adjust for distortions in mercator. With geography: CREATE INDEX gb1900_geog_idx ON gb1900 USING GIST (geography(the_geom)); CREATE TABLE newtable AS WITH c AS ( SELECT a.cartodb_id, count(*) FROM gb1900 a, gb1900 b WHERE ...


1

Convert points to individual lines using Points to Line (Data Management). Place points along the line at regular interval. To do so you might use linear referencing, alternatively search this site, something will pop-up. Calculate distance for each point along the line (Chainage in below table) . Search this site, let me know if fail, I’ll post script or ...


0

Assuming the two points are on the the curve, you can use the QueryPointAndDistance on both points, get the difference and that is what you looking for. Public Function distancebetweenTwoPoints(pPolyline As IPolyline, pPoint1 As IPoint, pPoint2 As IPoint) As Double Try Dim distancetoPoint1 As Double = 0 Dim distancetoPoint2 As Double ...


1

Merge your old and new feature classes into one, then, using the Points to Line tool, input your merged table, and use the common field as the "line field"


2

How about partitioning your space into 9 regions and imposing the equal distance criteria separately in each. For example, For line segment #1, partition the space into 3 regions Points whose projection along the line segment normal actually fall on the line segment. Call it C1. Points whose projection along the line segment normal fall to the left of the ...


0

Seems to me that you need to clip your road feature first using your polygons. Then begin the point selection process. Other thing to consider is how the road feature is drawn. Is it a polyline? Is a single feature? If you're trying to get only 1 point that is closest then you need to make sure the individual roads are 1 feature too. This would be so much ...


1

You can take an average of each pair of end points and draw a line between them. Say the left two points have ID 1 and 2, WITH t AS ( SELECT avg(ST_X(geom)) as x, avg(ST_Y(geom)) as y FROM test WHERE gid in (1, 2) ) INSERT INTO test (geom) SELECT ST_SetSRID(ST_MakePoint(t.x, t.y), 4326) FROM t; That creates a new point midway between ...


0

This is an old question (2 full versions of Ubuntu old; at least 4 'point' versions of QGIS old; several GB of Microsoft CRITICAL-security-hole-updates old). However as with the age-old question of why sheep are found in trees, it is a fair question - and one that in recent weeks has been much on my mind. What the OP seemed to be trying to create is a ...


3

The length of degree in north-south is about the same so you could use 1/110574 degree/meter as a factor. However, the farther to south or north you go the bigger the error is in east-west direction. For example, take these two shapes which have a 1 degree buffer in EPSG:4326 transformed into EPSG:32630 (UTM zone 30N). First one is from 40°N and the second ...


1

Thank you whuber, that helped. I made an ascii file to define the weights and then ran an weighted focal mean. Because it didn't work out in ArcGIS (there seemed to be something wrong with my txt file) I ran the whole process in QGIS (where the same txt file worked fine). I thus used the r.neighbours command, which is the QGIS equivalent of the focal mean ...


1

Thanks again @FelixIP, and I'd like to post my new answer Here, the independent variables include slope, elevation, precipitation,distance to roads, and distance to river, and all values are 0 to 100 after doing normalization. For normalization all the values to a range of 0 to 100, I used the Raster calculator tool in ArcMap 10.1 with this equation: ...


1

On second thought I decided to post my answer. Normalising variables, which solved an issue is not exactly GIS thing, however careful spatial variables selection for regression analysis is. I'd suggest caution with that many independent variables, because some of them aren't really independent, e.g. distance from 'river' and terrain slope. I've made a ...


0

Take a look at Route analysis if you have the Network Analyst extension. Input your stops, solve the route, the results will have distance and time values.


0

I managed to solve the problem by converting all of the coordinates to contain in the formula to SWEREF99TM before I calculated the closest point. Then, I converted the closest point found with the formula, back to WGS84. I used SWEREF99TM because it is a grid system, so the formula will work correctly. Note that this will probably not work outside of ...


0

This is a single, simple operation, requiring no iteration or complicated model. You are asking for the values of a weighted focal mean of the raster layer. To carry it out, you first define a weighted neighborhood in which you place the distance-based weights (whatever they might be). Using this neighborhood, you request a Focal Mean. When that operation ...


0

So let me understand... Under any scenario, you run through the entire chain for each village individually? You say it mostly works but has strange values sometimes? That you get 'different' results when run manually.. Hard to say.... I would run through 2-3 iterations and save all intermediary outputs and check that each stage is doing exactly what you ...


1

Here is another option: Use the Split Line at Point tool Splits line features based on intersection or proximity to point features. Open up the attribute table of the output layer of split line and create a new numeric field called "length" Right click on "length" field and and select Calculate Geometry, feature length


2

If the line you are talking about is indeed a route, then you can use the tool "Locate features along route" - This will give you the measures of the points. The next step I would export the table to excel and then you can use a formula to calculate the distance between each point. For example =B2-B1, then drag to the bottom.


1

Maybe you should re-save again your data (right click on the layer,save as).. this time make sure you change the crs which has distance unit (e.g wgs 84 world mercator - meter units). This new layer should have new distance unit. You can check again whether you already use the right crs through metadata (you can also use qgis browser)


0

Please feel free to try out our api. The TravelTime Platform. We allow 2 main events on our API (The TravelTime Platform) TimeFilter - allows you to receive time from one origin to 1000's of lat / lngs by any mode of transport in under a second. TimeMap - Show the catchment area by polygon - use for display or database search. enter link description here ...


0

The NNJoin plugin uses QgsGeometry.distance, which in turn uses GEOS. It should return the minimum distance: Returns the minimum distanace between this geometry and another geometry, using GEOS. So I am a bit surprised that NNJoin does not work as expected (as long as you do not choose to use approximate geometries). Are you using a non-projected ...


0

One way is to convert the creek distances to integer format if they are not already integers. For more precision you can multiply them by some larger value (a "scale factor") and round; later you can divide by that same value. Because the creek distances are integers, you can perform a Euclidean allocation (usually at the same time you compute the ...


3

you can't really convert convert distances in degrees into meters as the size of a degree varies as you approach the poles. convert your locations into a projected coordinate system, then calculate your distances.


2

As an approximation suitable for medium-small radii, use the cos() of the latitude to scale up the true distance to a "distance" that makes sense for your latitude in web mercator, as described here. SELECT * FROM mytable WHERE ST_DWithin( ST_Transform(ST_SetSRID(ST_MakePoint(%lon, %lat), 4326), 3857), the_geom_webmercator, %radius / cos(%lat * ...



Top 50 recent answers are included