texts: CRS does not match after upgrade to QGIS 2.2

texts:
QGIS project, which was saved in 2.0 has defined CRS for project as a whole and for each of the layers.

When I open the project in QGIS 2.2 and higher, one of the layers is shifted and does not match the rest of the project.

Changing CRS of that layer does not help and neither does exporting the layer in certain CRS and importing it again.

list of CRS:

project: EPSG 3857
shifted layer: EPSG 4326
the rest of the layers: EPSG 5221


texts: How to extract road line pattern from satellite images using Matlab?

texts:
Firstly we applied canny edge detection to the image, then detected lines using houghlines, then we got start and end points of the lines.

Then we applied delaunay triangulation and voronoi diagram for the points.

Now we need to get the skeleton of the pattern obtained.

Kindly tell me what technique should be used?

I am implementing in Matlab.

The final output we have obtained so far.https://docs.google.com/file/d/0B7W9pCpzX8fTSnQ3OE5FWlc0VzA/edit


texts: Merge Spatially Coincident Features in the Same Feature Class

texts:
I need a way to programatically merge grid cells (polygon 15x15m) that are directly on top of each other and add together some of their attributes.

I am working in ArcGIS 10.1 with the data stored as a polygon feature class.

The data is the result of pedestrian survey across a pre-defined grid.  On occasion the folks conducting the pedestrian survey get off course and record something in a column or row adjacent to the one they are working in (or the GPS position wanders).  This results in two sets of data being recorded for each cell when the data from multiple GPS units are appended into a single feature class.  I need a way to go through each cell, check to see if there are any duplicate features, if there are then merge their attributes (some integer, some text), and then delete the one feature that didn't get the merged data.

The 'Delete Identical' and 'Find Identical' tools don't do what I'm looking for - and doing it manually isn't an option as the feature class often has upwards of 10,000 features in it.

I know how to iterate through the feature class using python and check to determine if there are any duplicate features in that location.  What I don't know how to do is deal with merging the features and updating the attributes.  If anyone can offer some direction on how to accomplish this I would greatly appreciate it.

EDIT - More Description of Before/After State:
In the picture below there are two features selected - identical 15x15 meter square polygons, I need to add together all the integer fields (the ones with TOT_ as a prefix) and append the GPS_UNIT, INITIALS, and REC_DATE string fields.

It's difficult to show since the features directly overlap.

EDIT 2:
I have found that I can easily identify the duplicated features by calculating their XY centers, concatenating them into a string field as [X] & ',' & [Y] then opening the database in access and using a Find Duplicates query to identify which of the cells have been duplicated.  I have not however, been able to figure out a good way to merge the attributes for each of the cells into a single row.  Help with how to do that, either in python or in a database environment, would be very welcome!


texts: Creating population weighted spatial join of two layers with intersecting polygons using ArcGIS Desktop?

texts:
I have data where I sampled my outcome using a grid of 1-mile radii but my explanatory variables are at the census dissemination area level.

I would like to average my census dissemination area-level characteristics for each 1-mile radii. However, I would like this to be population weighted.

The census dissemination area level data has a variable that measures population.

Is there a way in arcGIS to create a population weighted average of the dissemination area level data for those DAs which intersect with each 1-mile sampling areas?


texts:
I have a large set of hires GeoTif images.
I am trying to build a .mbtiles database of these images. However, using gdalbuildvrt and osgearth_conv makes me hit a wall. I have also tried using gdalwarp with various compression options, to build one large geotiff that I serve to osgearth_conv instead of a virtual .vrt set. Same result, unreasonable processing time.
So, I am trying to work around the problem by creating multiple smaller .mbtiles databases and then merge them. But I am doing something wrong. The result is not smooth.

I went about doing the merge by using DB Browser (SQLite) and inserted tiles by:
PRAGMA journal_mode=PERSIST;
PRAGMA page_size=80000;
PRAGMA synchronous=OFF;
ATTACH DATABASE 'C:\pathto\database.mbtiles' AS source;
REPLACE INTO tiles SELECT * FROM source.tiles;

Then, I changed the bounds metadata accordingly:

bounds -5.39167,52.1156,33.2851,67.9002

The profile metadata remains the same.
Am I going about this the wrong way?


texts: Cutting OSM roads in sections using PostGIS

texts:
I define a section by a part of a road that has no intersection. See image below:

I'd like to extract all sections from all the roads of my PostGIS database. This GIS database was created with osm2pgsl:

               List of relations
 Schema |        Name        | Type  |  Owner
--------+--------------------+-------+----------
 public | geography_columns  | view  | postgres
 public | geometry_columns   | table | gis
 public | planet_osm_line    | table | postgres
 public | planet_osm_nodes   | table | postgres
 public | planet_osm_point   | table | postgres
 public | planet_osm_polygon | table | postgres
 public | planet_osm_rels    | table | postgres
 public | planet_osm_roads   | table | postgres
 public | planet_osm_ways    | table | postgres
 public | spatial_ref_sys    | table | gis
(10 rows)

I've read an interesting post about detecting the intersections but I can't figure out how to create a table with sections.

Any help appreciated.


texts: Openlayers specific: select a 'real centroid' point in a polygon that is always inside the polygon. Example L-shaped polygon

texts:
In Openlayers 5+, how can I calculate the centroid of a polygon that is always inside the polygon?
It really doesn't matter how accurate the point is, as long as it is sufficient in the center of the polygon.
I know there are solutions for QGIS, but I need one for Openlayers v5+.


texts: Projection problem when opening a .netcdf file on qgis

texts:
I am working with GPM(Global Precipitation Measurement) satellite data which are in .netcdf format. When I open the data in qgis it is in a different projection and I can not overlap the shape for the region I am trying to analyze.
How can I solve this?

The link to download the data is: https://disc.gsfc.nasa.gov/datasets?keywords=GPM%20DPR&page=1
Product:'GPM DPR Precipitation Profile 1 Day 0.25 degree x 0.25 degree V05 (GPM_3DPRD.05)'
In the metadata:
lat.resolution = 0.25
lon.resolution = 0.25
NorthBoundingCoordinate = 67
SouthBoundingCoordinate =-67
EastBoundingCoordinate = 180
WestBoundingCoordinate=-180

The option that I selected was 'precipRateNearSurfaceMean'.

CRS-GPM_3DPRD.05 file: Undefined;
CRS-Shapefile: SIRGAS 2000, EPSG:4674


texts: PyQGIS layer intersection area seems really inaccurate

texts:
Using 3.10.1-A Coruña on Windows 10

I have a layer of Public Hospital Networks PHN and I have a layer of zip/ postcodes POA

I want to find what percentage of a zip/ postal code is in a PHN ParentLayer

I'm using the following code but the intersecting percentage seems way off. It says 4% but from eyeballing it should be 40-60%.

Percent in Parent Region:  4.242022210197979e-15

I tried intersection().asPolygon().area() but that failed and searches suggested I need to try Multiparts to Singleparts, which I tried, but still gave the same error.

I checked if I had Valid Polygons and everything indicated OK.

I Frankensteined the code below from Calculating and using area of polygons in PyQGIS? and Calculate percentage overlap of polygons in WGS84

output_file = open("D:\\Folder\\Intersection.csv", 'w')
# POA, ParentRegion, IntersectionResult, IntersectionPercentage

layer_list = QgsProject.instance().layerTreeRoot().children() # returns QgsLayerTreeNode object list

POA_Layer = [lyr.layer() for lyr in layer_list if lyr.name()=="  POA_2016_AUST"][0]
ParentRegion_Layer = [lyr.layer() for lyr in layer_list if lyr.name()=="  PHN_boundaries_AUS_May2017_V7"][0]

print("POA layer", POA_Layer)
print("Parent layer", ParentRegion_Layer)

d = QgsDistanceArea()
d.setEllipsoid('WGS84')
#d.setEllipsoidalMode(True)

# single features for testing
POA_Query = '"POA_CODE16" = \'2157\''
POA_Features = POA_Layer.getFeatures(QgsFeatureRequest().setFilterExpression(POA_Query))

ParentRegion_Query = '"FIRST_PHN_" = \'PHN103\''
ParentRegion_Features = ParentRegion_Layer.getFeatures(QgsFeatureRequest().setFilterExpression(ParentRegion_Query))

# the big loop
for POA_feature in POA_Features:
    POA_Geom = POA_feature.geometry()
    POA_Name = POA_feature.attribute('POA_NAME16')
    print("POA name: ", POA_Name)
    print("POA area (Km2):", d.convertAreaMeasurement(d.measureArea(POA_Geom), QgsUnitTypes.AreaSquareKilometers))

    for ParentRegion_feature in ParentRegion_Features:
        ParentRegion_Geom = ParentRegion_feature.geometry()
        ParentRegion_Name = ParentRegion_feature.attribute('FIRST_PHN_')
        print("Parent name: ", ParentRegion_Name)
        print("Parent area (Km2):",
        d.convertAreaMeasurement(d.measureArea(ParentRegion_Geom), QgsUnitTypes.AreaSquareKilometers))

        if POA_feature.geometry().intersects(ParentRegion_feature.geometry()):
        print ("Intersection detected")

        intersection = POA_feature.geometry().intersection(ParentRegion_feature.geometry())

        if ParentRegion_feature.geometry().contains(POA_feature.geometry()):
            print (POA_Name + " is fully enclosed by " + ParentRegion_Name)
            # csv output
            output_file.write(POA_Name + "," + ParentRegion_Name + ",FullyEnclosed, 100")
        else:
                intersection_area = d.convertAreaMeasurement(POA_feature.geometry().intersection(ParentRegion_feature.geometry()).area(), QgsUnitTypes.AreaSquareKilometers)
            # ERROR BELOW: GeometryCollection geometry cannot be converted to a polygon. Only single polygon or curve polygon types are permitted.
            # intersection_area_polygon = POA_feature.geometry().intersection(ParentRegion_feature.geometry()).asPolygon().area()
            print ("Intersection area: ", intersection_area)
            print ("Percent in Parent Region: ", (intersection_area/d.measureArea(POA_Geom)*100))
            # csv output
            output_file.write(POA_Name + "," + ParentRegion_Name + ",Percentage, " + str(intersection_area))
    else:
            print ("There is no intersection")
            output_file.write(POA_Name + "," + ParentRegion_Name + ",NoIntersection, 0")

output_file.close()


texts: Pre-Processing of Sentinel-1 data using Python snappy API

texts:
While applying 'Apply-Orbit-File' to Sentinel-1 data during preprocessing via python snappy, the following error produced.
    Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    apply_orb_filter(product)
  File "D:\Satya\PyScripts\snappy_v1.py", line 74, in apply_orb_filter
    output = GPF.createProduct('Apply-Orbit-File', parameters, source)
RuntimeError: org.esa.snap.core.gpf.OperatorException: qc.sentinel1.eo.esa.int

The code is as follows
def do_apply_orbit_file(source):
    print('\tApply orbit file...')
    parameters = HashMap()
    GPF.getDefaultInstance().getOperatorSpiRegistry().loadOperatorSpis()
    parameters.put('Apply-Orbit-File', True)
    parameters.put('polyDegree','3')
    parameters.put('orbitType','Sentinel Precise (Auto Download)')
    parameters.put('continueOnFail','false')
    output = GPF.createProduct('Apply-Orbit-File', parameters, source)
    return output

