texts: QGIS 2.10.1 on Mac/ Multiple versions on Mac

texts:
I have Version 2.8.2 running fine on a recent iMac running Yosemitee. I have tried the install of 2.10.1 from http://www.kyngchaos.com/software/qgis but it doesn't work. I would like to be able to install both versions so I have 2.8.2 as a backup while I try and get 2.10 running
I know it is easy to run two versions on a PC if you are having issues but I can't see a way to do this on OSX


texts: Performing calculations using raster and NetCDF formats

texts:
I have a raster .bil file (with ground elevation data in m) and a NetCDF .nc file (with groundwater depth data in cm) and I need to use both of these files to calculate groundwater heads (in m): elevation + groundwater depth.
The output groundwater head file needs to be in .nc format and keep the same structure as the .nc input file.
Does anyone know if it's possible to perform this calculation in QGIS?


texts: Clipping only overlapping datasets using Iterator function in ArcGIS ModelBuilder?

texts:
I've create a geodatabase with about 100 feature classes for my home province.

I want to be able to specify a project extent and clip the feature classes to that extent and save into a new geodatabase.

I managed to do this in ModelBuilder using an iterator function with one problem, a new feature class is made regardless of whether there are any overlapping features with my study area.

Does anyone know what I could do to avoid this problem?
In other words how do I export a feature class only where there is an overlapping feature?


texts: How to use styles depending on two attributes in QGIS?

texts:
How can I mark symbols in a point vector depending on two attributes?

-> attribute "type" defines the object (triangle, point, etc)
-> attribute "status" defines the color (upcoming, actual, finished, delayed -> green to red)


texts: What are duck egg patterns in weighted moving average spatial interpolation method?

texts:
I'm dealing with spatial interpolation methods, in particular with the weighted moving average. I come across really oft with a term "duck egg patterns" which are caused by
isolated data points.

Does any one has an idea what do they mean. What do duck eggs look alike? (not different as any other egg.....).


texts: Getting extent of vector source in OpenLayers?

texts:
I create features from data projected in UTM32 and set up the projection accordingly as shown below. My problem is that I cannot set the map center / extent, because it's calculated as infinity.

Why is the extent method failing?

    proj4.defs('EPSG:23032', '+proj=utm +zone=32 +ellps=intl ' +
      '+towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs');
    var proj23032 = ol.proj.get('EPSG:23032');
    proj23032.setExtent([-1206118.71, 4021309.92, 1295389.00, 8051813.28]);

    var vectorSource = new ol.source.Vector({
        projection: 'EPSG:23032'
    });

    vectorLayer = new ol.layer.Vector({
        source: vectorSource,
        style: vectorStyleFunction
    });

    map = new ol.Map({
        target: 'map',
        layers: [
            vectorLayer
        ],
        view: new ol.View({
            projection: 'EPSG:23032',
            center: center,
            zoom: 15
        })
    });

    vectorLayer.getSource().addFeature( feature );

    vectorLayer.changed();
    map.updateSize();

    var extent = vectorLayer.getSource().getExtent(); // +- Infinity
    map.getView().fit(extent, map.getSize()); //  Error: https://openlayers.org/en/v4.6.5/doc/errors/#25


texts: Error in reading coordinates in GRASS module in QGIS

texts:
I am trying to split some lines using points as described here:
http://osgeo-org.1560.x6.nabble.com/How-to-split-a-line-using-points-td4981464.html

When I run the comands:

v.out.ascii <my points> out=points.txt
while read x y; do
    v.edit <my lines> tool=break coords=$x,$y cat=0-99999
done < points.txt

I get the following Error message:

ERROR: Option <coords> must be provided in multiples of 2
    You provided 1 item(s): 2911816.37852443|2182783.62147557|182,,


texts: Exporting loss pixels from Hansen data/Global Forest Change dataset on Google Earth Engine

texts:
I am trying to export the loss pixels from the Hansen/UMD dataset for each year from 2001-2014, for a region. I hope to obtain a stack of 13 rasters (one for each year), with a pixel having 0 or 1 in each of those rasters. My intent is then to run some sort of trend analysis of the loss 2001-2014.

As of now I have the following code, which loads the lossYear band and the geography in the form of a fusion table, reduces the lossYear image to the geography and iterates across the years 1-14.

// Load Hansen tree cover

var gfcImage = ee.Image('UMD/hansen/global_forest_change_2015');
var lossYear = gfcImage.select(['lossyear']);

var scale = 100

//Sequence of years for which we need to extract loss
var years = ee.List.sequence(1, 14) //2001 to 2014 based on v1.2 of UMD dataset

// Load India border
var statesIndia = ee.FeatureCollection('ft:13fekwKFyNB2IIEgpdN156LdWpMcXohQzZ3kjzQ');
Map.setCenter(78.9629,20.5937)

var addVar = function(feature) {

  // function to iterate over the sequence of years
  var addVarYear = function(year, feat) {
  // cast var
year = ee.Number(year).toInt()
feat = ee.Feature(feat)

// actual year to write as property
var actual_year = ee.Number(2000).add(year)

// filter year:
// 1st: get mask
var filtered = lossYear.select("lossyear").eq(year)
// 2nd: apply mask
filtered = lossYear.updateMask(filtered)

// reduce variables over the feature
var reduc = filtered.reduceRegion({
  geometry: feature.geometry(),
  reducer: ee.Reducer.sum(),
  scale: scale
})

// get results
var loss = ee.Number(reduc.get(lossYear))

// set names
var nameloss = ee.String("loss_").cat(actual_year)

 // alternative 2: always set property
// set properties to the feature
return feat.set(nameloss, loss)
  }

  // iterate over the sequence
  var newfeat = ee.Feature(years.iterate(addVarYear, feature))

  // return feature with new properties
  return newfeat
}

// Map over the FeatureCollection
var lossIndiastack = statesIndia.map(addVar);

Map.addLayer(lossIndiastack, {}, "lossIndiastack")

But I get the error lossIndiastack: Layer error: String: Unable to convert object to string.
And then I need to figure out how to export the stack.

Can anyone help me figure out the error and provide a solution?


texts: Does QGIS support .sld style files for raster layers?

texts:
I'm currently looking at the documentation for geoserver, and I'm trying to load a raster and .sld file in QGIS to see if I can edit .sld files for raster layers. The .sld and raster are located here: http://docs.geoserver.org/2.4.1/user/styling/sld-cookbook/rasters.html

Unfortunately I'm unable to load the .sld file in QGIS 2.2. I am only allowed to load .qml files when I try to load a style for that layer. It appears that QGIS only loads .sld files for vector layers.

Is there anyway to use an .sld file on a raster layer?


texts: Scale bars moving after update cause measurement issues

texts:
I'm trying to create orthomosaics with accurate measurements of rocks in a stream bed. All the photos were taken from a fixed height and scale bars were added by knowing the dimensions of GCP's along the stream. However once the orthomosaic is built, the ruler tool shows that  the size of the GCP's is innacurate (ie 1.7m instead of 9cm). Furthermore if you update the scale bars  they all congregate in a random area of the stream bed and while still in order are significantly closer together.

Does any one know why this is happening?

We found that if we update the scale bars every time we add a new scale bar then build the orthomosaic,  then this doesn't happen (though we have no idea why).

Is there a easier way to fix this?

Having to go back and update the scale bars before building the orthomosaic would take a huge amount of time.


texts:
I'm trying to convert WKT from an API to a shapefile via arcpy (there is a requirement to use the ArcGIS GUI) and am unable to get arcpy to create the shapefile.

My code:

def create_shapefile(self, input_file, data, template):
    try:
        arcpy.CreateFeatureclass_management(os.path.dirname(input_file), os.path.basename(input_file), 'POLYLINE', template, has_m='ENABLED', has_z='ENABLED')
        insertCursor = arcpy.da.InsertCursor(input_file, ['SHAPE@', 'OPNUM'])
        for f in data:
            # Manually overriding the geom for purposes of this example
            # Data is valid, I can access all attributes if I print to the GUI
            f['geom'] = 'LINESTRING ZM(-93.8477 45.5571 3340 0,-93.8413 45.5521 3308 6,-93.8356 45.5477 3287 11,-93.8295 45.5430 3271 16,-93.8234 45.5383 3246 21)'
            insertCursor.insertRow((f['geom'], f['opnum']))

    except Exception, e:
        self._catch_error(sys._getframe().f_code.co_name, e)

The error in the ArcGIS script dialog is:

Error in function: create_shapefile
cannot alter multipart geometry type

Edit: Updated to new error after reply about using SHAPE@ instead of SHAPE@WKT


texts:
I've been trying to find the best way to calculate the rank of a value from a 3d numpy array. This array is created from 35 years worth of rainfall data rasters. I'm treating the last raster in the stack as the "base" raster for comparison of the ranking in this case.

The numpy array's shape would be something like (36, 500, 500). For each column I need to get all the values from the stack and then rank where the most recent (last) year falls.

So far I have:

for row in range(rows):
    for col in range(cols):

        # get an array of all the values of the raster
        # stack at current row and col iteration
        pixel_stack = stor_array[:, row, col]

        # Get the rank index of the last value in the pixel_stack
        rank_index = int(stats.rankdata(pixel_stack, 'min')[-1])

        # add the rank index at current
        # row and col iteration to and output array
        out_array[row, col] = rank_index

This method works but seems slow. Is there a better (quicker/cleaner) way to iterate over the columns of the array?

For instance, is there anything that would allow me to use scipy function in a similar way to this numpy one?

out_arr = np.mean(stor_arr, axis=0)


texts: A QGIS expression (0<=0”az”<180) related to a column az with values 0 to 360 returns all records. Tried to_int and to_real as well because source of the data was a csv and result was same.


texts: How to route over (partial) edges in pgrouting?

texts:
I have made a route planning system (based on shortest path using A*) like the Google directions service using pgrouting and google maps. It includes clicking on the map to generate waypoints, dragging of waypoints or polylines to change your desired route. It also shows a directions panel with instructions how to get from A to B.

However in the reverse geocoding i use to find out where the user clicks on the map i return the closest node in the topology. This all works pretty well except for some real world cases where a direct route from A to B is longer than an indirect route through D

The blue A,D,B are the nodes and the red C-A, C-B are my mouse clicks that corresponded to those nodes. The red C-C is the place on the edge where i want my route to visit.

If a user wants to go from A to B through the long direct edge it isn't possible atm because it isn't the fastest route.

I am looking for a way to route over edges or partial edges. One can imagine that a user doesn't want to start in a node but somewhere halfway on an edge (this is another use case but i feel it will be solved as well with the answer i seek).

The cleanest way i can come up with is generating temporary nodes on an edge when a user clicks there (see click C-C on the image) by effectively splitting up an edge into 2 edges and placing a new (temporary) node on the split point. This way pgrouting can route over this new node and thus force the route to follow the edges surrounding that new node.

However, this will generate a lot of temporary nodes when dragging a polyline across the map. All those during_drag_generated nodes have to be removed except the one created at drag_end as that one becomes part of the final route.

So i am wondering are there easier ways to solve this?


texts: Can't run Haralick texture process on Orfeo ToolBox on QGIS

texts:
I have tried to run Haralick texture extraction on Orfeo, and this error is returned:

Algoritmo Haralick Texture Extraction comenzando...

> C:\OTB\OTB\bin\otbcli_HaralickTextureExtraction
> -in "C:\Users\Xochitl\Desktop\Clasificación supervisada\Sentinel2A_VTC\1\S2A_MSIL1C_20170223T165311_N0204_R026_T14QPF_20170223T165747.SAFE\GRANULE\L1C_T14QPF_A008746_20170223T165747\IMG_DATA\T14QPF_20170223T165311_B03.jp2"
> -channel 1
> -ram 128
> -parameters.xrad 2
> -parameters.yrad 2
> -parameters.xoff 1
> -parameters.yoff 1
> -parameters.min 0
> -parameters.max 255
> -parameters.nbbin 8
> -texture simple
> -out "C:/Users/Xochitl/Desktop/haralick.tif"

**'ascii' codec can't encode character u'\xf3' in position 93: ordinal not in range(128) See log for more details**

Any ideas of how I can solve this?


texts: added dtf layer, doesn't align with SHP layers

texts:
I've built a NY basic state map in QGIS using .shp files of counties, all in NAD83/UTM 18N projection. I downloaded a file of hospitals with lat/long coordinates and converted it to a delimited text file. When I go to Add Layer --> Add DTL and confirm the file, the lat/long, and select the projection, my facility points load... but far to the southwest of the rest of the map. If I zoom way out, I see the hospitals of NY floating far below the state, in about Guatemala.

What step am I missing to get my point data to overlay properly with the rest of the map?

FacID    Name   Short   Address City    Latitude    Longitude
1   Albany Medical Center Hospital  HOSP    43 New Scotland Avenue  Albany  42.65337    -73.773834
2   Albany Medical Center - South Clinical Campus   HOSP    25 Hackett Blvd Albany  42.645485   -73.77829
4   Albany Memorial Hospital    HOSP    600 Northern Blvd   Albany  42.674271   -73.749268


texts: Calculating one cell from dbf table to another cell in same table using ArcPy?

texts:
Am absolutely new to python programming for ArcGIS.
How do I calculate one cell from one field in DBF table into another cell in another field in same table?

Here is what I've got that doesn't work:

import arcpy
cursor = arcpy.da.SearchCursor("S2_merge1",["Name1"])
cursor1 = arcpy.da.UpdateCursor("S2_merge1",["Name5"])
for row in cursor1:
   row[1]=cursor
   cursor1.updateRow([row])


texts: Assigning colour to QGIS vector layer fields?

texts:
I have a vector layer with a field called "dBM".

through query builder, I am hoping to change change the colour of the point depending on the value of "dBM".

e.g.

 "dBM" more than 20 ----> change colour of point to green

 "dBM" less than 20 ----> change colour to yellow

 "dBM" less than 0  ----> change colour to red


texts: How to calculate bus route transfer by using pgrouting?

texts:
Let say I have route 1 from A -> B -> C, route 2 from C -> B -> D,

how can I write SQL for pgRouting which can let me have the result route 1 -> route 2 when I want to get the shortest path from A to D?

Or should I just use Neo4j or other server side solutions in this case?


texts:
I have two public maps, yet when I go to view them via the public links I get a page that says:

"Looks like this map no longer exists or is set as private"

All my datasets are public. Any thoughts on what's going on?

Public profile with maps visible: https://stephentracyis.cartodb.com/me

Map 1: https://stephentracyis.cartodb.com/viz/8bf8536e-8dbd-11e5-a522-0ecd1babdde5/public_map


texts: Keeping symbology unaffected by data frame rotation in ArcMap?

texts:
In ArcMap 10.3, I am trying to recreate a city planning map that uses a lot of crosshatched and line-based symbology for different elements in the map legend like so:

No projection information is provided, so I assume that the authors rotated the data frame slightly (~17 degrees) from the original map projection orientation to keep boundaries horizontally straight.

In my emulation attempt, I have rotated the data frame. However, doing this has the effect of also rotating the symbology, causing symbols that appear straight in my legend to become offset by the angle of rotation as shown in this zoomed in re-creation of the previous image:

Is there any way to make the symbology independent of the data frame's angle of rotation?

The angle of lines can be edited manually in the symbology options and offset by the data frame's angle, however, I was wondering if there is an automatic option for this.


texts: How do I assign a unique ID area to an area of a shapefile so I can rasterize it?

texts:
I have a shapefile (which can be downloaded from this dropbox link) that I'd like to rasterize so I can merge it with some non-geographic data (I have the code to do this already). Unfortunately, the shapefile does not have a unique ID assigned to each delimited area, as shown below. The region_id attribute isn't actually unique. (Look at the areas with 10, 14, and 15 as region IDs).

How can I assign a unique attribute to each of these delimited, closed regions so that I can rasterize the shapefile into the proper format? (In my case, an XYZ format with latitude, longitude, and a specific value).

The attribute table looks like this:


texts: Offset regular point grid inside polygon by a defined angle from north

texts:
Is there anyway to fill an irregular polygon with regular points but to also offset this regular point pattern with a defined angle offset from north? I make reference to an older answered post regarding the filling of polygons

Filling polygons with points or polygons


texts:
Currently in the process of creating an interactive choropleth map with different coloured regions to indicate rainfall levels. The problem I have is that to do this in mapbox GL JS, you have to create different layers to indicate the different colour fills.

Is it possible to use nested functions? For example, filtering in the fill-color option to allow me to keep it as one logical layer.

Something like this:

map.addLayer({
    "id": "state-fills",
    "type": "fill",
    "source": "states",
    "interactive": true,
    "layout": {},
    "paint": {
        "fill-color": 'filter': [["==", "state", "stateproperty", 'color'],
                                ["==", "state", "stateproperty", 'nextColor']],
        "fill-opacity": 0.5
    }
});


texts:
Is there a way in Qgis to create a text box in the map window like you can in the layout window similar to the labelling option in Mapinfo?

I've tried the following:

Use text annotations. This isn't optimal because you can't rotate the text annotation and when the window moves doesn't move the annotations.
Create a shape file with points and label the points and hide the symbols. This is the best work around but it doesn't seem as easy as creating a text box that you can rotate and assign individual attributes to.


texts: Find nearest point (in file A) for every point (in file B)

texts:
I have 2 csv files both with 3 columns: variable, lat, lon.

Let's call them file A and file B. File A has 100 values for variable (in this case city), File B has 100,000 values for variable (station numbers in this case).

The goal is to assign a city (from file A) to every station number (from file B). So for each city, I will have a station number which is the closest station number to that city (by euclidian distance using latitude longitude).

Does anyone know how I can do this? I've looked at using Nearest but that doesn't seem like what I'm looking for.

I can use ArcPy also if that helps, but I'm not too experienced in ArcGIS.


texts: Is there a way to replace just a specific character in a variable?

texts:
Here is an example
    township = township[3].replace("0", "")
My goal being that if 10.0 is the current value for township I want to remove the zero after the . but not the one after the 1 with the end result being 10. The code above doesn't seem to work.


texts: Order features in a spatialpolygonsdataframe in ggplot2

texts:
I have a spatialpolygonsdataframe with many overlapping features. I want to create a map in which the smaller features are displayed on top of the larger ones so that the small ones aren't fully covered by the large, using ggplot2 in R. How do I reorder the features based on size in the map?
ggplot2 code below. I am trying to reorder the geom_polygon bit.

ggplot() +
geom_map(data = US, map = US, aes(map_id=region),
       color="grey45", fill="white", size=0.15)+
geom_polygon(data = all_basins, aes(x = long, y = lat, fill = factor(id)))


texts:
I have a 5m DEM for an entire province in Spain. It is over 48gb in size and is in asc file format. I only need a very small, 50 km² area.

I open the DEM in ArcDesktop, and i  get the loading bar for hours.

Suggestions?


texts: Differences between OSGEO GDAL and GDAL python bindings?

texts:
Question

I'm trying to figure what are the differences, and of course, what is the best solution to use, between two python3 bindings:

GDAL, imported as import gdal
OSGEO.GDAL, imported as from osgeo import gdal

Indeed, here are the results of some commands such as .__file__ and .__version__ methods for both of them;