I suspect that I have set 'orbitType' Auto Download in parameters, but my internet is running behind a proxy server. Do I need to set proxy for 'Auto Download' or something else? If I need to set proxy then how do I include in the code?


texts: Adding rasters to mosaic dataset from CSV list using ArcPy?

texts:
I have a CSV list containing paths to 800 TIFF files that I want to add to a mosaic dataset.

So using the Add Rasters to Mosaic Dataset tool, I need to create a loop which changes the input_path variable based on a list derived from the CSV. The CSV paths are formatted as follows -

D:\Docs\111\Name_of_Raster.tif

Looking at the documentation (https://pro.arcgis.com/en/pro-app/tool-reference/data-management/add-rasters-to-mosaic-dataset.htm), I've copied the stand alone script and converted the CSV to a Python list but am lost how to actually link the two together.

import arcpy,os,csv

arcpy.env.workspace = 'D:\'
md = 'D:\Map.gdb\Mosaic'

with open('D:\Mosaic_list.csv') as mosaic_csv:
        reader = csv.reader(mosaic_csv, delimiter=' ', quotechar='|')
        mosaic_list = list(reader)
        print(mosaic_list)

for row in mosaic_list:
    arcpy.AddRastersToMosaicDataset_management(in_mosaic_dataset = md, raster_type = 'Raster Dataset',  input_path = row)

The above code results in - ERROR 000732: Input Data: Dataset Path does not exist or is not supported.

Is my approach correct or am I looking at this the wrong way?


texts: Transactions in Geoserver / WFS - Is it possible to know which "action" failed?

texts:
I'm trying to implement transactions for some queries to Geoserver. I'm using plain HTTP Post to make the requests, from Java.

One of those queries looks something like :

<wfs:Transaction service='WFS' version='1.0.0'
    xmlns:wfs='http://www.opengis.net/wfs'
    xmlns:gml='http://www.opengis.net/gml'
    xmlns:ogc='http://www.opengis.net/ogc'
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xsi:schemaLocation='http://www.opengis.net/wfs
                        http://schemas.opengis.net/wfs/1.0.0/wfs.xsd'>
    <wfs:Insert>
       [[FEATURE_TO_INSERT_1]]
    </wfs:Insert>
    <wfs:Insert>
       [[FEATURE_TO_INSERT_2]]
    </wfs:Insert>
    <wfs:Insert>
       [[FEATURE_TO_INSERT_3]]
    </wfs:Insert>

</wfs:Transaction>

If all three inserts succeed, they are commited. If one fails, none are commited and something like this is returned :

<?xml version="1.0" ?>
<ServiceExceptionReport
   version="1.2.0"
   xmlns="http://www.opengis.net/ogc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
   <ServiceException>
      java.lang.RuntimeException: Parsing failed for DIAMETRE: java.lang.NumberFormatException
Parsing failed for DIAMETRE: java.lang.NumberFormatException
null
</ServiceException></ServiceExceptionReport>

This is fine, but I'd like to know which one of those three inserts actually failed!

Is there a way to give each action of the transaction an id, and make Geoserver output it somewhere in the returned ServiceExceptionReport so I'm able to identify which action the error is related to?

Update : I'm currently using WFS 1.0.0. Maybe there are more options for transactions with a newer version?


texts: How to classify a continuous Raster using Mapinfo

texts:
I have a continuous raster and i want to classify it into a raster with 10 classes. So the min and max of the raster is suppose 0-100. I want to create 10 classes like 0-10, 10-20.....90-100. How to do that in Mapinfo?

I have heard that Mapinfo has added new Raster capabilities.
So if someone can help?


texts: Add new attribute in GeoJSON from PostGIS

texts:
I got this code below on web to solve my problem (from here [ How to Export Feature GeoJSON from PostGIS ]). Basically this code get my PostGIS table and transform to GeoJSON. It is what I needed. Now I need to increment the code, however I cannot. I tried search on web, but without success.

The increment that I would like to do is to create a new "key" called "tags", with the tags of my table node that they are in other table, called node_tag.

This is the original PostGIS code:

SELECT jsonb_build_object(
    'type',     'FeatureCollection',
    'features', jsonb_agg(feature)
) AS row_to_json
FROM (
    SELECT jsonb_build_object(
        'type',       'Feature',
        'geometry',   ST_AsGeoJSON(row.geom)::jsonb,
        'properties', to_jsonb(row) - 'geom' - 'visible'  -- what attributes don't appear
    ) AS feature
    FROM (
        SELECT * FROM node As p
        WHERE p.id = 1
    ) row
) features;

The code above generates this GeoJSON:

{
    'row_to_json': {
        'features': [
            {
                'geometry': {'coordinates': [[0, 0]], 'type': 'MultiPoint'},
                'properties': {'id': 1, 'visible': True},
                'type': 'Feature',
            }
        ],
        'type': 'FeatureCollection'
    }
}

This GeoJSON is good for me, when I don't need the tags, but now I would like to put the "tags" key...

The code to get the tags of a node, when node fk_node_id=1 is this:

SELECT id, k, v FROM node_tag WHERE fk_node_id = 1;

With base of the codes above, I can get the tags, for example:

SELECT jsonb_build_object(
    'tags', jsonb_agg(tags)
    ) AS row_to_json
FROM (
    SELECT to_jsonb(row_tags) - 'version' - 'fk_node_id' AS tags -- what attributes don't appear
    FROM (
        SELECT * FROM node_tag As pt
        WHERE pt.fk_node_id = 1
    ) row_tags
) features;

It generates this GeoJSON:

{
    "row_to_json": {
        "tags": [
            {"fk_node_version": 1, "k": "name", "id": 1, "v": "house"},
            {"fk_node_version": 1, "k": "building", "id": 2, "v": "yes"}
        ]
    }
}

The problem is... I would like to put the both GeoJSON together. It is what I am trying to do, but I can't. I would like a GeoJSON similar with this:

{
    'row_to_json': {
        'features': [
            {
                'geometry': {'coordinates': [[0, 0]], 'type': 'MultiPoint'},
                'properties': {'id': 1, 'visible': True},
                'type': 'Feature',
                'tags': [
                    {'k': 'name', 'id': 1, 'v': 'house', 'fk_node_id': 1},
                    {'k': 'building', 'id': 2, 'v': 'yes', 'fk_node_id': 1}
                ]
            }
        ],
        'type': 'FeatureCollection'
    }
}

Someone have any idea?


texts: Create polygons convex hull with arc basic

texts: I have a bunch of polygons to make from points that need to be more precise than the min bounding box of closest rectangle or circle but don't have an advanced license. Does anybody have a workaround for this? I'm using ArcMap 10.2.2.


texts: Debugging arcpy LasDatasetToRaster_conversion error 999999?

texts:
I have 40+ LAS Datasets (.lasd) that I am attempting to convert to rasters.

Here is my code:

import arcpy
import os
arcpy.env.workspace =r'F:\Shorelas'
arcpy.env.overwriteOutput = True
env = r'F:\Shorelas'
for x in os.listdir(r'F:\Shorelas'):
    if x[-4:] == "lasd":
        arcpy.LasDatasetToRaster_conversion(os.path.join(env,x),x[:11],sampling_value=.2)

It creates the first raster then throws this error:

Traceback (most recent call last):
  File "<string>", line 254, in run_nodebug
  File "C:\Users\Dave\Desktop\lastoraster.py", line 10, in <module>
    arcpy.LasDatasetToRaster_conversion(os.path.join(env,x),x[:11],sampling_value=.2)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\conversion.py", line 2522, in LasDatasetToRaster
    raise e
arcgisscripting.ExecuteError: ERROR 999999: Error executing function.
Failed to execute (LasDatasetToRaster).

Not sure whats wrong with my code


texts: How to serve a PostGIS based web-mapping app on shared web-hosting

texts:
I am an unexperienced-in-web GIS enthusiast trying to figure out the fundamental principles of web-mapping. So far, I've learned everything from the scratch with help of answers I got here an there.
Actually my problem is similar (maybe the same as) to this one.

My online data presenting through a web-site experience is just about uploading the data through ftp connection. Geojson worked perfectly so far, as it is possible to upload it to the server with no problem.

However, the data I am working with gets bigger and bigger. So I need to start working with databases. At that point, as far as I can see, the services like Carto etc. which have built-in PostGIS abilities stand there for exactly that purpose. So that, one can upload his data there and then use it with leaflet, openlayers so on.However I don't like to be dependent on a service like that.
I want to handle everything by myself, after that I prepared everything on a local server with PostGIS database, I would like to put everything necessary up in the hosting such as the shared web-hosting of GoDaddy.

Is there a way to do that? Or do I have to register to a service like AcuGIS? Is not there a way around?


texts: ArcGIS 10.1 Model cannot be transferred between Win7 and Win8 machines

texts:
We created a model (created in a file geodatabase) using Model Builder on a trial version of ArcGIS 10.1 (build 3035, License: Advanced). We are trying to now run it on a registered (build 3134, ArcMap 10.1, ArcGIS 10.1 for Desktop SP1, License: Basic, ) version of ArcGIS 10.1 on another computer, but when we try to open it by right-clicking and selecting edit on the model it displays only the outlines of the tool-shapes within the model. We can't open the different modules of the model or anything to be edited. All the model does is calculate fields, so I was not expecting the basic license to be an issue. The same issue occurs when creating a model with the Basic registered version and trying to open it on the trial version, which leads me to think that this is an issue of transferring between computers, rather than a license-related issue. I changed the permissions on the .gdb folder to "full control" for everyone on the network to rule out permissions as an issue. The datasets in the model itself can be opened, but the actual tools (such as "Field calculate") are cannot be accessed. Could it be that the model is trying to reference, for example, the "field calculate" tool on the host computer with the wrong path??

Any ideas what the issue is?

Any help would be greatly appreciated!


texts:
I'd like to use Arabic text in my map. I saw this post earlier about Cyrillic text (Does CartoDB support alphabets other than Latin?), but does anyone know about Arabic?

Thanks!


texts: Building Addins using common environment for ArcGIS 10.4 and 10.0?

texts:
I have an addin for ArcGis 10.0. This addin is developed in following environment:

Visual studio 2010 ,
ArcObjects sdk for 10.0 (arcgis)

When I want to use same addin on ArcGis 10.4 version, it does not work. Then I build
my code on :

Visual studio 2015 community edition,
ArcObjects sdk for 10.4 (arcgis)

and it works fine.

Now, I want to know, is there any common environment where I build my code and run in both version of arcgis (10.4 and 10.0)?


texts: Extract a point very close to end point of a line in ArcGIS?

texts:
I want to extract a point (red star below) on a line very close to the end (and/or start) point of that line, but not the end itself, so that it is a point not intersecting an end asset point (black circle). I thought the easiest way to do this would be to shorten the line by a given length (say 1cm), then extract the end points. Is there a tool to do this in ArcGIS? The tool would be something similar to the snipper tool in FME.

I was looking for a solution that doesn't involve scripting like this question.


texts:
I'm working in a web map based in QGIS server and Qgis Web Client 2(QWC2).

based on the documentation in github (https://github.com/qgis/qwc2-demo-app/blob/master/doc/QWC2_Documentation.md#quick-start) to add a new projection we need to add a new line in appConfig.js file using this comand Proj4js.defs(, );

based on this i add the line below in the file, as you can see in the image

Proj4js.defs('31983','Extent: -48.00, -33.50, -42.00, 5.13
Proj4: +proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs');

and after that i got a white web page.
i've tried to edit the BottomBar.jsx and the CoordinateUtils.js but none of it have worked too.


texts: Measuring distance between points in one layer and related points in a different layer in QGIS

texts:
I have two point layers. One of biological records which has an attribute field for the SiteID that the species has been found at. The second layer is a Sites layer with a centroid location for that site. I want to find the distance between each record and the centroid of its linked site to check for bad georeferencing i.e. the larger the distance, the more likely that the record has been given a bad location.
I was trying to use the Field Calculator in QGIS using the following algorithm:
shortest_line($geometry, geometry(get_feature('Sites', 'id', "SiteID")))

Where "SiteID" is the field in the Records layer that has the ID of the site I want to measure the distance between the record and the site centroid. But this is not working so I think the problem is how I have entered the field in the Records layer that contains the ID to look up in the Sites layer.
Can anyone help please?


texts:
I have a binary raster (0s and 1s) that I need to query given a set of point coordinates.  This is easy enough to do with gdal (gdallocationinfo), but where it get's complicated is that I also need to return the sum of the 8-cell neighborhood.  Is there an easy way to do this without processing the entire map?

In GRASS the only way I can think to do this is to use r.mapcalc to return a sum of the cell I'm interested in and then change the value of all other cells to 0.  This allows me to compute an aggregate sum for the map with r.sum.  But this requires a great deal of processing and if I need to do this for hundreds of points, the task becomes enormous.

Ideas?


texts: Feature dataset containing road network editing issue

texts:
I have created a feature dataset in a enterprise geodatabase. I then imported roads layer and built the topology to check issues and then created a road network. Everything is working fine until I needed to edit the roads layer. Now I am facing a very strange issue. When using the following edit settings:

I am getting the following message

If I use the the following setting

I am getting following message.

Either way I am unable to start the editing. I have the editing rights on this schema.
How can I start editing?

I am using ArcMap 10.6.1
We are using Oracle for sure. About version of database I am not sure -- either it is 12c or 11g


texts: Why do the maximum of the value change when I use set null function in ArcMap

texts: I want to set null to the value<=0 using the raster calculator in ArcMap, but after that, I got a new raster with a changed maximum value. Is there any problem with my setting? How to keep the other value (e.g. maximum value) the same but set null to value<=0? please see the attached screenshot.


texts: Extending line by adding point at end of it using QGIS?

texts:
I'm using QGIS 2.8 to modify a line. I need to add a point on one end of this line, and then move this new point further away, leaving the original end point in the same place.

I can manage to create a new point at the end of the line by:

entering Settings > Snapping options
setting "Snap to" "To Vertex"
setting a "Tolerance" that's > 0
selecting the layer and clicking "Toggle Editing"
selecting the "Node Tool"
double clicking on the end of the line

And here's the problem. When I try to move the point I just created, I move the old line end instead.

Here's what happens, in pictures.

I want the old line end to stay there, untouched (same coordinates as before), while I want the new point I added to be moved. Instead, the opposite is happening.


texts: I use QGIS in my daily work, but since a few months back I'm unable to do this due the OpenLayers plugin no longer being functional. When I try to load a background map nothing happen - the canvas remains white. I have tried it on several computers and the same problem occurs. I use the latest version of QGIS (Lyon).


texts: small difference in projection between tilemill and postgis

texts:
I would like to create a world map with interaction on continents created directly from a postgis database.

For the moment, I have a POSTgis database with the data.
I created a background with TileMill.
I get data from Postgis in SVG and put them on the map using Raphael.

All seem well except that I have a small difference between both map :s
I use default projection of TileMill (and I think we can't change it :)).
And here is the POSTGIS command I'm executing to get the SVG:

SELECT st_asSVG(
      st_scale(
          st_translate(
              St_Intersection(
                  ST_Transform(ST_SetSRID(ST_GeomFromText('POLYGON((-151.875 80.6470,175.7812 80.6470,175.7812 -63.2336,-151.875 -63.2336,-151.875 80.6470))'), 4326), 3857),
              (SELECT st_union(geom) FROM geo.continentboundaries))
          , 20037508.72, -20037508.72)
      , 0.0000199043047125,0.0000199043047125)
    , 0, 0)

Here is the result:
http://i.stack.imgur.com/7lS0F.png

Do you know where I have a mistake?

Edit: some precisions: I'm using the same data for Tilemill and the svg. I added in the tilemill project the example of tilemill there is no problem of projection. In the layer in tilemill I'm using 900913. st_srid give me 3857 in Postgis which seems ok? I'm a beginner in SIG


texts: openlayers vector layer annihilating browser

texts:
I am trying to render a layer with polygons so that I can utilise the snap-to feature in openlayers.
This layer has got a lot of data, I had assumed utilising the strategy: ol.loadingstrategy.bbox would limit what it is trying load but it seems strange that at 1:4K it needs to download 78meg before assassinating my browser tab.

Any tips on getting this to work?

new ol.layer.Vector({
            title: 'topo',
            visible: true,
            renderMode: 'image',
            source: new ol.source.Vector({
            format: new ol.format.GeoJSON(),
                url: function(extent) {
                    return "site.com?typeName=my:layer&service=WFS&version=1.0.0&request=GetFeature&outputFormat=application%2Fjson";
                },
                params: {layers: "my:layer"},
                strategy: ol.loadingstrategy.bbox,
                crossOrigin: "Anonymous"
            }),
            style: new ol.style.Style({
                stroke: new ol.style.Stroke({
                    color: '#f00',
                    width: 1
                }),
                fill: new ol.style.Fill({
                    color: 'rgba(255,0,0,0.1)'
                })
            })
        })


texts: How to identify start flags in trace geometric network resultst?

texts:
I am using the Trace Geometric Network Tool (10.5.1) in conjunction with the HEM tool from USGS in order to import an existing point layer as my "flags". This works really well to save time in setting the flags by hand (I am interested in finding upstream flowlines of a polygon layer -- so I intersected the polygon layer with the flowlines to create a point layer where each polygon intersected with streams).
The problem is, when I run the upstream analysis, I do have resulting upstream flowlines selected, but there is no field that references the initial flag layer. I need this in order to distinguish what the flow-line is upstream of, as I have several polygon features in my layer. It would be very cumbersome to run the upstream analysis for each polygon separately. Is there a way to save an attribute of the initial flag layer to join in final results table?


texts: Join / merge lines that touch and intersect in QGIS

texts:
I have a large dataset consisting of lines/polylines where I would like to join/merge the lines that touch / intersect. Each line has an individual ID and there are no common attributes I can use for a join operation. Is there a way to (spatially) join lines into segments of touching lines?

Screenshot of a selected line in a line segment (current situation):

It can be done in ArcGIS according to this post (link) among others.

FYI, the dataset is an extract from a pipeline network and I will examine which line segments that cross the most properties / parcels of land.

I'm using QGIS 2.14.0. I have no experience with python or GRASS yet.


texts: Using Python Script to change Pie Chart Symbology

texts:
I am trying to change the symbology for Pie chart in ArcGIS.

I have a feature class which is joined to a table and I will like to symbolized as a pie chart. I will be symbolizing it a lot thus I am looking for an automation ways to do this task. Map Layer does not work in this case.

I am very new to Python Scripting and I am wondering if there is there a way to add symbology using Python Script?


texts: Shapefiles source set-up everytime in mxd ArcMap project?

texts:
I have a folder where there is an (mxd file + another folder containing some shapefiles I work on). I am exchanging this folder with a group of users. We work together on a project, and everytime a user wants to open it he gets those red exclamation marks and has to set-up a new shapefile source.

Is there a way to make ArcMap recognise automatically this source ?

It's becoming frustrating to change the source every time.


texts: Filter (no display) layers in GeoExt.LegendPanel with names LIKE some pattern

texts:
This works to avoid Basemap layers such as Google Maps and overlays such as WMS to appear in the GeoExt Legend Panel:

var legendPanel = new GeoExt.LegendPanel({
    border: false,
    filter: function(record){
        if(!(record.getLayer().isBaseLayer) && (record.getLayer() instanceof OpenLayers.Layer.WMS)){
        return true;
        }
    } });

The problem is that I need to filter (ie. no display) layers with names having "beam" in their names, I tried with no success this:

return record.getLayer().displayInLayerSwitcher == false && record.getLayer().name == '%beam%';
return record.getLayer().displayInLayerSwitcher == false &&
record.get("layer").name.indexOf("%beam%") == -1;
return record.get("layer").name.indexOf("%beam%") == -1;


texts: How to remove slope from DEM to better visualise topographic features of vriver systems in QGIS

texts:
0

I have a DEM of a river channel that i would like to remove the overall slope but retain features such as pools, riffles, bars etc. I have used the River Bathymetry Toolkit (detrending tool https://sites.google.com/a/essa.com/rbt/bankfull-centerline-tools/detrend-tool) in arcgis before but would like to know if there is a similar pluggin for QGIS or an alternative method.

I want to be able to show these features relative to their immediate landscape rather than getting lost in the overall slope of the DEM when i add a colour ramp.

In the first image you can see i have added a colour ramp to the DEM however because there is an elevation difference of ~30m top>bottom, topographic features such as pools'riffles are hard to see (second image)

I have looked online but can't find a solution.

Thank you for reading my question


texts: Finding valves to turn off for water line using ArcMap?

texts:
I am wondering if there is a tool for ArcMap that can do what I am about to describe. It might be in network analysis but I am not sure. I have used water gems but it does not do what I want it to do.

Lets say I have a network of water lines.  These water lines all have valves.  Now, lets say I have to fix a certain spot on one line and I need to know all the valves that needs to be turned off to shut off the water to that line so the men can work on that line.

How can this be done?

What would be nice is that I am able to chose the line and point where the breakage is located and it tells me all the valves that need to be turn off to stop the water.

Any idea if there is a tool like that already or even how could we do this with ArcObjects of Python?


texts: Batch reprojecting large number of MODIS files

texts:
I am currently trying to reproject a large number (~14.000) of .hdf - files from MODIS Aqua/Terra from MODIS sinusoidal to something more popular (e.g. WGS1984). The files can be obtained from LAADS. The specific product I am interested in is "MOD04_3K - MODIS/Terra Aerosol 5-Min L2 Swath 3km" from Terra and "
MYD04_3K - MODIS/Aqua Aerosol 5-Min L2 Swath 3km" from Aqua.

So far, I have tried the following:

reprojecting using ArcGIS (does not give desired results)
MODIS Reprojection Tool (does not support swath files)
MODIS Reprojection Tool Swath (does not support the specific product)
HEG Tool (does work for one file, however, throws "Error: Null not found.", when trying to batch convert).

I also tried to manually batch process the files using an online tutorial, which left my with an empty output folder. I also tried the R packages MODIStsp, which does not seem to support the specific product I need.

Two example files can be found here: CLICK

Does anyone have experience with that specific product or other ways to batch reproject .hdf-files?


texts: Definition Queries for most recent date in ArcGIS Pro

texts:
I have a feature class containing sample results for locations that includes thousands of records. Many of these are overlapping and have the same location ID. I need to label each sample based on the most recent sampled date for each unique location ID. Is this possible using a definition query?

I'm using ArcGIS Pro.


texts: How to have a nullable field included in a shapefile using the Geotools library?

texts:
I am trying to add a new field to a shapefile and need it to store null values. But by using SimpleFeatureTypeBuilder from the Geotools library and then using the Add command, it is not giving the desired result: it just creates a field that can not contain null values.

Please help.


texts: Splitting a string field that contains time information

texts:
I have a text field within a FGBD that contains a date/time and I need only the time as a string.

'yyyymmdd HH:mm:ss'

And I need:

'HH:mm:ss'

I've tried .rsplit but I'm not using it correctly. I thought this would split where the space is located (between the date and time):

arcpy.Calculatefield_management(fc,"time",!DATE!.rsplit())

But this returns the whole string


texts: ArcGIS Data Reviewer Regular expression to limit the number of characters (Text Length) in a field

texts:
Using ArcGIS Data Reviewer  on top of ArcMap 10.5, I am trying to write a regular expression in table checks that will only allow  5 characters or Less in a field otherwise the value should be reported as an error.

For Example:

abcDe value is ok

abc        value is ok

AB  value is  ok

abcdefg  value is NOT ok

What I have so far looks like this:

   \a{0,5}

Unfortunately  this is not working (returns all the values in the attribute table) since data reviewer doesn't handle {} "Curly brackets"

What other  options might I have i.e. how do I set a regular expression that returns the unmatched  values if the characters  exceeded a certain length.

@ahmadhanb provided Python script that works fine in Field calculator.

But I am looking forward doing this in Data Reviewer R.E as a part of batch checks, unfortunately DR doesn't take  python scripts.

The Script provided by ahmadhanb:

def check(f):
  import re
  try:
    pattern = re.compile(r"[A-Za-z][A-Za-z]-[A-Za-z][A-Za-z]-(\w+)-([A-Za-z]
    [A-Za-z][A-Za-z])")
    match = pattern.search(f)
    id = match.group(1)
    if len(id) <= 8:
        return "Valid"
    else:
        return "Project Name more than 8 Characters"
  except:
        return "Project ID Doesn't match the Expression"


texts:
I have to transform Gauss Kruger coordinates to WGS84 in my software application. I'm using the Java library of PROJ4 to do that.

For Gauss Kruger, I always use EPSG:31466 and for WGS84 EPSG:4326. When I compare my transformations with the results of some online coordinate transformation tools, I realized that for points outside EPSG:31466 (Gauss Kruger zone 2) I get different results.

Given only the Gauss Kruger coordinates, how can get the same results as the online tools?

Is this possible without additional information?

I have no experience with coordinate systems.


texts: Need to connect ArcSDE dataset using QGIS Desktop and Oracle database

texts:
I am working in GIS domain using ESRI technology. I want to use QGIS desktop to access ArcSDE dataset from a local machine. I have already installed Oracle Client 10g and QGIS Desktop 2.8.1 through network installer of OSGeo4W. But I am unable to connect to the Oracle database and ArcSDE dataset("Driver Not loaded" error is coming).
Kindly suggest me about the software requirements, installation process, plugins required, new Oracle database and ArcSDE connection process, configuration process etc., so that I can implement the same in my project and fulfil the requirment.
Software version used-:
Oracle database=10.2.0.1 on IBM AIX OS,
Oracle Client=10.2.0.1,
QGIS Desktop=2.8.1,
ESRI=9.3.1,
Local m/c=Windows 7
If you can provide me the required steps in detail format, then it will be helpful for me.


texts: How can I convert shapefile to raster and mask using GDAL Python 3

texts:
I have a polygon and filelist of data I need to convert my polygon to raster and mask my filelist with this mask and campute the statistics in the area in polygon. I'm using GDAL Python.

I can do it using R like this :

maskraster <- rasterize(polygon, raster, mask = TRUE)
#calcul mean of area in polygons
Rasternew <- cellStats(maskraster,stat=mean)

How can I do the same using GDAL in Python ?


texts: Is there a ArcGIS python script development API?

texts:
I am working on a GIS project that supports ArcGIS 9.3 and 10.0 and looking through existing code it looks like the main interface library is arcgisscripting.  However, a google search of "arcgisscripting API" or any other variant I can think of only turns up blog posts, forum threads, or broken links.
Is there a core API or reference for arcgisscripting or writing Python scripts for ArcGIS?  Am I doing it wrong and need to try something else?


texts: How to specify cost attributes for network analysis in QGIS using the GRASS plugin?

texts:
I have a road dataset with information about the length, speed and drivetime for each segment. I use QGIS 1.9 with the GRASS plugin to do different types of network analysis, but how do I set up the drivetime attribute as the cost for my analysis? Or perhaps the road length?

In GRASS 6/7 you can specify this column when you do the analysis, but not in the GRASS plugin in QGIS? The same applies to my road directions, how can I take into consideration one way streets, which I have information about in the attribute table?

Thanks in advance!


texts:
We have a need to split a table of lines(> 100 MM) lines by a table of polygons (~ 5000). ST_Split only accepts two arguments (not sets). What would be the best way to do this? That is, split each line by each polygon to generate a set of lines that are contained in each polygon? (To start with, let's not worry about the time; this is a pre-processing step and can compromise time for a better result)

Environment: PostGis 2.3

UPDATE 1:

I ran the following query; is that correct for this operation? (the result set I got is surprisingly large)

CREATE TABLE split_test AS (SELECT lines.id, mp.attribute1, mp.attribute2, ST_SPLIT(lines.geom, mp.geom) split_geom FROM (SELECT id, geom FROM lines_table LIMIT 1000) lines, (SELECT attribute1, attribute2, geom FROM polygons) AS mp);

UPDATE 2:

I posted the working query below as an answer.


texts: How to color differently a part from line that lies between two selected vertices

texts:
I have a continuous line which represents the watercourse and I would like to color the parts that pass through pipes.

I would like to color differently the part that is between two selected vertices, knowing that the part is not segmented and it should not be segmented because the line constitutes a single attribute.


texts: Guidelines for using ArcObjects from Python

texts:
By far, Accessing ArcObjects from Python? is my most read and referenced Q&A on GIS Stack Exchange. In spite of that success, it's probably one of my weakest areas when it comes to actual use. A large part of that poor showing derives from my poor ability to read and understand the ArcObjects docs.

So, for any given task what are some guidelines for translating .net/c++/java/... docs and examples into their python equivalents? (which language is the best one to work from for that matter?) and what is the best index or landing page to start from? what stuff should be focussed on, and likely at least as important, what can be freely ignored?

Assume your audience is at least somewhat python literate, and illiterate in other development languages. Walk us through a small coding exercise, from initial idea and research to working python results.


texts: How to find out if OpenStreetMaps contains low emission zones?

texts:
Since I never really digged into the data contained in OpenStreetMap I ask myself what would be the recommended way to identify layers or tags within the overall data. In my current use case I want to find out whether there is spatial information about the boundaries of low emission zones.

First of all I looked into the taginfo-master database and filtered the table popular_keys by %zone%.

As shown in the screenshot this results in 11 keys from which none indicated what I am searching for - but still it is possible that a more general tag name such as zone is used.

While reading another post I get to know about JOSM and installed the latest version. Since it is not recommended to download the whole dataset in order to avoid torturing OSM servers I would like to know: How can I only load OSM data tagged with zone for a specific city such as Munich? Is QGIS a better tool for this?

In the end it would be nice if I can somehow download spatial information which I can convert into common formats such as ESRI ShapeFiles.


texts: Add features to vector layer from WFS query

texts:
I am trying to add the resulting WFS features (xml format) to my selected items vector layer but can't get it to work.

I am querying my WFS layer with the following:

    showFeatureLink.on('click', function() {
        OpenLayers.Request.GET({
            url: 'http://1.2.3.4:8080/geoserver/wfs',
            params: {
                service: 'WFS',
                version: '1.1.0',
                request: 'GetFeature',
                typeName: 'Mylines:WebLayer1'
            },
            proxy: "../gis/geoserver.seam?url=",
            success: function(request) {
                var features = new OpenLayers.Format.WFS().read(response.responseText);
                selected_items.addFeatures(features);
                map.zoomToExtent(selected_items.getDataExtent());
            },
    });

The XML returned contains all the relevant information so there's no problem there.

<wfs:FeatureCollection numberOfFeatures="1000"...... />

I seem to be falling at the last hurdle, I've googled for some time but can't get to the bottom of it, your help would be appreciated!

Thanks


texts: Mapbox GL / separation of style and data

texts:
I have played with Mapbox and can quite easily create a Choropleth map in Mapbox studio and interact with it in Javascript.

I would like to create Choropleth map of the states with the ability to change the colours of the states for 100 years of different data points. I'm not allowed to upload the data into Mapbox as its sensitive healthcare data and I can't get sign of for the $499 a month cost.

My idea is I create a mapbox style layer in MapBox Studio then push the data client side for each of the states depending on the year x that the user selects. I have seen quite a few cloropeth tutorials such as this https://www.mapbox.com/help/choropleth-studio-gl-pt-1/ but the data is added in through a layer in Mapbox Studio.

Does anyone have any ideas if this is possible? and perhaps any useful API requests which may help me achieve this https://www.mapbox.com/api-documentation/


texts: Resolving mistakes after merging polygons

texts:
My problem is quite similar to those of title "qgis merge polygons does not merge on snapped edges" and "Merging polygons". I'm merging several polygon features (within one layer), all adjacent with each other, the sum of which cover a greater area, which I need. To do this I'm either using Vector > Geoprocessing > Dissolve or the tool "merge selected features" while in edit mode. Both result in a new shapefile with only one feautre (attribute's don't matter now), which is OK for me. However the new feature contains 3 kind's of "mistakes".
1.  Rings (inside the polygon area)
2.  Rings with zero area (also inside the polygon area)
3.  "Peninsula"-s (at the boundary of the polygon).

The first two I can resolve manually by deleting the nodes one by one (somewhat cumbersome!). This is true for the third type of error, too, but to resolve the third type of error, I should go manually over the whole boundary of the new feature, which is far too cumbersome.

How can I automatically get rid of these three types of "mistakes"? NO modification of other than the above vertices should be guaranteed! Part of the solution would be to delete all "duplicate" verticies, but this is not enough (see joining point of the "peninsula").

Using QGIS 2.6.1 Brighton on Windows 7 64.


texts: Two parallel lines (vectors), only one feature (ID)

texts:
I have one shapefile that contains two parallel lines in yellow in the picture. Both lines have the same feature (these lines were originally both sides of a fixed distance buffer around a line). I clipped that buffer to create two "borders" within a third polygon (one administrative unit). My goal is to split that shapefile into two shapefiles OR to give a different ID to each line so I can subsequently work with them. In a nutshell, these two lines represent boundaries, a northern boundary and a southern boundary.

These lines are not of the same length.

I am looking for a python command.


texts: Issue with Forest road Designer plugin in QGIS 2.18.28

texts:
I have both QGIS 2.18.28 and QGIS 3.14.1 on my PC. Forest Road Designer works only on QGIS 2.18.28 version. I am trying to use this plugin, but I got an Error message.
What the problem is? I have used it before.


texts: My ArcGIS hosted layers dont'show up in ArcGIS Online layers list

texts:
I am using the free trial of ArcGIS, I would like to make a map online but my shapefile is too big and ArcGIS suggested to upload the file as an hosted layer.
I did and I can see the layer in my content tab:

But, when I go back to map editor tab, I cannot see my hosted layer. Also, when I click on the layer and click "Publish" (just to try) it says that is not possible as the item doesn't exist (but it actually does):

I tried to publish as GeoJSON and SHP, in private and in public mode, and always tick the "hosted layer" checkbox when upload but nothing has worked.
Why are my hosted layers are not usable?


texts:
Arcmap is giving me an error when using the masking option for dot density. I turn on masking for the dots in the Obama data frame using the lakes layer. Then, when I click apply, all the dots are gone. When I re-open the masking option dialogue, it has automatically selected surrounding counties; thus, the dots are masked from the entire area and do not draw. The McCain data frame does something similar. I select lakes for masking and check the use masking box. When I click apply it still draws the dots on the lakes. When I open the placement dialogue for masking again, the use masking box is no longer selected. I have tried restarting Arcmap, but still get the same result. I tried turning different layers on and off or removing them, it does not help. For example, if I remove surrounding counties from the Obama data frame, it now defaults to Franklin county after lakes was selected. Clearly there is an error with the software. I wonder if it has something to do with converting the road labels to annotation?

Dot Density Making Error http://i124.photobucket.com/albums/p27/plantshaman/McCain_Obama_zpsbyg2n4kj.png


texts: Find and filter points within a variable radius


texts: Converting latitude and longitude into northing and easting?

texts:
I have the following UK postcode dy8 3xt and know that the latitude and longitude is:-

54.452772
-2.156082

I also know that the Easting, Northing for the postcode is:-

389490
283880

However I am struggling to find the equation that converts lat/long to northing and Easting, I would prefer to have the equation in both in jScript and c# (I am being greedy)!

Can anyone help?

Some more info, if you click on this link you can see the results I am looking for. The postcode I entered projects to lat/lng using WG S84 and the grid ref projects to OSGB. So my question is how is this done?

I finally got led to here which I can confirm works great.


texts:
I have a dataset where I'm trying to look determine determine which polygons my sampling locations occur in.  I have been following the example here:
https://gis.stackexchange.com/questions/282750/identify-polygon-containing-point-with-r-sf-package

But I'm running into error messages I don't understand, nor do I follow all the code.
#polygon shapefile information
bcr
Simple feature collection with 378 features and 1 field
geometry type:  MULTIPOLYGON
dimension:      XY
bbox:           xmin: -179.1413 ymin: 14.53287 xmax: -52.63629 ymax: 83.11063
geographic CRS: NAD83
First 10 features:

                       BCRNAME                       geometry
1  ALEUTIAN/BERING SEA ISLANDS MULTIPOLYGON (((-179.1036 5...
2               WESTERN ALASKA MULTIPOLYGON (((-162.4558 5...
3  ARCTIC PLAINS AND MOUNTAINS MULTIPOLYGON (((-162.6464 6...
4  ARCTIC PLAINS AND MOUNTAINS MULTIPOLYGON (((-94.83377 5...
5  ARCTIC PLAINS AND MOUNTAINS MULTIPOLYGON (((-61.63853 5...
6  ARCTIC PLAINS AND MOUNTAINS MULTIPOLYGON (((-101.9977 6...
7  ARCTIC PLAINS AND MOUNTAINS MULTIPOLYGON (((-102.0227 6...
8  ARCTIC PLAINS AND MOUNTAINS MULTIPOLYGON (((-101.9978 6...
9  ARCTIC PLAINS AND MOUNTAINS MULTIPOLYGON (((-79.70593 5...
10 ARCTIC PLAINS AND MOUNTAINS MULTIPOLYGON (((-69.77826 5...

#select distinct set of points
pnts <- df %>% select(y = Latitude, x = Long) %>% distinct()

#create a points collection
pnts_sf <- do.call("st_sfc",
                   c(lapply(1:nrow(pnts),
                            function(i) {st_point(as.numeric(pnts[i, ]))}), list("crs" = 4326)))
#My question: what is this doing?? what does 4326 come from?

pnts_trans <- st_transform(pnts_sf, 2136) # apply transformation to pnts sf
bcr_trans <- st_transform(bcr, 2163) #apply transformation to polygon sf

#intersect and extract BCR name
pnts$bcrName <- apply(st_intersects(bcr_trans, pnts_trans, sparse = FALSE), 2,
                     function(col) {
                       bcr_trans[which(col), ]$BCRNAME
                     })
#My question: So this is where we're looking at the interaction between the points and polygons, but what is 2 for and what is the function doing?

When I try to run everything, I get the following error message:
Error in st_geos_binop("intersects", x, y, sparse = sparse, prepared = prepared,  :
  st_crs(x) == st_crs(y) is not TRUE

Unclear if it's coming from a variable name I didn't change or something else entirely.


texts: Extracting GPS points inside the region boundary

texts:
I have large set of GPS coordinates of human mobility in different parts of China, but I am only interested in points in Beijing City. These points are in excel csv file that I read into pandas dataframe using python 3.

I want to filter all GPS points inside Beijing city and discard all other points in the dataframe. One approach that I have in my mind is to define a rectangular bounding box and note down the following coordinates (latitude, longitudes) of bounding box.

Bottom Left  (x1,y1) = 39.77750000, 116.17944444
Top Left     (x1,y2) = 40.04722222, 116.17944444
Bottom Right (x2,y1) = 39.77750000, 116.58888889
Top Right    (x2,y2) = 40.04722222, 116.58888889

Then for each point, compare its latitude and longitude values with all the vertices using multiple if else conditions, but I think their should be more optimal approaches to solve this in simple way.
Is there any easier way or supporting library to solve this problem?

Example image is attached for clear understanding for the problem

The input dataset in given in the link https://drive.google.com/file/d/1JjvS7igTmrtLA4E5Rs5D6tsdAXqzpYqX/view


texts:
Is there a way to relate tables in CartoDB?

More specifically, is there a way to have a single row in one table associated with multiple rows in another table without having to actually join them?


texts: Geoserver 2.10 - Add Raster Data Source - Could not list layers for this store

texts:
I want to  add a raster data source as a data store, based on a somewhat huge .tif file (> 200 MB, file permissions are correct). I select the respective file and when I save, I get an error:

    Could not list layers for this store, an error occurred retrieving them:
Failed to create reader from file:data/geotiffs/tiffs/E/or11.tif and hints null

What can I do about that?

gdalinfo:

Driver: GTiff/GeoTIFF
Files: or11.tif
       or11.tfW
Size is 6132, 10026
Coordinate System is `'
Origin = (3456300.560000000055879,5559953.679999999701977)
Pixel Size = (0.080000000000009,-0.080000000000007)
Metadata:
  TIFFTAG_DATETIME=2004:04:06 12:44:10
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_SOFTWARE=Adobe Photoshop 7.0
  TIFFTAG_XRESOLUTION=72
  TIFFTAG_YRESOLUTION=72
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( 3456300.560, 5559953.680)
Lower Left  ( 3456300.560, 5559151.600)
Upper Right ( 3456791.120, 5559953.680)
Lower Right ( 3456791.120, 5559151.600)
Center      ( 3456545.840, 5559552.640)
Band 1 Block=6132x1 Type=Byte, ColorInterp=Red
Band 2 Block=6132x1 Type=Byte, ColorInterp=Green
Band 3 Block=6132x1 Type=Byte, ColorInterp=Blue


texts: Find all the null records for all fields in a shapefile

texts:
I figured out that I can use field calculator on a single column in ArcGIS 10.3 attribute window as follows:

def RemoveNULL(x):
    if x is None:
        return ''
    elif x == '':
        return '0'
    else: return x

RemoveNULL(str(!myxField!))

What I really want to do is find a way to find all the null records for all fields in a shapefile that are NULL (truly empty or '') and change them to zero but preserve all other values (double or int numeric). I don't care about text.


texts: Recalculate Quantile Breakpoints in CalculateField_management loop?

texts:
I have a program that iteratively replaces a temp field where I choose a certain symbology (color ramp and quantile color break methodology) with a few other fields from a join. The program works in that it outputs a file with the correct formatting and such, but it doesn't recalculate the quantile breakpoints based on the new fields. Is it possible to have it recalculate this?

Here is my code:

import arcpy
mxd=arcpy.mapping.MapDocument("CURRENT")

#List of names of fields to be mapped
ListOfFieldsToSymbolize = ["beta1","beta2","beta3"]

#Temporary field that layer is currently using in ArcMap
SymbolizedField = "temp"

for Field in ListOfFieldsToSymbolize:

    #Replace temporary field with one of the fields to be mapped
    arcpy.CalculateField_management("HRR_Boundary", SymbolizedField, "!" + Field + "!", "PYTHON")

    arcpy.mapping.ExportToPDF(mxd, Field)


texts: GeoNode use other language then selected as default (english as default would be great)

texts:
In GeoNode you can select the language in which you want to display the portal.

Default is English, sometimes it uses automatically German, French...does this depend on the Windows language/ region where you log in?

How can I disable this function to have the portal default in English and only when the user want to switch, the user should get that option.

How/where can I set that English is the default in all cases?


texts: Transformation of coordinate systems in ArcGIS Desktop?

texts: I am a Masters student and quite new to ArcGIS. I am working on a map and am a little confused about when to use transformation of coordinate systems/projections. I am using ArcGIS v10.2 and have a map with two coordinate systems: GCS GDA 94 and UTM GDA 94 as well as a basemap. I understand that ArcMap projects these on the fly, but I am wondering if I need to transform the GCS GDA 94 data to UTM GDA 94 to edit the data. By editing the data, I mean adding polygons as layers and using the AddIn Sampling design tool to add random points to these. I sometimes get warning messages from ArcGIS about this. I have read quite a few posts on Esri's site, but am still a little unclear. I need to export the final GPS points as UTM GDA 94 to transfer to my GPS.


texts:
I could not understand the source code of GDAL. The task is to understand and implement the above resampling algorithms for images.
What is the main idea of average resampling in GDAL? Official documentation says that this is the weighted average of all non-NODATA contributing pixels. It is not entirely clear how many neighboring pixels we take into account when calculating the output and what function to calculate the weights.
The same question about the number of pixels to count applies to mode resampling.


texts: Calculate the volume of a surface above an irregular surface

texts:
I am working with repeat LiDAR data over a dune field. From the LiDAR I have generated a DEM with approximately 30cm accuracy over the entire dune field and generated a TIN from this as well. I need to know the volume of the active dune surface to determine if over the last 10 years the volume of the dune field has changed. To do this I need to know the volume of the dunes above the interdune surface. This is the surface the active dunes are moving over and is exposed between the dunes. I have made a raster of this surface by putting a point at each interdune and generating with the nearest neighbor. I now want to know that volume of the dune field above this surface. However, I only can figure out how to do this with a flat reference plane.

Do you have any ideas?


texts: What happened to Live GPS Tracking in 1.8.0-Lisboa?

texts:
Dang, I was just getting used to Live GPS Tracking in 1.7.4-Wroclaw.

I downloaded the new version 1.8.0-Lisboa on another computer.  The Live GPS Tracking
thing was in the View pull-down menu in 1.7.4.  But, in 1.8.0-Lisboa, it's not there!!!

Was Live GPS Tracking taken out of 1.8.0-Lisboa?  or maybe Live GPS Tracking is hidden somewhere?


texts:
I made a merge of several AsterGdem blocks near Egypt and Israel. I have portions of the Dead and Mediterranean Seas. Since near Galilea elevations are below sea level this makes the following problem

When I define the null value as 0, the resulting image shows the seas as null values, which is correct, nevertheless, I also have some pixels inland forming a kind of a contour with the null value as 0.

What I want to accomplish is to have the seas as null values and inland elevation information correct also

Thanks before hand

Gerardo


texts: Getting flow directions of people moving

texts:
I'm creating an application which finds out the direction people are walking in, Gives the direction in which majority of people are walking and the people going in the opposite direction.

For example :
Assume that 5 people start at 0,0. You can see the final positions in the image:

The result should be something like this

What is happening is, that we recognise that the majority of the people in this case move in the general direction 45deg to the X axis. Based on this result we calculate that the people who are walking in the opposite direction to 45deg x Axis are 2.

My output will generally be

{
    x : 0,
    y : 0,
    angle : 45,
    flow : 3,
    antiflow : 2
}

I'm unable to figure out an approach to this problem.

------------EDIT-------------

As has been requested, I'm adding a few more details about the table structure.

This stuff is stored in postGIS.

The positions are all integers.

I have one table which contains data of where each person is

pointId|personId|position|timestamp
  1    |  1     |  0,0   |  0
  2    |  1     |  0,1   |  1
  3    |  1     |  1,0   |  2
  4    |  1     |  2,0   |  3
  5    |  2     |  0,0   |  12
  6    |  2     |  -1,-1 |  13
  7    |  2     |  -1,0  |  14
  8    |  2     |  0,0   |  15


texts: Stratified random sample a FeatureCollection in GEE

texts:
I want to randomly select a feature from each group in a FeatureCollection. My actual data has many groups, so filtering each group and choosing one from each group is not an option. I tried
using reduceColumns() with a grouped reducer to choose a random item from each group. My idea was to extract the random values from that dictionary as a list, and then use that to filter the original feature collection, but got an error when trying to convert the dictionary to a list.
How can I get a list of the random values from my dictionary (see below)?
var fc = ee.FeatureCollection([
  ee.Feature(null, {group: 'A'}),
  ee.Feature(null, {group: 'A'}),
  ee.Feature(null, {group: 'B'}),
  ee.Feature(null, {group: 'B'}),
  ee.Feature(null, {group: 'C'}),
  ee.Feature(null, {group: 'C'})
]);

// Add random column.
var fc = fc
  .randomColumn()

print(fc)

// Get a random value for each group
//  (the random value is nested deep in a dictionary)
var randomDict = fc
  .reduceColumns({
    selectors: ['random', 'group'],
    reducer: ee.Reducer.min().group({
      groupField: 1
    })
  })

print(randomDict)

// Extract the random value from dictionary, return list
// BREAKS HERE:
var randomList = randomDict
  .get('groups')
  .map(function(e){
    return e.get('min')
  })
print(randomList) // randomDict.get(...).map is not a function

// Use list of random values to filter the original fc
var randomFC = fc
  .filter(ee.Filter.inList('random', randomList))

print(randomFC)


texts: Colouring contour lines differently when they are inside polygons of another layer

texts:
I'm a complete noob to QGIS.
I am working with New Zealand Topo 1:50.000 data from LINZ. I have snow polygons and over them contour lines. Where the lines cross the polygons I want to change the colour of the contour lines from orange to blue.
i.e. Where the contours cross the permanent snow/ice polygons in the image below, the contour lines should be displayed in blue tones. As you can see below, they are in the default orange I assigned.
How do I achieve this?


texts: Import 16,000 rows from delimited text file in QGIS

texts:
I'm attempting to import 16,000+ rows from a CSV into QGIS in Mac OS via "Layer -> Add Layer -> Add Delimited Text Layer"

Latest version of 2.18 installed.

Once I've selected the file and hit OK, QGIS hangs and I get the "Application not responding" error when I hover over the QGIS app logo in Dock. I've had no problem before, but that was with < 2000 rows of data.

The file is 831 kb, so I figured it shouldn't be running out of heap space or RAM.

Data is structured:

postcode,val1,val2,val3,lat,lon,easting,northing

Is this too much data for QGIS to handle or a known issue?

I've culled some of the unwanted columns to test (e.g. val2,val3,easting,northing) and the problem persists.

For context: I am developer (mostly in python, Java) and I've recently come over to QGIS to make some spatial visualisations.


texts: Field Calculator VB Script Codeblock IF statement syntax is wrong?

texts:
I can't figure out why the syntax is wrong in Field Calculator ArcMap 10. The complete codeblock is

Dim CapitalDia As Number
Dim TwagDia As Number
Dim X As Number

CapitalDia = [New_Pipe_S]
TwagDia = [DIAMETER_1]

If CapitalDia= 0 Then
 X = TwagDia
Else
 X = CapitalDia
End If

And then, the bottom window is

Final_Dia =
X


texts: Georefencing vector from Stereo 70 to WGS 84 avoiding deformations

texts:
Is there a chance to Georefence or transorm a vector from CRS Stereo 70 to WGS 84 and avoiding all the deformations?
In example is map of Romania, which goes on 0 coordinates of WGS 84.


texts: How to cluster points based on network traveling time to a common location?

texts:
I have a set of points that I need to divide into N different clusters. I know how to do this with the arithmetic distance, but in this example I need to cluster them based on the network traveling time.

One solution that accomplishes what I want would be to cluster the points in such a way that the total travel time to any N given points on the map is as low as possible. If the points could be weighed differently that would be even better. Is there any tool that allows for this? Preferably for QGIS.

The "real-life" application is to locate where N number of terminals should ideally be located given the set of points.


texts: is the GPS network free or available for any device?

texts:
I have a question (I'm really sorry if is kind of dumb question).

But if I have a device with GPS (smarthphone,pda,pocket pc, etc)

Does the device need any additional service to enable GPS data?

I mean is the GPS network free or available for any device with the appropriate hardware ?

I'm kind of lost and probably I need to use GPS for one application running on windows mobile 6.5


texts: PostGIS: Lines from [lat,lon], Buffer in kilometers

texts:
I am trying to do a simple query in PostGIS to get the difference of a line from the buffer of another line. The lines are from latLng coordinates but I want the buffer to be in kilometers.

In the image, I show what I am trying to get with ST_Difference.

The following query will not give me the correct answer

SELECT ST_Difference(ST_LineFromText('LINESTRING(-3.444 52.468, -1.165 52.468)'), ST_Buffer(ST_LineFromText('LINESTRING(-1.725 52.330, 0.604 52.330)'), 25000))

and I did not expect it to work, cause I somehow have to define a coordinate system and what this "25000" at the end, means. I tried a lot with ST_Transform and ST_SetSRID but nothing worked. Also, I would like a solution without altering the table or something.. Just a query that would work.


texts: Expanding"clickable" area for custom icons using Leaflet

texts:
I have a searchable Leaflet map. The green icons represent all of the existing data and when you search for an address it shows a blue pushpin icon.
I would expect to be able to click anywhere on my custom (blue pushpin) icon and get a popup as a result. But nothing happens when I click on it.

I have to click on a very specific spot in order to get the popup to activate. I can tell it's the right spot because my hover text (on the bottom left) changes. I want to make it so that the results pop up if I click anywhere on the custom icon (or even the original green icon).

I'm using a template, so I'm not completely sure which part of the code controls the hover actions or the "clickable" area, but I'm guessing it's this...?
 var hover_template;
      $.get( "./templates/hover.ejs", function( template ) {
        hover_template = template;
      });
      SearchableMapLib.info.update = function (props) {
        if (props) {
          this._div.innerHTML = ejs.render(hover_template, {obj: props});
        }
        else {
          this._div.innerHTML = 'Hover over a ' + SearchableMapLib.recordName;
        }
      };

      SearchableMapLib.info.clear = function(){
        this._div.innerHTML = 'Hover over a ' + SearchableMapLib.recordName;
      };


texts:
I would like tu use QField to update localisation of points objects that their fields are already informed.
With the editing tool I don't manage to deplace point despite I see several "how to".
There is someone to describe how it can be done?


texts: Converting gray band from dataset to RGB with rasterio for population density

texts:
I am seeking a solution that provides me a range of values rather than the provided 0 and 255 from rasterio. That most likely meant that I had to set the photometric and bands and ColorInterp to something related to RGB. You can download the dataset to better understand.

I am pretty new to GIS.

I have this dataset: https://ghsl.jrc.ec.europa.eu/download.php?ds=pop. When I unzip it (the .tif.ovr file) and access it via rasterio, there is only one band. On QGIS GUI, I've managed to open the .tif.ovr file and change some of the colors (since I'm working on population density). Unfortunately, I have no clue on how to change this dataset to have RGB bands.

Right now, when I do:

with open(pathtodata, "r+", **profile) as src:
    src.meta
    src.dataset_mask()

I only get a 2D numpy array with what seems like the gray band only values (0 and 255), but I'd like to have the RGB values so I can work with the RGB values in Python (not for visualization). The meta values show that there is only one band (count) and no photometric. Doing src.colorinterp shows only ColorInterp.gray: 1 which is the issue.

How would I change the gray band to RGB bands to work with RGB-valued data with numpy?

I am using the full dataset (Global dataset) which is located in the hyperlink below the map

When I mean 2D array, I meant a numpy array that looks like this: [[0, 255, 0], [0, 0, 255]].

Additionally, this is the meta data:
{'driver': 'GTiff', 'dtype': 'float32', 'nodata': -200.0, 'width': 72164, 'height': 36000, 'count': 3, 'crs': None, 'transform': Affine(1.0, 0.0, 0.0, 0.0, 1.0, 0.0)}

I am actually after just increasing the number of bands so that I can differentiate the two given values which are 0 and 255.

Note that when you do x = src.dataset_mask() to grab the numpy array, 0 and 255 are the only two values. Like any population density map, I'm after values that are between a range rather than simply having two numbers... e.g. numbers between 0-255 or float values.

Here is some sample data (at array 10427 there are several 255s that COULD be made differently. In QGIS, I used the single band pseudo color rendering type on continuous mode to see some rich data on the GUI.):

>>> data[10427].shape
(72164,)
>>>


texts: Feature templates in ArcGIS JSAPI published maps

texts:
I have an ArcGIS map which is published on ArcGIS server (10.3) and while the feature templates for each layer are set up in the map, the published map service contains totally different set of feature templates, automatically generated based on all possibilities in the symbology. I use the TemplatePicker class to expose them for my web application and hence do not have much control on what is being shown from the feature templates in the map.

Am I missing something (like an option on publishing) or is there a work around?


texts: Using arcpy.StackProfile_3d within arcpy addin

texts:
I want to get elevation profile in ArcScene using arcpy. Specifically, I want to create tool used as follows: click tool button, draw line interactively and output a graph presenting elevation profile.

My idea is to use arcpy addin tool and arcpy.StackProfile_3d() like this:

class DrawTool(object):
    def __init__(self):
        self.enabled = True
        self.shape = "Line"
    def onLine(self, line_geometry):
        rasters = arcpy.ListRasters()
        table = arcpy.CreateUniqueName('profile_table', 'in_memory')
        graphName = 'Sample graph'
        arcpy.StackProfile_3d(line_geometry, rasters, table, graphName)

Unfortunately, line_geometry seem to be the problem here (a result of above code is just empty graph). I tried supplying a line shape in place of line_geometry and it works fine:

def onLine(self, line_geometry):
    ...
    line = r"line.shp"
    arcpy.StackProfile_3d(line, rasters, table, graphName)

Is it possible to convert line_geometry somehow so that it fits into StackProfile_3d()?


texts: Why is GeoDjango not able to query geom column from PostGIS?

texts:
I'm using postgis and (geo)Django to build a web app. I've imported a shapefile into postGIS and used inspectdb to create the model. models.py looks like this:

from __future__ import unicode_literals
from django.contrib.gis.db import models

class MySpatialModel(models.Model):
    gid = models.AutoField(primary_key=True)
    col1 = models.CharField(max_length=50, blank=True, null=True)
    col2 = models.CharField(max_length=50, blank=True, null=True)
    col... = models.CharField(max_length=50, blank=True, null=True)
    geom = models.MultiPolygonField(srid=20935, blank=True, null=True)

class Meta:
    managed = False
    db_table = 'myspatialmodel'

If I query this model using MySpatialModel.objects.values_list('col1') there is no problem.

If I try MySpatialModel.objects.all() I get the following error:

WindowsError at /whatEverLink/

exception: access violation reading 0x03A10000

I have the spatial table on a different schema to public but have tried moving it across the public schema (and ensuring that Django is accessing the right schemas) but the problem persists.

The exception location is here:

django\contrib\gis\geos\prototypes\threadsafe.py in __call__, line 56


texts: Finding PostGIS tables that are missing indexes?

texts:
Recently I was looking around in pg_stat_user_tables and was surprised to see high numbers of sequential scans on some of my spatial tables.  Sure enough, these tables were missing spatial indexes.

How can I find all tables with an un-indexed geometry column?


texts: Trouble with Hot Spot Analysis (Getis-Ord Gi*) tool in ArcGIS

texts: I am trying to locate areas with a high rate of accidents involving bicyclists or pedestrians  per car accident of any kind. I have a point file of accidents and a point file of all those with bike/ped involvement. I want to use the Hot Spot Analysis tool, but all I can figure out is using it on each point file to tell me the overall crash hotspots and the bike/ped crash hotspots. Is there a way to normalize one by the other? Is there a good way to compare the two hotspot output files? is there a different tool or approach I should look into?


texts: Scripting spatial join in ArcPy to set field attribute in field mapping object?

texts:
I'm scripting a spatial join in ArcGIS with Python. I only want the resultant feature class to have a single field containing one attribute from the join features. In general, many join features overlap a single target feature and I want to preserve the attributes from all of them. I'm joining one-to-one, with the 'join' merge rule and a comma delimiter.

The problem arises when the new field exceeds 50 characters (the default) and the spatial join fails. I need to update the field's 'length' attribute, but I can't - if I assign a new value to it, nothing changes.

Here's a snippet that generates the field mapping object that I'll pass to spatial join:

# Generate a field mappings object and add the two join layers
fieldmappings = arcpy.FieldMappings()
fieldmappings.addTable(outPolys)
fieldmappings.addTable(overlapping_SAs)

# facID_str is the field that we want
# Set its merge rule to 'join' and add a comma delimiter

# Get all field names from the join features
fnames = arcpy.ListFields(overlapping_SAs)

for field in fnames:
  if field.name == "facID_str":
    fidx = fieldmappings.findFieldMapIndex(field.name)
    fmap = fieldmappings.getFieldMap(fidx)

    # Set the merge rule to sum and update the object
    fmap.mergeRule = "join"
    fmap.joinDelimiter = ","

    fieldmappings.replaceFieldMap(fidx, fmap)

  # Delete all other fields
  else:
     fidx = fieldmappings.findFieldMapIndex(field.name)
     if fidx > 0:
       fieldmappings.removeFieldMap(fidx)

I can see the field I want by calling fieldmappings.fields[1].length but if I try to set the length to something other than 50, nothing happens. For example:

>>> fieldmappings.fields[1].length
50
>>> fieldmappings.fields[1].length = 500
>>> fieldmappings.fields[1].length
50

The eventual call to spatial join looks like this: arcpy.SpatialJoin_analysis(outPolys, overlapping_SAs, outJoin, "JOIN_ONE_TO_ONE", "KEEP_COMMON", fieldmappings, "WITHIN")

How do I set length to a value more appropriate for my application?


texts: Changing contrast of GeoTIFF using Python

texts:
I have a GeoTIFF image that I can split into the 4 layers. Now I wish to increase the contrast of the layers and stitch them back together. However when I use numpy to do this, I am unable to increase the contrast of the images.

Current code:

def contrast(sLayers):
    optimg=copy.copy(sLayers[:])
    for i in range(len(sLayers)):
        copySAR = copy.copy(sLayers[:][i])
        sarArrayI = np.array(copySAR)
#         optimg[i] = cv2.equalizeHist(sarArrayI.astype(uint8))
        clahe = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(8,8))
        cl1 = clahe.apply(sarArrayI.astype(uint8))
        optimg[i] = cl1
    return(optimg)

I used GDAL to open the images and then I use numpy.readAsArray on it which gives sLayers.
Both Clahe and equalize hist fails. How can I change the contrast on the individual layers before merging them for post process?


texts: Displaying selected layers depending on zoom in Leaflet

texts:
It looks like I found the problem between the document.querySelector and map.on('zoomend') function.

I was going to set the zoom level for switching off some layers, what has been raised here:

Leaflet making features gone when zoom out

although there is a clash with the event .addEventListener function in my code.

In the result, when I switch off the layer, it's gone only for temporary zoom level.

When I change the zoom level it appears again, even when remains switched off on the sidebar (see image).

The code looks like:

    document.querySelector("input[name=cf]").addEventListener('change', function() {
            if(this.checked) map.addLayer(job)
              else map.removeLayer(job)
            })

   document.querySelector("input[name=vm]").addEventListener('change', function() {
            if(this.checked) map.addLayer(job2)
              else map.removeLayer(job2)
            })

    document.querySelector("input[name=bt]").addEventListener('change', function() {
            if(this.checked) map.addLayer(job3)
              else map.removeLayer(job3)
            })

and the part, which is responsible for specified zoom level for dissappearance

  map.on('zoomend', function() {
if (map.getZoom() <7){
        map.removeLayer(job);
}
if (map.getZoom() <7){
        map.removeLayer(job2);
}
if (map.getZoom() <7){
        map.removeLayer(job3);
}
else {
        map.addLayer(job);
        map.addLayer(job2);
        map.addLayer(job3);
    }
  });

Is it possible to combine these code together, making the layer invisible when scrolling between all zoom levels set in the map.on('zoomend' function ?


texts: How to download the full OSGeoW64 installer for a previous version of QGIS?

texts:
I need to install the full OSGeo4W64 version for 2.18.6, Windows 10, 64-bit.  However, the previous release page only has the standalone QGIS installer:

http://download.osgeo.org/qgis/windows/QGIS-OSGeo4W-2.18.6-1-Setup-x86_64.exe

Where do I find the full OSGeoW64 installer for 2.18.6?

=========================================

Edit:

After following the answer from @mgri below, I get the following error when I try to run 2.18.6:

However, qgis_app.dll does exist, in the correct path.

I have reinstalled twice, each time using the latest full OSGeoW64 installer (which is the only installer I am aware of, and installs 2.18.7 by default).  The first time I followed mgri's instructions at the initial install, requesting 2.18.6.  The error ensued.  The second time I installed 2.18.7, then went back and did a custom install, again following mgri's instructions, and modified the install to revert to 2.18.6.  Again, the error.

After an internet search regarding "Entry Point Not Found", I ran the Windows System File Checker, but it turned up no problems.

I am still unable to install 2.18.6, looking for assistance.


texts: Compass Navigation With ArcGIS SDK for iOS

texts:
There's a sample provided by esri named GpsSample (I can't find a way to upload it here)

Anyway, the sample includes multiple selections for mapview's locationDisplay autoPanMode property

I'm trying to implement it in a similar way, my code is the same, difference is I'm creating the UI controls dynamically (mapview included) without relying on static XIBs

Debugging the code, the autoPanMode property for the map changes correctly but the mapview still wouldn't be automatically rotated like in the provided sample

Finally, I set mapview's allowRotatingByPinching to YES, the map and attached compass image are rotating correctly via pinching. But still wouldn't automatically rotate itself.


texts: command r.stream.order not found in grass 7.0.3 how to install r.stream module?

texts:
I have installed QGIS 2.14.1 and GrassGIS 7.0.3

I found in OSGEO Grass wiki page a command that calculate Strahler's and Horton's stream order Hack's main streams and Shreeve's stream magnitude from a drainage, that command is r.stream.order  but when I tried to use it I don't found the command only have r.stream.extrac.

¿Anyone know how to install the other commands or the complete module?

I install QGIS and GrassGIS from the OSGEO installer osgeo4w.setup-x86_64


texts:
I'm unable to change layers order in the layer tree. The 'drag and drop' stopped working and I don't know why.

There's no problem with Layer Order Panel; Control rendering order box is not checked. Restarting QGIS did not help.
I tried to reinstall program after cleaning directiories (I think I got all of them) but it also did nothing. I was using QGIS 3.4. and I'm on 3.6. now.

I'm using QGIS for basic functions, no coding. I'm on Windows 10.


texts: Histogram Time Slider in Legacy Style ESRI JavaScript API

texts:
I tried to modify the sample code Histogram Time Slider ArcGIS API for JavaScript  from AMD to Legacy style. However,
I found the histogram was not shown in the bottom in the application (link listed below). I am wondering if you could provide valuable opinions on the application. I am not sure if the Histogram Time slider not supported in DoJo <1.8

The Histogram time slider application based on Legacy style
http://maps.nmt.edu/JSTest/Histogram/Histogram_Legacy.html


texts: Google maps as a Layer inside Geoext3 Tree Panel

texts:
I'm trying to load Google Maps as a Layer in Geoext3 tree Panel. I'm using Ol3-Google-Maps. My code is:

    var googleLayer = new olgm.layer.Google({
        name: 'Google',
        title: 'Google',
        type: 'base',
        combine: 'true'
    });

    olMap = new ol.Map({
        layers: [googleLayer, layerorto2016gv, layerlim],
        controls: controls,
        view: new ol.View({
            center: center,
            zoom: 15
        })
    });

    var olGM = new olgm.OLGoogleMaps({map: olMap}); // map is the ol.Map instance
    olGM.activate();

    mapComponent = Ext.create('GeoExt.component.Map', {
        map: olMap
    });

I can't do it works. The result is: "Uncaught TypeError: a.ac is not a function" and I don't see the Tree Panel.
If I remove the lines:
var olGM = new olgm.OLGoogleMaps({map: olMap});
        olGM.activate();
The result is: TypeError: a.sf is not a function but I can see de Tree Panel:

Does anybody know how to put the Google Layer in the tree panel?


texts: postgis update value from another table that intersects

texts:
I have a point table called t1 and a polygon table called t2 that are neighbourhoods.
I want to record neighbourhoods name from t2 into t1 that falls in.
My query is:
update t1
set ti.f1 = t2.t2
from t1
inner join t2 on st_intersects (t1.geom, t2.geom);

this works but copy result for first record intersection into the rest of points. In this case Kitsilano.


texts: QGIS - How can I convert a raster file to a vector file without making same value cells into one polygon?

texts:
How can I convert a raster file to a vector file without making same value cells into one polygon?

In the attached image, the values "2124", "2269", "2321", "2634", and "2920" are the polygons automatically combined. Is there any way to convert each pixel to one polygon?


texts:
I have a MultiPolygon with 2 relatively simple polygons in it:
http://microflush.org/json/MultiPolygon.json

I've pulled out the 2 polygons from the above MultiPolygon below, just to make sure they both exist (same url above, but different json):

json/upper.json
json/lower.json

Any/all of the 3 above can be copied/pasted into a GeoJSON tester to view them:    http://geojsonlint.com/

I've stored the original MultiPolygon in PostgreSQL as below:

$ ogr2ogr -f "PostgreSQL" PG:"dbname=weatherzones user=postgres" "MultiPolygon.json" -nln polys

Here's how it looks in Postgres after the import:

polytest=# \d polys;

                                       Table "public.polys"
    Column    |          Type           |                        Modifiers
--------------+-------------------------+---------------------------------------------------------
 ogc_fid      | integer                 | not null default nextval('polys_ogc_fid_seq'::regclass)
 wkb_geometry | geometry(Geometry,4326) |
 warnings     | character varying       |
Indexes:
    "polys_pk" PRIMARY KEY, btree (ogc_fid)
    "polys_geom_idx" gist (wkb_geometry)

When I try to query postgres using single points which lie in the lower polygon, I do not get rows returned.  However, when I query using points which lie in the upper polygon, I get the row returned.

ie:

This point lies in the lower polygon, and this query returns no rows:

select warnings from polys
where ST_Intersects(ST_PointFromText('POINT( -116.024551 38.485773 )', 4326), wkb_geometry);

This next point lies in the upper polygon, and this query returns a row, which is the MultiPolygon:

select warnings from polys
where ST_Intersects(ST_PointFromText('POINT( -114.879913 39.249129 )', 4326), wkb_geometry);

Is there something wrong with my query, the way I imported the data, or perhaps the original MultiPolygon which can explain why a query with a point from the lower polygon won't return the MultiPolygon row?  I've done this with other MultiPolygons and have not had an issue like this.


texts: Query MSSQL geography data type against a bounding box

texts:
I'm currently storing geographic locations as data type geography in my MSSQL database and performing radius queries against it without issue.

Is it possible to query against it using a polygon bounding box of points so that the results returned fit within the bounding box?


texts:
I am wondering how I would go about padding the outside of a DEM raster with 0 values. Here's the scenario: I have a DEM and I have a feature class larger than the DEM footprint. I need the DEM to be larger than the feature extent in order to perform some extraction processes. Therefore, I'm hoping to pad the outside of the DEM with 0 values to fill it out to the correct size. See below for what the DEM and features looks like.

So far, I've tried to replicate the solution described in a previous post, but no luck. I manage to create the larger raster of 0s no problem, but when I try to use the "Plus" tool to add the two together, it only produces the original DEM. I'm not sure, but I believe it's because the DEM raster is a gradient (no attribute table). Below you can see the DEM and the larger raster (black) of 0 values that I'm trying to use. I can confirm that the 0 values raster is of the same coordinate system, cell size, and has been raster snapped.

So this leaves me stumped.
How can I pad this DEM?


texts: Is centering existing polygons on a point layer possible?

texts:
I'm writing a python script that automates our grid maps. Everything works fine other than the occasionally awkwardly placed grids.

I've been using Create Grid Index Feature, which puts the orgin at the bottom left of the layers extent. This is fine for large datasets as typically it reflects best fit. I even have the code componsate for when only a single grid is required (center on the points layer, make extent equal to dataframe at a scale of 9000, then get xmin and ymin of data frame). The problem is the smaller to medium sized point clusters.

I'm curious if there is a way to align a grid to best fit around the points layer. Currently, a line of points could starts at the bottom left corner of the grid and go through one sheet of my grid map and have a single point on the second page. I would like to align the grid around the points so the points are evenly distributed.

Is this something that's possible within the confines of ArcPy?

Approach Utilized

Using Richard Fairhurst's answer, I realized I was going about this wrong. Using his example I decided to get the center coordinate of my grid and points layer, then I took the difference of the two centroids and utilized that value to shift all features in said layer. I stubled upon and utilized the following function to do so; which I found at ArcPy Café.

def shift_features(in_features, x_shift=None, y_shift=None):
    """
    Shifts features by an x and/or y value. The shift values are in
    the units of the in_features coordinate system.

    Parameters:
    in_features: string
    An existing feature class or feature layer.  If using a
    feature layer with a selection, only the selected features
    will be modified.

    x_shift: float
    The distance the x coordinates will be shifted.

    y_shift: float
    The distance the y coordinates will be shifted.
    """
    with arcpy.da.UpdateCursor(in_features, ['SHAPE@XY']) as cursor:
        for row in cursor:
            cursor.updateRow([[row[0][0] + (x_shift or 0), row[0][1] + (y_shift or 0)]])
    return


texts:
I have a QGIS Web Client working, but it lacks a legend and metadata panel as is shown here

What do I need to have the referred legend panel?


texts: Remove stale/obsolete geometry columns from the geometry_columns table

texts:
I understand that the function Populate_Geometry_Columns() inserts records in the geometry_columns table for geometry columns that are not yet listed there. However, an invocation of Probe_Geometry_Columns() reports:

select probe_geometry_columns();
              probe_geometry_columns
---------------------------------------------------
 probed:1086 inserted:0 conflicts:1086 stale:53612
(1 row)

This is after a call to Populate_Geometry_Columns(). Is there an easy/documented way how to get rid of the conflicts and the stale entries?

This has been posted a while ago to dba.sx with no replies: https://dba.stackexchange.com/q/14975/6934.


texts: split multi line by use of distance field

texts:
Possible Duplicate:
  Splitting lines automatically at specific distances?

i have a transect layer with 160 transect . id like to split each transect with specific value from the beginning of the transect . the distance values are store in a field and related to the transects. for example transect 1 : distance value from the beginning is 27.5 meter . transect 2 : 32.4 meter .
how can i split the transects with the distance values in ArcGIS9.3 ?


texts: GDB Compression Not Updating Base Tables

texts:
I'm having an issue when compressing a database the edits are not being posted to the base table immediately, this sometimes takes hours until I can see the edits. Right now the only way I can force the changes to show is shut down the portal service -> compress -> restart the service. Is there another way I can go about doing this so I don't need to shutdown the services to push all edits to the base tables?

For clarification, when I make an edit in portal and exit the edit session I go to compress the database from ArcCatalog. None of these edits show in the base table. If I compress again a few hours later they may or may not show up in the base table.

This is becoming a problem for me when it comes to tracking jobs. I have an excel tracker where I bring in the database table and do vlookups for completion dates. I have a python script that runs every hour to compress the database and thought I could rely on the spreadsheet being updated at the bottom of every hour.

Without shutting down connected services the lowest endstate count I can get is 2 if that matters.


texts: Parameters for optimizing interpolation in ArcGIS for Desktop?

texts:
Is there any criteria to know the most proper parameters for an interpolation method in ArcGIS (such as, for IDW: Neighbors (min and max), sector type, semiaxis length, angle, search neighborhood)?

Any documentation with answers?


texts: Use row as input to other processes in python

texts:
I am new to python and need help. Looked for my answer but don't know if I am even using the correct terminology.

I have a model in which I iterated through rows and performed a set of processes on each. For example a feature class with 10 features and on each of the 10 features I wanted to create an individual feature class....or... for each row create a raster based on the field (e.g.) ID. I am trying to turn this to python due to a host of reasons.

I am using 10.1 and the error is ocuring at line 40 "FeatureClassToFeatureClass"
I believe that it is failing due to my improper use of 'row" as the input.

Here is what I have so far, but I cannot get it to work

# Import arcpy module
print "Starting...."
import arcpy
from arcpy import env

# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")
env.overwriteOutput = True

selectingfeatures = "\\\\silver\\clients\\trans1.shp"
Trans1_shp = "\\\\silver\\clients\\trans1.shp"
basecldem = "\\\\silver\\clients\\basecldem"
TEMP = "\\\\silver\\clients\\TEMP"
Zone3_shp = "\\\\silver\\clients\\Zone2.shp"
transarea = "\\\\silver\\clients\\transarea"
RegionGRP = "\\\\silver\\clients\\regiongrp"
ZonalMean = "\\\\silver\\clients\\zonalmean"
ZoneArea = "\\\\silver\\clients\\zonearea"
Transition__n_ = "\\\\silver\\clients\\transition_%n%"
I_trans1 = "I_trans1_FID"

selectingLayer = arcpy.MakeFeatureLayer_management(selectingfeatures)
rows = arcpy.SearchCursor(selectingLayer)
#cursor = arcpy.SearchCursor(fc)
#row = cursor.next()
#while row:
#    print(row.getValue(field))
for row in rows:
    arcpy.FeatureClassToFeatureClass_conversion(row, TEMP, "Zone2.shp", "", "ID \"ID\" true true false 4 Short 0 4 ,First,#,\\\\silver\\clients\\Projects\\P696\\8_BaseMine\\Processing\\TEMP\\trans1.shp,ID,-1,-1", "")
    print "Finished PFC 2 FC...."
# Process: Polygon to Raster
    arcpy.PolygonToRaster_conversion(Zone3_shp, "ID", ZoneArea, "CELL_CENTER", "NONE", "1")
    print "Finished Polygon to Raster...."
# Process: Extract by Mask
    arcpy.gp.ExtractByMask_sa(basecldem, Zone3_shp, transarea)
    print "Extract by Mask...."
# Process: Region Group
    arcpy.gp.RegionGroup_sa(ZoneArea, RegionGRP, "FOUR", "WITHIN", "ADD_LINK", "")
    print "Finished Region Group...."
# Process: Zonal Statistics
    arcpy.gp.ZonalStatistics_sa(RegionGRP, "VALUE", transarea, ZonalMean, "MEAN", "DATA")
    print "Finished Zonal Statistics...."
# Process: Raster Calculator
    arcpy.gp.RasterCalculator_sa("If( \"%basecldem%\" > ( 0.5 + \"%ZonalMean%\" ), 0, 1 )", Transition__n_)
    print "Finished Raster Calcualtor"
#row = cursor.next()