$ python3
Python 3.6.9 (default, Nov  7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> import gdal
>>> gdal.__file__
'/usr/local/lib/python3.6/dist-packages/gdal.py'
>>> gdal.__version__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'gdal' has no attribute '__version__'

>>> from osgeo import gdal
>>> gdal.__file__
'/usr/local/lib/python3.6/dist-packages/osgeo/gdal.py'
>>> gdal.__version__
'2.4.0'
>>>

Environment and informations

Ubuntu 5.0.0-37-generic x86_64 GNU/Linux
Python 3.6.9 (default, Nov  7 2019, 10:44:02)

$ pip3 list | grep -i gdal
GDAL                          2.4.0

$ pip3 list | grep -i osgeo
(empty result)

$ apt-cache search gdal | grep -i python
python-rasterio - Python 2 API for using geospatial raster data with Numpy
python-stetl - Streaming ETL - Geospatial ETL framework for Python 2
python3-csvkit - public modules for csvkit (Python 3)
python3-rasterio - Python 3 API for using geospatial raster data with Numpy
python3-gdal - Python 3 bindings to the Geospatial Data Abstraction Library
python-gdal - Python bindings to the Geospatial Data Abstraction Library

$ apt-cache search osgeo
python-geolinks - Python 2 Library for using geospatial links (catalogue interoperablity)
python3-geolinks - Python 3 Library for using geospatial links (catalogue interoperablity)
pycsw - OGC compliant metadata (Catalogue Service for the Web) server
pycsw-doc - OGC compliant metadata (Catalogue Service for the Web) server - documentation
pycsw-wsgi - WSGI Apache CSW service based on pycsw
python-pycsw - OGC compliant metadata (Catalogue Service for the Web) server - Python 2
python-pycsw-doc - Transitional dummy package to pycsw-doc
python-pycsw-wsgi - Transitional dummy package to pycsw-wsgi
python3-pycsw - OGC compliant metadata (Catalogue Service for the Web) server - Python 3

I don't know from where do both packages come from at this point (e.g. which was installed by apt or pip).

Links

Difference between osgeo gdal/ogr python module and GDAL C++ library
https://gdal.org/
https://www.osgeo.org/


texts:
QGIS 2.13.2-Lyon

I`m new to QGIS and I'm struggling with getting data from a WFS connection:

http://sdi.fish.govt.nz/sdi/mapserver.wfs?service=WFS&request=GetCapabilities&version=1.1.0&

The error I get is:
Exception: Invalid VERSION for Request. Only 1.1.0 (GetCapabilities) supported

Based on my search, this is an issue other users encounter but I haven't been able to follow any of the solutions offered. Ultimately I want to:
a) get a list of layers available with this WFS connection b) download layers off this list.

My work flow is:

Layer
Add Layer
Add WFS Layer
New
add connection http://sdi.fish.govt.nz/sdi/mapserver.wfs?service=WFS&request=GetCapabilities&version=1.1.0
name connection NABIS
OK
Connect

Exception: Invalid VERSION for Request. Only 1.1.0 (GetCapabilities) supported


texts: Deleting contents from geodatabase in ArcPy?

texts:
I have a geodatabase and I would like to be able to delete layers in there easily using ArcPy. Also select which type of files.

Example: delete all file tables from the gdb or all layers.

Code:

env.workspace = r"path.gdb"
for i in arcpy.ListFeatureClasses():
    #how to delete?


texts:
I'm only able to get popup on click. Can we get popup on marker mouseover?

Here's the example link

Like in this example popup start display onclick on marker... But I wanted popup will automatically display when I'm moving my cursor over the marker icon.


texts: I'm working on a project using QGIS. I have 3 layers in the project, city boarder, the location of the natural monuments, and a layer as background card. I am going to have these three layers in my project, and I want to have the photos of 129 natural monuments as a row at the corner of layout. When I try to export the project as a PDF documents, it doesn't allow to continue the process. Could you please help me to solve this problem?


texts: How can I determine the original spatial reference system of GML coordinates when I have their WGS84 equivalent but no EPSG?

texts:
I am querying out spatial information from a SQL database that stores locations that users input on a map as GML snippets. See below for an example:

<gml:Point xmlns:gml="http://www.opengis.net/gml">
  <gml:coordinates>-7823471.2337636035,5113510.302636641</gml:coordinates>
</gml:Point>

This coordinate format is not familiar to me and I would like to be able to convert the coordinates to WGS84 but I will need the original spatial reference system EPSG which is not a part of the snippet.

I have access to ESRI shapefiles that our system generates for us so that we can view this data in ArcMap. I am able to see what these coordinates are in WGS84 Lat/Long by looking at those shapefiles, but I have no information indicating how the shapefiles are created from the original coordinates and our contract with the vendor who built the system has long expired.

Given that I am able to see their WGS84 Lat/Long equivalent, how might I go about determining the original spatial reference system so that I can convert the coordinates from the mystery system in the GML snippets to WGS84?

The shapefiles I have are only a small recent subset of the entire data set. I am seeking the spatial reference system of the GML snippet coordinates so that I can convert them into WGS84 for every record in the database (12,000 + records).


texts:
I'm using the following code in my ArcMap python window and it's throwing an error. I'm trying to sort by two fields, one ascending and the other descending. The error seems to be indicating a typo but the field names are correct. This is referencing a layer in the table of contents from a file geodatabase feature class.

>>> with arcpy.da.UpdateCursor ("Parcels_Intersecting_ServiceLocations", ["Parcel_Ranking"], None, None, False, (None, "ORDER BY PGA_Plus_LIQ DESC, Fault_Dist_Meters ASC")) as curs:
...     q = 0
...     for row in curs:
...         q += 1
...         row [0] = q
...         curs.updateRow (row)
...

The error:

Runtime error
Traceback (most recent call last):
  File "<string>", line 3, in <module>
RuntimeError: An invalid SQL statement was used. [SELECT Parcel_Ranking, Shape_Area, Shape_Length FROM Parcels_Intersecting_ServiceLocations ORDER BY PGA_Plus_LIQ DESC, Fault_Dist_Meters ASC]

I did some sanity checks:

>>> arcpy.Exists ("Parcels_Intersecting_ServiceLocations")
True
>>> flds = [f.name for f in arcpy.ListFields ("Parcels_Intersecting_ServiceLocations")]
>>> print [f for f in ["Parcel_Ranking", "PGA_Plus_LIQ", "Fault_Dist_Meters"] if not f in flds]
[]
>>>

Am I missing something obvious here?


texts: WPS fix import of org.geotools.util.factory.GeoTools

texts:
I need to import the org.geotools.util.factory.GeoTools

import org.geotools.util.factory.GeoTools;

but the compiler has issues finding the import. I set up my project using maven with the following dependencies:

<properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <gt.version>20.0</gt.version>  <!-- change to GeoTools version -->
     <gs.version>2.14.0</gs.version>  <!-- change to GeoServer version -->
   </properties>

  <dependencies>
     <dependency>
       <groupId>org.geotools</groupId>
       <artifactId>gt-process</artifactId>
       <version>${gt.version}</version>
     </dependency>
     <dependency>
       <groupId>org.geoserver.extension</groupId>
       <artifactId>gs-wps-core</artifactId>
       <version>${gs.version}</version>
     </dependency>
     <dependency>
       <groupId>org.geoserver</groupId>
       <artifactId>gs-main</artifactId>
       <version>${gs.version}</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>4.11</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>com.mockrunner</groupId>
       <artifactId>mockrunner</artifactId>
       <version>0.3.6</version>
      <scope>test</scope>
     </dependency>
     <dependency>
        <groupId>org.locationtech.jts</groupId>
        <artifactId>jts-core</artifactId>
        <version>1.15.0</version>
    </dependency>
     <dependency>
        <groupId>org.opengis</groupId>
        <artifactId>geoapi</artifactId>
        <version>3.0.0</version>
    </dependency>
   </dependencies>

My project also makes use of import org.geotools.util.logging.Logging; and this works. All other imports work good. This is the only one that fails. Unfortunately googling didn't help me. Is this a version issue? Is this import renamed or deprecated? What can I do?


texts: How to force a label to be positioned in the center of a line? In QGIS the project I'm working on has this river line that crosses the polygon. I tried all kinds os settings to make the label be in the center of the line but nothing seems to work! How can I do it without placing it manually?


texts: Point overplotting on maps in R (e.g. with ggplot2) - how to push points to the side, mark original positions, combine close-by points ...?

texts:
I've got a database containing languages, their longitudes and latitudes and a feature value (either category 1, category 2 or both - in the plot these are marked red, blue and green respectively). There may be up to three points per language and naturally two language points may lie very close to each other.

    name            longitude   latitude    sp_sum
1   Modern Armenian 45          40          both
2   Modern Armenian 45          40          both
3   Modern Armenian 45          40          spatial
4   Dieri           138         -28.1667    both
5   Dieri           138         -28.1667    both
6   Finnish         25.5577     64.7628     non-spatial
7   Crimean Tatar   28.1418     43.8398     spatial
8   Ese Ejja        -67.515     -11.7268    non-spatial
9   Makhuwa         38.8052     -14.8509    non-spatial
...

I'm using the R package ggplot2 (that is the one I am most familiar with, so I'd be happy to keep using it - but other solutions are also welcome). Here's a crop from a previous attempt (code: see below 1):

For every point, I'd like the (rough) position - as well as the value - still to be visible. (If there are multiple points for a single language, they may be combined.)

Is there a way either...

... to move points to the side just enough so that there is no overplotting (less randomly than, say, by using geom_jitter - there is a lot of that kind of dodging in the beeswarm package for example)?
... and/or to have some kind of "line" pointing to the original position of a point if it had to be moved?
... or to combine close-by points in a way that they are still clear (there is probably a working technique out there that uses binning, i.e. stat_bin* or something with a similar effect)?
... or to create an "interactive plot" like those seen on websites that still can be included into a pdf (I'm thinking also about the abilities of packages like animation and shiny here)? For example, it looks like this on wals.info:

From a previous post here, I know that the directlabels package can move labels, but I haven't found a way to make it move the points as well.

Feel free to ask for clarification!

Note: I am aware that there have been a number of questions on overplotting, but those that I have looked into all seemed to be have a different (i.e. statistic) purpose (I don't claim to have read it all, so I'd be happy to accept a link as well, of course). I'll try to list those posts that I know and that may well be relevant (- from what I've read, none of these exactly answers my question.)

stats.SE:  How do I avoid overlapping labels in an R plot?
SO: Dynamic data point label Positioning in ggmap

1 The following lines of code created the crop from above.

library(OpenStreetMap)
library(ggplot2)

data <- read.csv(header = T, sep = ",", dec = ".", quote= "'",
text = "'','name','longitude','latitude','sp_sum'
'1','Modern Armenian',45,40,'both'
'2','Modern Armenian',45,40,'both'
'3','Modern Armenian',45,40,'spatial'
'4','Dieri',138,-28.1667,'both'
'5','Dieri',138,-28.1667,'both'
'6','Finnish',25.5577,64.7628,'non-spatial'
'7','Crimean Tatar',28.1418,43.8398,'spatial'
'8','Sochiapam Chinantec',-96.6079,17.7985,'non-spatial'
'9','Ese Ejja',-67.515,-11.7268,'non-spatial'
'10','Makhuwa',38.8052,-14.8509,'non-spatial'
'11','Mualang',111.077,0.31083,'non-spatial'
'12','Martuthunira',116.607,-20.9294,'non-spatial'
'13','Evenki',108.626,53.85,'both'
'14','Afrikaans',30,-22,'both'
'15','Male (Ethiopia)',36.9892,5.91975,'both'
'16','Manchu',126.557,47.3122,'both'
'17','Dime',36.3329,6.20951,'non-spatial'
'18','Koorete',37.8679,5.80545,'non-spatial'
'19','Wolaytta',37.7537,6.32668,'both'
'20','Dizin',35.5763,6.1405,'both'")

map <- openproj(openmap(c(85, -179.9), c(-60, 179.9), zoom = 2, type = "nps"))
plot <- autoplot(map) +
  geom_point(data = data, aes(x = longitude, y = latitude),
             color = "white", alpha = 0.8, size = 8) +
  geom_point(data = data, aes(x = longitude, y = latitude, color = sp_sum),
             alpha = 0.3, size = 4)
plot


texts: I have downloaded some Planet imagery from the tropics (available for free), but the images have these blurry patches. Does anyone know what these are?


texts: Using Python Parser in ArcGIS Field Calculator to compare two fields?

texts:
I'm trying to use field calculator to compare two fields in a table of tax parcel data, Land Value (LAND_VAL) and Improvement Value (IMPRVT_VAL). My goal is to determine (1) Parcels with land value less than the value of improvements, (2)Land value about the same value as improvements, (3) Land value more than improvement value, but less than twice the value, and (4) Land value which is more than twice improvement value.

I wrote the following script, and it runs successfully in Field Calculator (doesn't give any errors), but it only returns 4, which is clearly not the case in the data.

LV = " !LAND_VAL! "
IV = " !IMPRVT_VAL! "

def Recode(Val_Analys):
    if LV < IV:
        return 1
    elif LV == IV:
        return 2
    elif (LV > IV and LV < (IV * 2)):
        return 3
    elif LV > (IV * 2) :
        return 4
    else:
        return 0

Recode(!Val_Analys!)


texts: Merging all tiles from one directory using GDAL

texts:
I would like to use GDAL (under Windows; OSGeo4W Shell) to merge all GeoTIFFs from one directory into a new GeoTIFF. I have tried to address them by writing c:\data\....\*.tif which however does not seem to work, using the Windows environment.

I am looking for the most practicable way to perform this operation; if possible completely within the OSGeo4W Shell. Addressing every single mosaic part name 'by hand' in the Shell is not an option.


texts: What is the future of ArcGIS web development ? Is it JavaScript and HTML5?

texts:
I want to know about the future of ArcGIS web development; is it HTML5?

I used to work with ArcObjects and .NET Web ADF so what is the best technology I must follow, especially when I know that Silverlight version updates have been stopped?

So I think that the best technology that must follow .NET in the future is JavaScript with HTML5. Is it true?


texts:
I posted How to save just some mxds through 'if' in python? yesterday, and now I want to do a change in the script.

I changed the script, to run over sub-folders. It goes nice, but when it jumps another folder level, for the second time, I got an error:

Traceback (most recent call last):
  File "D:\teste\change_jpg_layout_subfolder.py", line 18, in <module>
    mxds = arcpy.mapping.MapDocument(MXDpath)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\arcobjects\mixins.py", line 609, in __init__
    assert (os.path.isfile(mxd) or (mxd.lower() == "current")), gp.getIDMessage(89004, "Invalid MXD filename")
AssertionError: Invalid MXD filename.

There is nothing wrong with the foldernames and mxdnames. No special characters, no spaces, nothing. It just doesn't go further.

This is the code now:

import arcpy, os, glob

source = os.curdir
mxdList = []

for dirpath, subdirs, files in os.walk(source):
  for x in files:
    if x.endswith(".mxd"):
      mxdList.append(os.path.join(dirpath, x))

print mxdList

for mxd in mxdList:
    MXDpath = mxd
    mxds = arcpy.mapping.MapDocument(MXDpath)
    for elm in arcpy.mapping.ListLayoutElements(mxds, "PICTURE_ELEMENT"):
        if elm.name == "logo":
            elm.sourceImage = r"C:\logo\newlogo.jpg"
            print MXDpath
            mxds.save()
        del mxds

Can you help me please, again?
I also wanted to put the "mxds.save()" under a "try" conditional, that if for a reason the script couldn't save it, the script goes on... But I don't know how to do it.

This is my folder structure:


texts: Installing QGIS 2.16 together with QGIS 2.14 standalone?

texts: I have just downloaded and installed QGIS Standalone Installer Version 2.14 (64 bit)from this site for a Windows 7 OS. It seems that version 2.16 has been installed too! When I launch a QGIS project, the 2.16 version is loaded automatically... I would like to work with the new LTR version only. My issue is that I can't find any folder related to 2.16 version on my computer (C:\) and version 2.14 only appears in the Add / Remove Programs control panel; therefore I'm not able to uninstall it.


texts: Map eastings in QGIS 2:18 Print Composer alternate between correct values, then negative values

texts:
Using CRS OSGB 1936 (ESPG 4277) at various map scales in Composer, I find that the northings are all correct, but the eastings alternate between two or three correct values, then two negative ones.

I upgraded to version 3.2.2. The problem still exists.


texts: VBscript Regular Expression in ArcMap Field Calculator

texts:
I'm looking for a regex in VBscript that I can use on a ArcMap table. I know what it would look like in python:

pat =r'[0-9]{3,4}'

This filters all numeric characters from the string which have the length 3 to 4. So from AO123 you'd get 123 and from VO2-324C, 324.

What would be the equivalent in VBScript? How do I implement it with the RexExp Object? ArcGIS has a Field calculator that let's you execute VBScript code. But even the most simple regex (see screenshot) fails with the error message object needed: 're'.


texts: Calculate weighted azimuth/bearing of a line

texts:
Given the line

LINESTRING(-9.086532643219698 -7.939337106873815,-1.396102955719698 -0.9775148048290135,-0.780868580719698 -0.7138718839794582,-0.077743580719698 -0.6699297767574899,0.581436106780302 -0.6699297767574899,1.372451731780302 -0.6699297767574899,1.987686106780302 -0.6699297767574899,2.690811106780302 -0.7578135712925369,3.218154856780302 -0.6699297767574899,0.801162669280302 1.1756755719445946,10.293350169280302 9.525132229415934)

Which look likes this (start point is bottom left):

What is the correct methodology to find the overall azimuth which based on visual inspection should be something like this red line:

At first glance I figured if I calculate the azimuth between every point pair and then average them it would get what I want (something like https://social.msdn.microsoft.com/Forums/officeocs/en-US/74cd7844-30fe-43d3-a45e-9733c83d09b3/vector-average-function-in-tsql?forum=transactsql )

Using this approach the average azimuth is ~72.22 when I would expect it to be around ~50 degrees.

I  realized that it doesn't take into consideration the length (magnitude) of each line segment, and the 2 dominant segments (both ~45 degree azimuth) only accounts for 2/10 of the average (2 point pairs of the total 10 point pairs).

https://paste.ee/p/uH04D

So it seems liked I need to use the length of each segment as a weight to the average.

That's when I thought maybe vector math (dot product) is whats needed because I have a magnitude (length) and angle (azimuth); However, because the segments (vectors) are already lined up head to tail, the resultant vector's angle would just be the angle between the start point and end point (which is not what I am after)

I am looking for approaches to mathematically solve this problem, or references to what it's called that I am after.


texts: Downloading google maps traffic in shp format?

texts: Is it possible to get (download) the info of roads traffic (google maps.com) of an area (in shp format)? If yes, how?


texts: enabling feature access without installing ArcSDE 10.1?

texts: Is there any way to enable "feature access" when publishing a map using ArcGIS 10.1 server, without installing ArcSDE?


texts:
I want to classify an Aster image using the ASTER Spectral Library - Version 2.0
Anyone here ever done this? Any suggestions?

Note: I'm using opensource GIS and Remote Sensing software

Thanks.


texts:
I'm writing a QGIS plugin using PyQGIS and I have a weird problem.

When executing following line of code:

processing.runandload("qgis:createpointsalonglines", r"Clipped", 1, 1, 0, r"memory:nodes")

Seems like Qgis doesnt allow me to output to a memory layer. The function works fine if I output to a an real (not-memory) layer, but I don't want that).

Why don't I want that? Beceause in that case, I have to create the layer first, and I need to have a path to save it..

The error:

However, with other processing.runandload functions (for example "qgis:clip"or qgis:orientedminimumboundingbox), it works fine with memory layer

For example,

I execute

processing.runandload("qgis:clip", "parallel", "polygon", r"memory:Clipped")

and

processing.runandload("qgis:orientedminimumboundingbox", "polygon", 1, r"memory:Oriented_MBBox")

without any problem, in the same program.

Anbybody has any idea why the problem occurs with the createpointsalonglines function?

The problem would also be solved if I outputed to a real layer. But in order to create a layer, you have to define the save path... But that doesnt seem like a good option, since I would then have to ask the user to give me a save path first.. Is there a way to create a layer somewhere without having to ask where? Maybe in the plugin folder? But how do I know the path to the plugin folder?


texts: SQL query to have a complete geojson feature from PostGIS?

texts:
I would like to get a geojson feature with properties from PostGIS. I have found an example to have a feature collection but I can't make it works for just a feature.

SELECT row_to_json(fc)
 FROM ( SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As features
 FROM (SELECT 'Feature' As type
    , ST_AsGeoJSON(lg.geog)::json As geometry
    , row_to_json(lp) As properties
   FROM locations As lg
         INNER JOIN (SELECT loc_id, loc_name FROM locations) As lp
       ON lg.loc_id = lp.loc_id  ) As f )  As fc;

so far I tryed to modify the feature collection query of the example. but the output is not valid.


texts: How can I dynamically supply the value of mapextents to the Mapfile?

texts:
Is it possible to query a PostGIS database from a browser where I set the extents of the map?

I have previously queried a PostGIS database from the browser and, separately, used MapServer to display a raster using a WMS query. Now I'm wondering if I can join these two separate pieces together. The part that I am not understanding is how to insert the query into the MapServer code. For example, if my MapServer layer piece is as follows:

LAYER  # start layer
            CONNECTIONTYPE postgis
            NAME "roads
            CONNECTION "user=username
            password=**** dbname=databasename host=hostdb.com port=5434"
            DATA "geom from tablename where ST_Intersects(geom, mapextents)"
            STATUS ON
            TYPE LINE
            CLASS
                STYLE
                    COLOR 0 0 0
                END
             END
END # end layer

How can I dynamically supply the value of mapextents to the MapServer file? I have considered the .map piece usually to be static but perhaps this is incorrect.

An example of the type of query that I want to perform is as follows:

SELECT
    ST_Clip(r.rast, 'POLYGON((-8293673 4952790,-8137619 4952790,-8137619 5036076, -8293673 5036076,-8293673 4952790))'::geometry)
FROM
    raster AS r
WHERE
    ST_Intersects(r.rast, 'POLYGON((-8293673 4952790,-8137619 4952790,-8137619 5036076, -8293673 5036076,-8293673 4952790))'::geometry)

Secondly, where should I be storing the .map file? At the moment I have them in a web readable folder but I know this is not a good strategy once I need to store a password.


texts: Using Arcpy to create tool to buffer 2 feature classes

texts:
I am trying to create a toolbox that will generate a buffer around 2 feature classes. ]1

I feel like I am missing out a few minor things and that there is something wrong with my toolbox parameters?


texts: QGIS edit toggle does not work with ANY layers I bring in (as shapefile)

texts:
I bring in polygon as Shapefiles and they display, I can select, all looks well.  However the toggle edit is ALWAYS greyed out.  If I make a new layer with features in it, the toggle edit is fine.  This is with any shapefile.

I've tried from three different sources.  I am very frustrated as I need toggle edit to merge polygons (and it seems many other things)


texts: Cannot extract cell values after reprojecting raster in R?

texts:
I've downloaded an 8-day composite (4x4km) of "chlorophyll a" for May 1, 2014.
https://oceancolor.gsfc.nasa.gov/cgi/l3?per=8D&prd=CHL_chlor_a.nc&sen=A&res=4km&num=24&ctg=Standard&date=1May2015

I opened the chlorophyll file in r:

chloro<-raster(path.expand("C:/MODIS_data/CHL_A_MODIS/1May2014_L3M_8D_CHL_4km.nc"))

I then made the following polygon in r:

vertices<-c(-129.0417,-129.0417,-130.4583,-130.4583,50.45833,51.79166,51.79166,50.45833)
vertices<-matrix(vertices,4,2)
polygon<-Polygon(vertices)
polygono<-Polygons(list(polygon),1)
polygonsp<-SpatialPolygons(list(polygono))
proj4string(polygonsp)<-CRS("+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0")
plot(polygonsp)

I used the polygon to crop the chlorophyll raster to my study area:

chloro_area<-crop(chloro, polygonsp)

I wanted to look at the distribution of chlorophyll values in the region so I extracted the data as a data frame:

chloro_df<-as.data.frame(chloro_area)

I can open this df and see the values without any problem.
However, because of the format of my other data files, it is preferable for me to project the raster in UTM.

chloro_area_utm<-projectRaster(chloro_area, crs="+proj=utm +zone=9 ellps=WGS84 datum=WGS84")

However, when I try the same code, I get a data frame filled with NA values.

chloro_df_utm<-as.data.frame(chloro_area_utm)

Why won't it work?
I would like the raster to be in UTM so that I can overlay SpatialPoints, and calculate distances, etc.


texts: Add/Remove Relate using ArcPy without ArcGIS Pro?

texts:
I am trying to add a relate between 2 feature classes so that I can use the area of the related table to update a field in the original table.

I found that ArcGIS Pro (http://pro.arcgis.com/en/pro-app/tool-reference/data-management/add-relate.htm) can do this, but a similar feature is not available to ArcPy when used with the ArcGIS 10.3 environment i.e. I am not using ArcGIS Pro.

I followed the script at the bottom of the ArcGIS Pro help page for Add Relate (believing that they would be the same), but get the error that the module has no attribute 'AddRelate'.  This confirms the result seen in Terminology for distinguishing ArcPy installed with ArcGIS 10.x for Desktop from that which comes with ArcGIS Pro?

I am aware of the CreateRelationshipClass_management tool, but don't know if this the same thing and if it is, how to call a related field after establishing the relationship.

Can anyone either explain the CreateRelationshipClass tool better (I can't seem to understand the help documents) or explain how to better relate two tables so that I can access another column?

I did try joining the tables, but I can't get them to unjoin afterwards and I don't want the additional fields actually in my table.


texts: Communicating with separate ArcGIS Add-in?

texts:
Is it possible to access the functions or properties of an ArcGIS Add-in project (C#) from another Add-in at run time?

I have a custom ArcMap application extension installed and I would like an Add-in command from a different project to check if the extension is enabled and if so read/write a property from it.

I have seen this help doc but it only talks about communication within the same project.
Add-in coding patterns

So far the only way I know how to do this is to add a reference for the extension's dll to the other Add-in projects. I'd like to set it up to be independent though.

I'm using ArcGIS 10.4.1 and VS 2015 if it matters.


texts: Selecting correct ArcGisFeatureLayer to query onSingleTap event?

texts:
My problem: I'm working on a Android (ArcGis) Attribute Editor following the sample code from their tutorials. The problem occurs when I have more than 1 ArcGisDynamicLayer and, more important, more than 1 ArcGisFeatureLayer.

My question: What is the (correct) approach to IDENTIFY the right Feature Layer to query when I tap on a "field" displayed on the map?

I read a similar question (Arcgis SDK for Android - Query multiple feature layers), but I didn't understand how to use IdentifyTask using only a single tap.


texts: ST_3DClosestPoint for all Linestring Vertices and another Linestring

texts:
I want to get the closest point for each vertex of one linestring (table2) and another linestring (table1). So far, I have came up with the folowing query but it works only for one point and If i remove the limit 1 it gives me an error.

ST_3DClosestPoint(
    (SELECT geom FROM table1 limit 1),
    (SELECT ST_PointN(geom, generate_series(1, ST_NPoints(geom))) FROM table2 limit 1)
    ),
    (SELECT ST_PointN(geom, generate_series(1, ST_NPoints(geom) )) FROM table2 limit 1)
)


texts: Compress GTiff External Overviews with GDAL API

texts:
Is it possible to build compressed external overviews with the gdal API? I see examples of using gdaladdo with a COMPRESS_OVERVIEW option passed to the configure flag, but I don't see an equivalent in the GDAL API for the BuildOverviews function.

For reference, I'm using the Python bindings (though don't mind C++) like this:

# open read-only to build external overviews
raster = gdal.OpenEx(raster_path, gdal.OF_RASTER | gdal.OF_READONLY)
raster.BuildOverviews('average', xrange(1, 10))


texts: Is there any fix for a fieldname that already has spaces in it?

texts:
I get it. I won't do it again. Is there any fix once it is already done? I would have preferred they gave me an error when I brought the file in.
The data came from a county database where the .csv file had spaces in its title (also had an and in it). The field attributes created based on that .csv without any manipulations. The table was later joined to a shapefile to match attributes.


texts: Select features and zoom to selection on standalone QGis application

texts:
I'm trying to select and zoom on selected features on standalone QGis application.
Selection seems to work, console shows me list of selected items and they are exactly I expected.

ids = []
for f in kt.getFeatures():
 if f['KatastriNumber']==k_n:
     ids.append(f.id)
     print f['eraldus']
kt.setSelectedFeatures(ids)

But zooming to selection does not work. I have tried many code samples i found from internet. None of them doesnt zoom to selected. Can only zoom to entire layer with:

canvas.setExtent(kt.extent())

I tried to make a box with command:

box = kt.boundingBoxOfSelected()
canvas.setExtent(box)

This gives no result.Then I tried with command

canvas.zoomToSelected(kt)

also no result.
How to tell app that some features from layer are selected?


texts: Layer Preview not showing published layers

texts: I have a Geoserver instance in which i published layers, The layer preview does list the available layers only when i'm logged in but it does not list them on the logged off layer preview page. How can i make the layers available publicly even if you are not logged on?


texts: Starting osm2po without parsing osm.pbf?

texts:
I use the demo batch to start osm2po

java -Xmx1408m -jar osm2po-core-5.0.0-signed.jar prefix=hh tileSize=x,c map.osm.pbf

How can i start the webserver without parsing all the data again (because i think it only needs to be done once)?


texts:
I'm trying to get a list of all points (from a point layer) that can be found in a unique rectangle polygon.

Input layer 1: points (address data)
Input layer 2: rectangle polygon layer (created with research tools, create grid)

I used the grid to create an atlas and now my goal is, to get different lists, that show me what page contains what addresses.

As output I need a list with all addresses and an "extra column" that shows me on what atlas page I can find each address. So that I can take the right page when someone gives me an address to find.

If there is a function to analyse that, I'm unable to find it.


texts: How do I combine many ECW files in MapInfo?

texts:
I have MapInfo 11.5.0.16 (I don't have ArcGIS) and I am trying to combine (in some sense) a large collection of ECW files.

I can load one ECW at a time in MapInfo but I have very many. MapInfo creates one TAB file per image, and I need to manually choose a projection for each image. This is time consuming and prone to human error and I would need to open each tab file, which creates one layer per image.

I would like to open one TAB file in MapInfo which creates one layer in a map, where that layer will display all the ECW files.

I've reviewed the similar questions and Google but I can't seem to find a solution that works for MapInfo. Thanks for your assistance!


texts: How to customize the background-image of LayerSwitcher in OpenLayers?

texts:
How can I override the image used (sign '+' with a blue half circle) for the LayerSwitcher Control in OpenLayers?
Is it possible to do so with background-image in css? I see nothing related to this image in the default style.css...


texts: QGIS Processing Toolbox: otb provider XML

texts:
Good day,

I am trying to integrate an OTB application into the processing toolbox.

MANUALLY created a XML file for it but get : Could not open OTB algorithm: C:/OSGeo4W/apps/qgis/./python/plugins\processing\algs\otb\description\BuildingExtraction.xml
Traceback (most recent call last):
  File "C:/OSGeo4W/apps/qgis/./python/plugins\processing\algs\otb\OTBAlgorithm.py", line 142, in defineCharacteristicsFromFile
    the_result = map(self.adapt_list_to_string,rebu)
  File "C:/OSGeo4W/apps/qgis/./python/plugins\processing\algs\otb\OTBAlgorithm.py", line 93, in adapt_list_to_string
    a_list[3] = -1
IndexError: list assignment index out of range

Here is the file:

    <root>
<key>BuildingExtraction</key>
<exec>otbcli_BuildingExtraction</exec>
<longname>Building extraction</longname>
<group>Segmentation</group>
<description>Classify segments into building/not building classes</description>
<parameter>
  <parameter_type source_parameter_type="ParameterType_InputVectorData">ParameterVector</parameter_type>
<key>train</key>
<name>Training set</name>
<description>at least 10 buildings and 10 non buildings.</description>
</parameter>
<parameter>
<parameter_type source_parameter_type="ParameterType_InputVectorData">ParameterVector</parameter_type>
<key>data</key>
<name>Set to classify</name>
<description>From cartographic mapping.</description>
</parameter>
<parameter>
<parameter_type source_parameter_type="ParameterType_OutputVectorData">OutputVector</parameter_type>
<key>out</key>
<name>Output Vector</name>
<description>Output VectorData.</description>
<hidden />
</parameter>
<parameter>
<parameter_type source_parameter_type="ParameterType_String">ParameterString</parameter_type>
<key>modelname</key>
<name>Output SVM model</name>
<description>Output SVM model name prefix.</description>
</parameter>
</root>

Basically: 2 vector data shapefiles as input, 1 name for the output model and 1 output vector data for results.

What am I missing?


texts:
I set up deegree 3.4.0 with Tomcat 8 and JDK 8.x by copying the WAR file to the webapps folder as described in the documentation. After that I tried to open the service console at localhost:8080/deegree-webservices-3.4.0 and got the following error message:

An Error Occurred:
Cant instantiate class: org.deegree.console.webservices.ServicesBean.

Could someone tell me what's wrong?


texts:
I am using the 4 corners of a grid to clip a raster to it with gdalwarp with the following code: pkdumpogr -i index.shp -n left1 -n bottom1 -n right1 -n top1| while read Block_ID left1 bottom1 right1 top1; do gdalwarp -overwrite -te $left1 $bottom1 $right1 $top1 TII.tif TII_${Block_ID}.tif;done

However, gdalwarp is not clipping to the exact boundary as can be seen in the image below. Any ideas of how to fix this?


texts: Why can ArcGISDynamicMapServiceLayer read a cache service?

texts:
I received a cache folder created from a MXD that I don't possess. Then I was asked to publish that cache as a map service.
To do that, I created a map service using a MXD (I created) that contains one layer. That layer has no relation with the cache.
Then I configured the map service to use the cache I was given.

In a !flex application, when I use the map service using esri:ArcGISDynamicMapServiceLayer, it works : I get on the map what the cache contains, not what the MXD contains.

I'm a little confused. ArcGISDynamicMapServiceLayer is not supposed to read from the cache of the service! Only ArcGISTiledMapServiceLayer is supposed to be able to read from the cache. Am I wrong?

Why do I get the cached data on the map instead of the MXD data (which is different from the cache)?

Here is a simple graphic explaining the situation.

Regards.


texts:
I have a DSM derived from drone LiDAR that I want to use as a base to drape imagery and, paired with a DTM, as a basis for estimating canopy height/volume.

Unfortunately, the DSM has has many "spikes" along boundaries between flight lines. I inverted the DSM by multiplying by -1, making the spikes sinks. I determined that the sinks >50 feet deep were errors that I want to fill while sinks <50 feet deep were trees/shrubs that I want to retain. But the FILL tool only allows setting a z limit for the maximum elevation difference between a sink and its pour point to be filled.

I want to set the minimum elevation difference to be filled (e.g. > 50 feet).


texts: Find polygons which are intersecting / touches with defined polygon

texts:
I have a polygon and I would like to find all polygons from the table planet_osm_polygon which my polygon lies in or touches. I tried to use st_intersects function but it doesn't work as I would expect. See my command below..

WITH bbox AS
    (SELECT st_transform(st_makeenvelope(9.3183939, 48.8282700, 9.5182078, 48.9375419, 4326), 3857) AS geom)
SELECT p.*
FROM
    (SELECT * FROM planet_osm_polygon WHERE boundary IS NOT NULL AND admin_level IS NOT NULL) p,
     bbox b
WHERE st_intersects(p.way, b.geom);

It seems that by my query I receive only polygons which are crossing my bbox (see image below) however I would need to receive also polygons which are not just crossing my bbox but also polygons which are completely around my bbox.


texts: How to handle sensitive geographic data?

texts:
You use sensitive geographic data every day.  What are your strategies to protect them in your geographical information systems?

What kind of architecture do you use?

What encryption method do you use?

What do you do for users who export sensitive data from your databases?


texts: How to create an interactive web mapping site with comment/rating system?

texts:
I'm trying not to ask something that's already covered by the other 'beginning web mapping' questions, but I want to do something that I don't see covered here yet. Maybe I'm just missing it.

Basically, I want to create an interactive web mapping site. Here's the way I picture it: there is a main map, showing points (pretend they're campsites). When a user clicks on a campsite, in another pane info on that campsite pops up, along with the ability to make comments on it. The user can also add other points, and draw rough polygons, lines, and add text boxes, that all other users see. It will be kind of a giant scratchpad, or scribble map that all users can contribute to. I`d also like to add some kind of thumbs-up, thumbs-down rating system for any comments on the individual campsites, and overall rating system for each user (this looks pretty daunting to me after typing it out!)

I'm new to web mapping, as you may have guessed, and I think I know how to proceed to get the maps online, but it's the interactive part that I could really use some general direction on. I have mid-level skills with the basic tools: html, css, php, mysql, if that helps.

Many thanks!


texts: How to rectify a georeferenced Google Earth image and corresponding layer

texts:
I am still a newbie to georeferencing and ArcGIS.

I imported an image with place markers from Google Earth. Then I opened up the image in ArcGIS Desktop 10.3.1. I then georeferenced the control points and converted the KML file for my point data from Google Earth. This worked and all the data lines up perfectly. However, my image and the data are on an angle. How can I rotate everything so I can make a usable map?


texts:
I have some text in a column in QGIS, I am using field calculator, I need to replace it with some other text.

This is what I have so far:

replace("url", 'Y:\Natural Environment Record\', 'http://www.exmoor-nationalpark.gov.uk/PAttachments//NER/')

It doesn't seem to like this, any ideas?  This goes along side the answer to my last query getting spaces removed and to include them as %20 (Réf. Inserting %20 instead of a space as a string)


texts: R - Create multiple linestrings from multiple coordinates

texts:
I have a dataframe with two sets of coordinates X,Y and prevXal,prevYval and I would like to make linestrings column wise, and create an sf object of the same number of linestrings as rows in the dataframe.

Using this dataframe example, I would like to create 4 linestrings.

library(sf)
df
            X       Y prevXval prevYval
1    -0.121  65.001    0.067   65.117
2   180.000 -50.039 -179.879  -50.156
3    -0.075  47.787    0.038   47.904
4   179.754 -73.960 -179.900  -73.979

I started with st_linestring(), but this function works down the rows.

So I tried a function to break up the points to the right input format for st_linestring().

# Create a function that creates a linestring - that extracts vectors (using the as.numeric fn) of the X,Y and prevXval, prevYval points from nx4 dataframe, then bind to a matrix
make_line <- function(x) {rbind(as.numeric(df[x,1:2]),
                              as.numeric(df[x,3:4]))%>%
            # Convert to a linestring object
            st_linestring()

make_line(1)
LINESTRING (-0.121 65.001, 0.067 65.117)

This works for one row, but I can't seem to find an efficient way to iterate over all the rows, having also tried purrr. Any suggestions?


texts: How to query WFS layer in ArcGIS Online?

texts:
I want to incorporate the following WFS query URL in ArcGIS Online:

https://9.9.9.9:8080/geoserver/workspace/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=workspace:education&filter=
<PropertyIsEqualTo><PropertyName>amenity</PropertyName>
<Literal>school</Literal></PropertyIsEqualTo>

The query above was tested positively. However when adding that to ArcGIS Online the URL requires to be shortened down to 'GetFeature', the layer selection happens via dropdown menu and supposedly the query part goes into 'Add Parameters' doesn't it?

Parameter = filter
Value = <PropertyIsEqualTo><PropertyName>amenity</PropertyName>
    <Literal>school</Literal></PropertyIsEqualTo>

I also tried to add the workspace/layer declaration as parameter to no avail. The Parameters appear to be ignored because all the GML is parsed unfiltered.
What am I missing here?

Note: The answer here suggests to tediously sign up to an ESRI developer account but that seems to be from a time where WFS wasen't supported at all.


texts:
I used the following code to create a bias file in R for MaxEnt. I am able to create the bias file, but I am not able to save it as ascii (see error message). My lat/lon csv file contains only points located within Kenya, and the variable I used to create the brick was already clipped to Kenya. These two files work fine in MaxEnt. I am not sure why I am getting the error at the end.
locations<-read.csv("M:/GISKenya/latlon locations.csv")
plot(locations)

climdat<-brick("M:/GISKenya/Kenya_ASCII/bioclim19_asc.asc")
plot(climdat)

occur.ras<-rasterize(locations, climdat, 1)
plot(occur.ras)
cellStats(occur.ras, sum)

presences<-which(values(occur.ras) == 1)
pres.locs<- coordinates(occur.ras)[presences, ]

dens <-kde2d(pres.locs[,1], pres.locs[,2], n = c(nrow(occur.ras), ncol(occur.ras)))
dens.ras<-raster(dens)
plot(dens.ras)

writeRaster(dens.ras, "M:/GISKenya/Amblyvar bias file4.asc")

Error in .startAsciiWriting(x, filename, ...) :
  x has unequal horizontal and vertical resolutions. Such data cannot be stored in arc-ascii format


texts: Rasterize shp polygons with gdal_rasterize and ALL_TOUCHED - adjacent polygons - select value for burn in

texts: I have a shapefile with streets as polygons, each polygon as an attribute describing its type (for emission modeling). Now I have a highway with an adjacent minor road. When I raster this shapefile layer with 32m resolution without ALL_TOUCHED (-at), the streets do not appear as cohesive pixel rows in the raster. With ALL_TOUCHED, they do. However, as the minor road and the highway are close by, the type that is burned into the raster corresponds largely to the minor road, I would want the highway to be dominant (lower type numbers are in my case more important). Can I tell gdal_rasterize, it should favor smaller attribute values for burning? Workaround would be to rasterize certain street types separately and then numpy.minimum.reduce() it to the lowest value, but it's not as beautiful.


texts: How to make Properties > Change Symbol > Symbol Selector > Edit Symbol dialog loading faster?

texts:
Is there any way to tweak ArcMap to make the loading of the Symbol Selector and Symbol Editor dialogs faster?

I have a lot of symbols in my style files and I want to keep it that way since it is essential for my workflow.  I understand that style files are access mdb databases so i compacted them but that didn't help although it did reduce the size of the databases.  There is a lot of lag (5 - 6 seconds) between clicking the "Change Symbol" in the "Properties dialog" and another 5 - 6 seconds between clicking the "Edit Symbol" button in the "Symbol Selector" and the Editor dialog coming up.

Another place where things get quite slow is editing custom symbols, especially complex symbols composed of many layers - the properties in the Symbol Property editor take a while to refresh and it refreshes after every single change.

I am planning on going through my symbols library and purge any that are unused but i have doubts it will help much. This is a common issue even in with a new install of ArcGIS with only the dafault style file.

Does anyone know a way to fix this?


texts: Tilemill 2 (not v1): How to set map extents or bounds for export?

texts: I'm using Tilemill 2 and trying to set bounds or extents in order to reduce file size but I can't figure where to do that. I'm also getting a 422 error when trying to upload to my mapbox account and am guessing that is a file size error but I don't actually know.


texts:
Few months ago I donwloaded full planet.osm dump and imported it in postgresql database via osm2pgsql. Later I removed the dump file. Thats why I don't know the timestamp of my current osm data. How can I get this timestamp?

If I will know this timestamp, how can I download and import to my postgresql database the diff between this timestamp and now?

P.S.: import the full dump again is bad idea, it is too slow.


texts:
Can I make the filter by the value that is obtained by the function?

for feature in iter:
    name_dot =  feature['name']
print name_dot
expr = QgsExpression("\"name\"=name_dot")
selection= layer.getFeatures(QgsFeatureRequest(expr))
ids = [s.id() for s in selection]
layer.setSelectedFeatures(ids)
iface.mapCanvas().zoomToSelected()

This does not work, and I do not know where the mistake is.


texts: pycsw: How to harvest WMS and WFS endpoints into a single, combined catalogue entry?

texts:
I want to harvest the WMS and WFS endpoints of a geoserver instance into pycsw.

Pycsw supports harvesting but as far as I can tell, I can't harvest WMS and WFS at the same time, and thus have to harvest them consecutively.

This works, but I now have 2 CSW entries for each dataset, one for the WMS and one for the WFS endpoint.

What I would like to have though is a single CSW entry for each dataset with both the WMS and WFS endpoint.

How can I achieve this?


texts: How to enter quadrant bearings into Copan map check

texts:
I am attempting to convert, to a 360 degree basis, the normal bearings in a survey. The following are the original survey bearings (2nd column) and on the right (4th column) is the 360 basis amount I obtain, which will be entered in Copan map checking. The 3rd column is my interpretation of what I think the survey bearing should be.

1
2    S 05°52'13" E    S 05°52'13" E      174.0147
3    N 84°41'49" E    S 84°41'49" W      264.4149
4    N 07°36'50" W    N 07°36'50" W      352.2310
5    S 50°17'08" E    N 50°17'08" W      309.4242
6    N 37°13'00" E    N 37°13'00" E       37.13
7    N 52°47'00" W    S 52°47'00" E      127.1300
1    S 83°07'18" W    N 83°07'18" E       83.0718

The survey plat, with original bearings, is shown under my previous question regarding Map Check file format.


texts: How to create contours from an IDW raster

texts: I'm new to QGIS and am trying to create vector contours from this IDW raster. I followed Ujaval Gandhi's "Interpolating Point Data" tutorial step by step but am not getting the same results for step 18.The first images is the IDW raster. The second is the contour vectors created from raster->extraction->contours which looks like it created a point for every pixel in the raster.


texts:
I am facing the problem that with some mobile Browsers like DolphinHD and Android Browser

that the browser makes the text color white, and the background is also white.

So i want to change the textcolor - or the background color but there's no such thing defined in the documentation.

http://help.arcgis.com/en/webapi/jav...opupmobile.htm

Does anyone know how to do this?


texts: GeoServer REST API - PUT datastore using URL method option

texts:
According to the swagger API documentation, one should be able to create a new datastore in GeoServer using the method url option in a PUT.
My attempts to do this have failed so far, so I'm wondering if anyone has any pointers.
Given a shapefile_url pointing a zip file of Shapefile context. E.g. http://example.com/shapefile.zip, I try to upload it to an existing workspace named public.
curl -v -i --user admin:geoserver -H "Content-Type: text/plain" -X PUT -d "$shapefile_url" "$geoserver_base/workspaces/public/datastores/hillshade/url.shp"

The response I get is:
*   Trying ::1:8080...
* Connected to localhost (::1) port 8080 (#0)
* Server auth using Basic with user 'admin'
> PUT /geoserver/rest/workspaces/public/datastores/hillshade/url.shp HTTP/1.1
> Host: localhost:8080
> Authorization: Basic YWRtaW46Z2Vvc2VydmVy
> User-Agent: curl/7.72.0
> Accept: */*
> Content-Type: text/plain
> Content-Length: 90
>
* upload completely sent off: 90 out of 90 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 500
HTTP/1.1 500
< X-Frame-Options: SAMEORIGIN
X-Frame-Options: SAMEORIGIN
< Access-Control-Allow-Origin: *
Access-Control-Allow-Origin: *
< Content-Type: text/plain
Content-Type: text/plain
< Transfer-Encoding: chunked
Transfer-Encoding: chunked
< Date: Fri, 09 Oct 2020 18:34:08 GMT
Date: Fri, 09 Oct 2020 18:34:08 GMT
< Connection: close
Connection: close

<
* Closing connection 0
java.lang.RuntimeException: java.io.IOException: Wrong magic number, expected 9994, got 1347093252

Clearly I'm missing something, or what I'm trying to do isn't possible.


texts: How can I split an osm file into separated files with poly files using osmosis?

texts:
I have got a country.osm file and I want to split it alongside of admin_level=8. I extracted previously ~3.000 poly files into a separated folder.
I have batch script, that split them, if I give the input and the poly:

osmosis --read-xml %1 enableDateParsing=no --bounding-polygon file=%2 completeWays=no completeRelations=no clipIncompleteEntities=true --write-xml file=clc_%2.osm

The question: Are there any way to do this parallel and the input file read just once?


texts: Consume netcdf Data with ESRI Javascript API?

texts: We've got loads of raster data that can be organized by time, so we thought packaging them into netCDF would be a good a idea.  But we also want to serve out the data to a web application that leverages the ArcGIS javascript api.  I've seen the ncWMS page, but the info there doesn't exactly make it clear how to consume the ncWMS.  Anybody have experience with this or/could point me to an example?


texts: Up-to-date South Korea level-1 administrative boundaries following land reclamation

texts:
Because of land reclamation, South Korea's western coastline changes regularly and data is regularly outdated. For example, GADM shapefiles describe boundaries prior to the development of Songdo.
How can I keep up-to-date with South Korea level-1 administrative boundaries (provinces and special cities, in the form of shape files or equivalent like the "R sf" (.rds) format supplied by GADM)?
I've updated the reference to GADM from v2 to v3 but the v3 Korea admin 1 file has the same issues I detected in v2 so it may not have been updated.


texts: How do I export circles from ArcObjects to WKB?

texts:
I have a small circle in SDE which I'm trying to extract through ArcObjects into well-known-binary (for later import into other systems).

Using the IWkb interface I can obtain the WKB, but it comes out as a PolyLine with 2 points - both exactly the same. I've hand parsed the WKB to confirm this is what ArcObjects is returning.

Are there any ways to get ArcObjects to export circles as WKB and maintain the circle? e.g. as a CircularString or similar.

I'm using ArcObjects 9.3.


texts: How to create a multipatch layer in arcmap?

texts:
I would like to create a multipatch layer in ArcMap using the editor tool.

I have looked online but couldn't find any tutorials or help. How can I create a multipatch layer in ArcMap?

Thanks.


texts: Showing custom markers, shadows and popups from JSON data

texts:
The examples given in the documentation of OpenLayers show very basic ways of utilising the different features. This example shows how to add shadows to the marker. This example shows how to create basic popups.

Looking at the sample code, I have no idea how to combine the two together, nor display different icons for the markers. Can anyone show me a tutorial or example that combines the various aspects of custom markers, shadows and popups using JSON data?


texts:
I'm rendering OpenStreetMap data from a Postgresql/gis db using Geoserver 2.8. Initially I was seeing issues in China and Japan where the place name labels were appearing as boxes instead of text. I added DroidSans and DroidSansFallback fonts to the Geoserver styles directory and modified the sld by adding the fonts. This fixed a lot of the labels, however in western China I am still seeing some labels composed of boxes along with characters. It appears that these are multilingual labels.
Has anyone seen this and found an effective workaround?


texts: How can I get township and range edge labels in QGIS 3.4.13-Madeira

texts: I've created PLSS edge labels before with ESRI and older QGIS and don't remember this being all that hard, but for some reason I'm lost trying to get it done with the newer version.  The PLSS data is in the map as a layer and I'm using the atlas to create map pages.  How do I get the township and range to dynamically update the grid_x and grid_y label locations?


texts: How to enable "supportsAppend" on a feature layer in ArcGIS Server?

texts:
ArcGIS Server has an Append function which allows the user to append data to an existing feature layer. The feature service has a property supportsAppend:

A feature service returns the supportsAppend metadata property. When
this property is absent or is returned as false, the Append capability
cannot be added to the feature service

My question is, what do we do in the case where a layer does not return the supportsAppend property? As stated above, "when this property it absent" the layer won't support the Append function, so how do I enable it for the layer?
The Append page notes that "The Append capability is not currently supported if the feature service has sync or changeTracking capabilities enabled" and I have confirmed that these options are not enabled for this layer.
(I'm finding that the layer does actually expose an endpoint at /server/rest/services/layergroup/FeatureServer/0/append but when I try to make a POST request to this URL, I get the error message "invalid URL", which is probably because the layer does not return the supportsAppend parameter.)


texts: MapBasic. Where-clause in Select Statement

texts:
What is wrong with this statement? I reckon the where-clause is the problem.

Select * from "BEDIRECT_POT_" + vo_num, PLZ5_2012_bereinigt
where "BEDIRECT_POT_" + vo_num.PLZ like PLZ5_2012_bereinigt.PLZ
order by PLZ
into "BEDIRECT_POT_" + vo_num + "_PLZ"

This section seems to be wrong: "BEDIRECT_POT_" + vo_num.PLZ


texts:
I am using multiple wfs layers and using editing tools in that like edit,draw,save etc.
The code is shown here......

var district = new OpenLayers.Layer.Vector("district(wfs)", {
                    strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
                    //projection: new OpenLayers.Projection("EPSG:26910"),
                protocol: new OpenLayers.Protocol.WFS({
                version: "1.1.0",
                // loading data through localhost url path
                url: .../geoserver/wfs",
                featureNS :  "http://www.openplans.org/topp",
                //maxExtent: mapextent,
                // layer name
                featureType: "district",
                // geometry column name
                geometryName: "the_geom",
                schema: ..../geoserver/wfs/DescribeFeatureType?version=1.1.0&;typename=topp:district"
                })
                });

                                district.style =

OpenLayers.Util.applyDefaults({strokeColor: "#0000ff"},
                                    OpenLayers.Feature.Vector.style["default"]);

var major_location = new OpenLayers.Layer.Vector("major_location", {
                    strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
                    //projection: new OpenLayers.Projection("EPSG:26910"),
                protocol: new OpenLayers.Protocol.WFS({
                version: "1.1.0",
                // loading data through localhost url path
                url: .../geoserver/wfs",
                featureNS :  "http://www.openplans.org/topp",
                //maxExtent: mapextent,
                // layer name
                featureType: "major_location",
                // geometry column name
            geometryName: "the_geom",
            schema: .../geoserver/wfs/DescribeFeatureType?version=1.1.0&;typename=topp:major_location"
            })
            });

                major_location.style = OpenLayers.Util.applyDefaults({strokeColor: "#0000ff"},
                OpenLayers.Feature.Vector.style["default"]);

Now, when i am doing editing in these layers then that editing is shown on only one layer.But,I want to edit both layers simultaneously.For editing the code that i am using is:

            var panel = new OpenLayers.Control.Panel(
        {'displayClass': 'customEditingToolbar'}
        );

    var navigate = new OpenLayers.Control.Navigation({
        title: "Pan Map"
        });

    var draw = new OpenLayers.Control.DrawFeature(
        district, OpenLayers.Handler.Polygon,
        {
        title: "Draw Feature",
        displayClass: "olControlDrawFeaturePolygon",
        multi: false
        }
        );

    var edit = new OpenLayers.Control.ModifyFeature(district,{
        title: "Modify Feature",
        displayClass: "olControlModifyFeature"
        });

    var del = new DeleteFeature(district, {title: "Delete Feature"});

    var save = new OpenLayers.Control.Button({
        title: "Save Changes",
        trigger: function() {
      if(edit.feature) {
        edit.selectControl.unselectAll();
        }
        saveStrategy.save();
        alert('saved');
        },
        displayClass: "olControlSaveFeatures"
        });

        panel.addControls([navigate, save, del, edit, draw]);
        panel.defaultControl = navigate;
        map.addControl(panel);

So,please tell me is it possible to edit multiple layers?


texts: How to position the Qwidget form/QDialogBox in the left corner using python programming

texts:
1) I am creating a Qwidget Form or QDialogBox using QT Designer. I am using the following code to move the form:

sDialog.move(50,450)

But i want to fit the dialogBox to fit in the left corner.How can i do that using Python programming?

2) When i am using the Canvas events if i click on the map dialogBox/Form is hiding but i want to fit the position so if we do any thing on the map also the DialogBox should nt hide.How can i do that using python programming?


texts: Exporting only some feature classes to XML using ArcPy?

texts:
Is it possible to only export only some feature classes when exporting a workspace to an XML document?

I know that when I am in ArcCatalog, I can right click my database --> Export XML Workspace Document. Then a GUI shows up and I can check-mark which features I want to include or exclude in my export.

What is the Arcpy equivalent of this manual export?

I found arcpy.ExportXMLWorkspaceDocument_management(...) function but the in_data parameter only seems to let me enter one feature class. It does not accept an array ["feature1", "feature2"].

I found this question using ArcObjects: How to export only some feature classes to xml using ArcObjects?
But I am not familiar with ArcObjects and am hoping to write this script in Python.


texts: How do I calculate the bounding box for given a distance and latitude/longitude

texts:
I need to be able to calculate a bounding box or circle for a given WGS84 latitude and WGS84 longitude, and distance but have no idea where to start!

The distance from the start Lat/Lon would be 10Km or less.

Would it be possible for someone to give me some pointers / Example on how to do this


texts: Data imported into Overpass API lacks areas.bin?

texts:
I have installed Overpass locally following official instructions. I downloaded a small region data from slaskie-latest.osm.bz2 and imported them into Overpass DB

bin/init_osm3s.sh slaskie-latest.osm.bz2 "^C/" "binaries/" --meta

The whole operation went fine with just some warnings:

compute_geometry: Way 539932453 used in relation 10072392 not found.
...
Flushing to database ....... done.
Update complete.

However, when I ask queries about areas, I keep gettings errors

~/overpass/osm-3s_v0.7.55$ binaries/bin/osm3s_query --db-dir=db/
encoding remark: Please enter your query and terminate it with CTRL+D.
 way(area:3602828735)["building"~"residential|house|terrace|detached|apartments|yes"];
    (._;>;);
    out body;
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="Overpass API 0.7.55.7 8b86ff77">
<note>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</note>
<meta osm_base=""/>

</osm>
runtime error: open64: 2 No such file or directory db/areas.bin File_Blocks::File_Blocks::1

In fact, db/ lacks areas.bin:

$ ls db
node_keys.bin             node_tags_local.bin.idx  relations_meta.bin.idx        ways.bin
node_keys.bin.idx         osm_base_version         relation_tags_global.bin      ways.bin.idx
nodes.bin                 relation_keys.bin        relation_tags_global.bin.idx  ways.map
nodes.bin.idx             relation_keys.bin.idx    relation_tags_local.bin       ways.map.idx
nodes.map                 relation_roles.bin       relation_tags_local.bin.idx   ways_meta.bin
nodes.map.idx             relation_roles.bin.idx   user_data.bin                 ways_meta.bin.idx
nodes_meta.bin            relations.bin            user_data.bin.idx             way_tags_global.bin
nodes_meta.bin.idx        relations.bin.idx        user_indices.bin              way_tags_global.bin.idx
node_tags_global.bin      relations.map            user_indices.bin.idx          way_tags_local.bin
node_tags_global.bin.idx  relations.map.idx        way_keys.bin                  way_tags_local.bin.idx
node_tags_local.bin       relations_meta.bin       way_keys.bin.idx

Is it because the region data lack information about areas or importwent wrong?
How can I resolve my issue?


texts: Replacing all null values in attribute table by "no"

texts:
I am new to QGIS. This question about how to use the field calculator, because the procedure to replace all fields is explained very nicely in Replacing all null values from attribute table with zeros using QGIS?

I have the null features selected, but now I am struggling to find a means to change all of them to "no" instead of the "0".

Can someone help?


texts: The exported TIFFs from Earth Engine to my drive look corrupted

texts:
I am trying to export some images from the Earth Engine using Export.image.toDrive but it seems that all the files that I generate look corrupted.
When I mean corrupted, it means that if I open them with any viewer like Photoshop, Preview, etc, they look all black with lines (sample image at the bottom). Also I tried to open them with OpenCv in Python and the images did not have sense (they have three channels, but the number in the channels make no sense at all).
I looked for several examples online where people where exporting images and I couldn't find any difference with my code. Additionally, if I plot on the map of the Earth Engine the data seems to be fine. So I guess that I am doing something wrong with the exportation but I can't get it.
The procedure I follow is the following.

I select an area of the map with the square tool.
I run the script.
I go to task and export some of the layers that appear there.
I go to Drive and download the file to open it.
File is corrupted :(.

code snippet
var s2 = ee.ImageCollection('COPERNICUS/S2') // Level-C1 (TOA), for Level-2A (BOA) use 'COPERNICUS/S2_SR'
  .filterBounds(geometry)
  .filter(ee.Filter.lessThanOrEquals('CLOUDY_PIXEL_PERCENTAGE', 50))
  .filter(ee.Filter.date('2020-01-01', '2020-01-10'))

var clip_all = function(img){
  return img.clip(geometry)
}

var s2_clip = s2.map(clip_all)

var s2_list = s2_clip.toList(s2_clip.size())

var n = s2_list.size().getInfo()

for (var i = 0; i < n; i++){
  var img = ee.Image(s2_list.get(i))

  var rgb = img.select('B2','B3', 'B4')//.float()
  var date = img.date().format('yyyyMMdd').getInfo()
  Map.addLayer(img, {bands: ['B4', 'B3', 'B2'], max: 5048}, 'Image_'+date)

  //export
  Export.image.toDrive({
  image: rgb,
  description: 'COPERNICUS_RGB'+ date,
  scale: 30,
  region: geometry,
  maxPixels: 1e10,
  fileNamePrefix: 'exampleExport',
  folder: 'test_earthengine_2'
})
}

some variations that I tried:

using another scale 30-->10, the same.
adding float to the line var rgb = img.select('B2','B3', 'B4').float(), no changes.

I wonder if the problem is that the export can take really long time and the things that appear in my drive still need some processing? (I already waited for 8 hours and the files did not seem to change on my drive.)
When I mean corrupted this are the kind of images that I am obtaining:


texts:
How can I get the layer of the coverage of Google Street View on the roads, i.e. the layer that appears blue when we drag the pegman on Google Maps/Earth?

I need it to work in ArcGIS.


texts: Optimizing ArcGIS Desktop performance using MXD Defrag?

texts: Does the MXD Defrag program still exist in ArcGIS 10?


texts: QGIS can output shapefiles larger than 2 GB

texts: I have read that shapefiles are limited to 2 GB, yet I have found that QGIS can go beyond that limit. In this case, I was generating contours from DEMs. The output would have been greater than 2 GB, and ArcMap failed, but QGIS created the output. Has anyone else noticed this? Just curious…


texts: Display a raster stack with several bands in ArcGIS?

texts:
I have already made a raster stack (5 bands in one TIFF) of my multitemporal Landsat images in R and have also clipped a smaller region of every raster stack for each image. Now I want to do some classification not in R but in ArcMap. But I am having problems just displaying the data.

As far as I understand I have to create a raster catalog with different raster datasets... each raster dataset shall contain a raster stack for one year at one point in time.  How can I make ArcGIS display the bands correctly, e.g. for the band combination RGB=4,3,2?


texts: How do I get the fitted values and/or residuals in fit.variogram() function of gstat package of R?

texts: I am trying to do some diagnostics after fitting a variogram model to my empirical variogram using fit.variogram() function in gstat package of R. I need to get a hold of residuals and the fitted values so that I can do normality and GOF tests. However, the fit.variogram() only provides the parameters' values (e.g. psill, nugget and rannge). How do I get residuals and/or the fitted values after fitting a variogram model?


texts: Cutting image using gdalwarp to extent of data

texts:
I am currently generating a raster from point data and applying inverse distance algorithm.  This image is then cut with:

gdalwarp -cutline <<src shapefile>> -crop_to_cutline -srcnodata 0 results_in.tiff results_out.tiff

Is there a way to cut the output to the extremities of the original data source file rather than a shapefile?

EDIT : gdal_grid command

gdal_grid -a invdist:power=2:smoothing=0.001:radius1=0.0005:radius2=0.0005 -of GTiff -zField z_value -ot Float64 -l data VRT.vrt EM_RESULTS.tiff


texts:
Because data is imported as string, I need to query string values as if they were integers, is there something I could use to cast values to string?

Where could I find documentation for this SQL in CartoDB? I found this


texts:
I'm having a, frankly, super annoying problem with SLD and the ogc:PropertyIsEqualTo/ogc:PropertyIsEqualTo filters.

I have 3 different GeoServer instances on 3 different machines. All instances are 2.6.0.
On 2 machines the ogc:PropertyIsEqualTo functions perfectly and the ogc:PropertyIsLike works as expected, but on the last the ogc:PropertyIsEqualTo does not work and the ogc:PropertyIsLike does not work as expected not accepting wildcards unless there is a '%' as the last character.

Example:

<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
    <ogc:PropertyIsEqualTo>
      <ogc:PropertyName>AffaldsTypeName</ogc:PropertyName>
      <ogc:Literal>Restaffald</ogc:Literal>
    </ogc:PropertyIsEqualTo>
  </ogc:Filter>
  <se:MaxScaleDenominator>10000</se:MaxScaleDenominator>
  <se:PointSymbolizer>
    <se:Graphic>
      <se:Mark>
        <se:WellKnownName>circle</se:WellKnownName>
             .....

(works perfect on two machines and not at all on one)

Does anyone know what could possibly be wrong with the one GeoServer instance that have these issues ???


texts: Finding gaps between polygons using ArcGIS Desktop?

texts:
I am trying to build procedure for finding gaps and convert the procedure steps in to code, but i am finding some difficulty, i wonder if someone can help me with it.

the steps i planned in seek of finding the gaps between polygons(which i have tried it using the toolbox and it works) are structured as the following:

To find the gaps first i will merge all polygons in one polygon, but the resultant polygon still contain the gaps in it.
i will build new polygon from the merged polygon by using only the outer perimeter points,since there is  gaps, they will make an inner perimeter.
i will subtract the new polygon from the merged polygon and the remaining will be only the gaps in forms of polygons, this can be done by using the erase tool

hope someone can provide me with the code syntax especially for step 2 and 3 in VBA (this is the internment required for this application)


texts: How to connect input parameter to the field calculator algorithm within the graphical modeler?

texts:
I am building a model in the graphical modeler of QGIS 2.8.1 Wien and I would like to give the option to the user to enter a number in the model with which a selected field will be multiplied, but I cannot figure out how to connect the parameter for the user input to the field calculator algorithm.

Any ideas on this?


texts: Writing in only file .csv (or .txt) values contained in several rasters?

texts:
I am an beginner in Python programming but I would like to write in only a file .csv (or .txt) the values contained in several rasters.

For example, I built several rasters by using a loop. The rasters are like this:

 outCostPath.save('P_' +  str(int(ID_patch_1)) + '_' + str(int(ID_patch_2)) + ".tif")

For each raster, I would to save the value that is situated at the second line and the column "PATHCOST" in a file .csv. In the end, this file .csv should contain all values contained in all created rasters. Here is my algorithm:

i = 1

for ID_patch_1 = 1 to 100

   for ID_patch_1 = ID_patch_1 + 1 to 100

    ## Building a raster
    fileRaster = outCostPath.save('P_' +  str(int(ID_patch_1)) + '_' + str(int(ID_patch_2)) + ".tif")

    ## Writing in a file .csv
    fileCsv(i,1) = ID_patch_1 ## put value of ID_patch_1 in fileCsv at line i and first column
    fileCsv(i,2) = ID_patch_2 ## put value of ID_patch_2 in fileCsv at line i and second column
    fileCsv(i,3) = fileRaster(2,3) ## put value situated at line 2 and third column in the created raster
    i = i + 1

    end
end

The problem is that I don't know to code this algorithm in Arcpy.


texts:
I'm preprocessing landsat 8 images in R  using the packages 'satellite' and 'landsat'. I tried to work with a "satellite object" derived from a stack of all my bands, but when applying the correction commands (e.g. convDN2RU)
the satellite object is not recognized.

Any suggestions?


texts: Clipping feature collection by another feature collection using Google Earth Engine

texts:
I have a feature collection of lines and I want to cut out any part of the line that is contained within any polygon in a separate feature collection.
I know I will have to map a function over the rivers feature collection, but I can’t figure out a clip/difference/dissolve operation that allows me to use the lakes feature collection
var lakes_filtered = lakes
                        .filterMetadata('Lake_area', 'greater_than', 100)

var rivers = ee.FeatureCollection(*riversCollection*)
                    .map(function(feature){
                   return feature.difference(lakes)
})

This code gives me an error because .difference() doesn’t accept a feature collection.
Any thoughts?


texts:
I am a computer programmer starting with PyqGis-Python, and I’d need to automate the creation of a webmap using the plugin of qgis2leaf from a QGIS Project. I have reached to call “import qgis2leaf.qgis2leaf_exec” from PYQGIS, but I’d like to call it from outside the QGIS environment.

I am using Pycharm IDE, but it has been impossible to import and call “qgis2leaf.qgis2leaf_exec”.

Do you have any idea to solve it?


texts: Visualizing Weather Data in real-time/online with QGIS

texts:
I have been searching for quite some time now, but I can't seem to find the answer by myself.

I did come across some things that helped me a bit, but many answers on this topic were from quite some time ago and I am curious if you might know some other (better) solutions now.

I want to visualize weather data with QGIS. Think about temperature, wind, etc.

The data will be stored in a Postgres or MySQL database.

The goal will be to publish the map real-time, online.

Every couple of minutes or so there will be new data stored in the database and all the latest data has to be shown on the map. There will be a slider so that a time can be selected and the map will show the weather data from that specific moment.

Do you guys have any ideas that might help me? I would love to hear them.

EDIT:

I will try to explain a bit better.

I am looking for some advice on how to approach my problem.

I have weather data that needs to be visualized using a GIS-tool. (I am planning on using QGIS). (This I know how to do.)
The data is updated regularly and QGIS needs to update the map when the data gets updated in the database.
Apart from that the map needs to be accessible via a webbrowser (local). The map shown in the webbrowser should be interactive and should show the map with the latest data.

So I have 2 questions actually:
- How do I make sure the map updates as soon as the data in the database updates?
- How do I get the map in the webbrowser and make sure the map is up to date and interactive?