texts: Failed to execute Raster to Point for multiple rasters in Model Builder

texts:
I am trying to create Hotspot Analysis for multiple point shapefiles. For that, I am converting the rasters to point using "Raster to Point" tool in Model Builder.

It's converting the first file but giving error for the rest of the files. Here is the screenshot of the model.

How can I convert multiple rasters to point in the Model Builder?


texts: OpenLayers - Show a WMS Layer from GeoServer

texts:
I'm trying to acesses with OpenLayers code an example of the embedded GeoServer map (the map of tasmania), which acts as a local server on my machine. However, every time I open the .html, the map appears blank.

Below is the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <link rel="stylesheet" href="/theme/default/style.css" type="text/css" />

WMS Example

        wms, layer, singletile

        Shows the basic use of openlayers using a WMS layer

This is an example of how to add an WMS layer to the OpenLayers
        window. The images are tiled in this instance. If you wanted to not use
        a tiled WMS, "singleTile" option to true like shown in this example.

Did I forget any detail? The form of access to GeoServer is correct?


texts: Exporting GeoTIFF raster to GeoPandas dataframe

texts:
I'm just starting in the field of GIS (mostly worked with just python before) and got stuck on a problem. I'm looking for a way to polygonize an already masked GeoTIFF raster with population data in a way that I get no connected pixels. This is needed for further processing where each pixel needs to be the same area. I got as far as to extract all shapes and put them as shapes into a GeoDataFrame, as follows:
with rasterio.open('./Paris.tiff') as raster:
    image = raster.read(1)
    crs = raster.crs
    list_pop = [
        {'cell_pop': value, 'geometry': shape(shp)}
        for i, (shp, value)
        in enumerate(shapes(image, connectivity=0, transform=raster.transform))
        if value > raster.nodata
    ]

df = gpd.GeoDataFrame(list_pop, crs=crs).to_crs(epsg=4326)
df.plot()

This does however connect pixels with the same value (connectivity value of rasterio.features.shapes is minimal 4) and result in the following image.

Is there a way to get all pixels out without them being connected like in the center of the image?


texts: Automating an ArcGIS Project that is a display of map

texts:
I'm relatively new to GIS and looking to automate a project. I have my 'base map' created in ArcGIS, but now need to create several hundred more so looking for an automated method to accomplish this. I have a desktop version of ArcGIS 9.3. I'm currently using VB, Python isn't installed and will require going through IT and business case...

Things I need to figure out:
1. Select the Area of Interest (Polygon)
2. Zoom to the select area
3. Change title
4. Change legend to add some details (can be either the layer name or the description for the layer).
5. Export to PDF.

I have figured out #1, but stuck on #2, because although it does zoom to the polygon of interest it isn't choosing the same zoom I'd get if I manually clicked "Zoom to Selected Features".

Any suggestions on things I should look into or resources?

Thanks,
Reese


texts: Does QField on Android tablet work with plugins, Grass or the processing toolbox generally?

texts:
Does QField work with GRASS in particular, the QGIS processing toolbox generally, or the plugins from the QGIS Offical Plugin Repository on an android tablet or are there known issues with these?

Say on Android OS, v4.4.2 (KitKat) (Samsung Galaxy Tab Active LTE)


texts: Loading multiple shapefiles with different names, from +1000 subfolders

texts:
I'm looking to add a large number of point files into an .mxd from a huge group of multi-layer folders. The script from Loading multiple shapefiles from +1000 subfolders worked with some tweaks, but doesn't return anything presumably since all of the files have different names after the prefix (i.e. Subject Baltimore / Subject Aberdeen / Subject Rockville etc).

Is there a way to add something to tell the script to look at just the first part of the shapefile's label? here is the code I'm using:

import os

mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]

workspace = "T:\\GIS\\Special Projects\\ESRI UC MAP 2017\\Maryland"    #place the path to your data inside the quote marks, remembering to use forward slashes
feature_classes = []

walk = arcpy.da.Walk(workspace, datatype="FeatureClass", type="Point")

for dirpath, dirnames, filenames in walk:
    for filename in filenames:
        feature_classes.append(os.path.join(dirpath, filename))

for dataset in feature_classes:
    dataset = dataset.upper()
    if "Subject" in dataset:
        add_layer = arcpy.mapping.Layer(dataset)
        arcpy.mapping.AddLayer(df, add_layer)


texts: OpenLayers georeference location is not correct

texts:
I have OpenLayers plugin installed.  None of the OpenLayers sources display in the correct location.  For example, Google hybrid displays multiple worlds tiled together.  My georeferenced shapefile data displays in correct location.  Project has EPSG:3857 for projection.  Same configuration and data works and displays correction on Windows Vista computer.

I am running QGIS 2.2, Windows 8.1.


texts: Increasing speed of crop, mask, & extract raster by many polygons in R?

texts:
I'm extracting the area and percent cover of different land use types from a raster  based on several thousand polygon boundaries. I've found that the extract function works much faster if I iterate through each individual polygon and crop then mask the raster down to the size of the particular polygon. Nonetheless, it's pretty slow, and I'm wondering if anyone has any suggestions for improving the efficiency and speed of my code.

The only thing I've found related to this is this response by Roger Bivand who suggested using GDAL.open() and GDAL.close() as well as getRasterTable() and getRasterData(). I looked into those, but have had trouble with gdal in the past and don't know it well enough to know how to implement it.

Reproducible Example:

library(maptools)  ## For wrld_simpl
library(raster)

## Example SpatialPolygonsDataFrame
data(wrld_simpl) #polygon of world countries
bound <- wrld_simpl[1:25,] #name it this to subset to 25 countries and because my loop is set up with that variable

## Example RasterLayer
c <- raster(nrow=2e3, ncol=2e3, crs=proj4string(wrld_simpl), xmn=-180, xmx=180, ymn=-90, ymx=90)
c[] <- 1:length(c)

#plot, so you can see it
plot(c)
plot(bound, add=TRUE)

Fastest Method so far

result <- data.frame() #empty result dataframe

system.time(
     for (i in 1:nrow(bound)) { #this is the number of polygons to iterate through
      single <- bound[i,] #selects a single polygon
      clip1 <- crop(c, extent(single)) #crops the raster to the extent of the polygon, I do this first because it speeds the mask up
      clip2 <- mask(clip1,single) #crops the raster to the polygon boundary

      ext<-extract(clip2,single) #extracts data from the raster based on the polygon bound
      tab<-lapply(ext,table) #makes a table of the extract output
      s<-sum(tab[[1]])  #sums the table for percentage calculation
      mat<- as.data.frame(tab)
      mat2<- as.data.frame(tab[[1]]/s) #calculates percent
      final<-cbind(single@data$NAME,mat,mat2$Freq) #combines into single dataframe
      result<-rbind(final,result)
      })

   user  system elapsed
  39.39    0.11   39.52

Parallel Processing

Parallel processing cut the user time by half, but negated the benefit by doubling the system time.  Raster uses this for the extract function, but unfortunately not for the crop or mask function.  Unfortunately, this leaves a slighly larger amount of total elapsed time due to "waiting around" by the "IO."

beginCluster( detectCores() -1) #use all but one core

run code on multiple cores:

  user  system elapsed
  23.31    0.68   42.01

then end the cluster

endCluster()

Slow Method:
The alternative method of doing an extract directly from the raster function takes a lot lot longer, and I'm not sure about the data management to get it into the form I want:

system.time(ext<-extract(c,bound))
   user  system elapsed
1170.64   14.41 1186.14


texts: ESRI World Light Gray Basemap - without labels?

texts: I am using the "World Light Gray Base" as my basemap in ArcGIS 10.3 Desktop. Is there any way I could turn off the street labels (they show up on ex. scale 1:12000)? I unchecked the "Reference" layer and it got rid of cities' labels, but not street names. Maybe any way around?


texts: Calculating area of polygon inside region?

texts:
I am new to geographic information systems and i need to calculate the area of a a polygon ( a circle to be precise) that falls inside the boundaries of a region, say a state or a country. For example, in the figure below, the black outline the state in consideration and the circle is the concerned polygon. The yellow area is the area that is required. I have the concerned shapefile for the state.

I am using python. Can someone guide me about how to approach this problem?


texts: Contours from NED in QGIS -- "oversampled" NED?

texts:
I have downloaded an IMG file of NED data from the USGS National Map elevation products site and I want to create a contour map using QGIS.

The problem is, the NED raster is "oversampled". There are far more pixels in the raster than the spatial resolution of the elevation data they represent. Therefore, when the contour tool in QGIS is used, the contours follow the edge of each block of similar pixels like so:

How can I achieve smooth contour lines?

I assume it's better to somehow resample the raster so that each elevation sample is represented by a single pixel and then rerun the contour tool rather than trying to smooth the jagged contours shown in the image above. Simply resampling the NED raster with a cubic spline is not effective because it only smooths the edges of each pixel group.


texts: How to setup GDAL setting for python using OSGEO4W?

texts:
I have installed OSGEO4W installer. In that I have installed Express Desktop install option. QGIS GDAL uDig and GRASS GIS were installed in C:/OSGEO4W64.
I have added 'C:/OSGEO4W64/bin' in the path.

But still getting error for running - 'gdal_retile.py' from command prompt as  not recognising as aninternal or external command.

On using OSGEO4W shell, on running 'gdal_retile.py' and other gdal python file, I was getting -

  ImportError DLL load failed: %1 is not a valid Win32 application.

I am using Windows 7 64 bit, python in OSGEO4W was Python-2.7.

EDITION

After following the condensed procedure I am getting following error on running from osgeo import gdal in IDLE

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    from osgeo import gdal
  File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 21, in <module>
    _gdal = swig_import_helper()
  File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 17, in swig_import_helper
    _mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: DLL load failed: The specified procedure could not be found.


texts:
I am using GDAL library routines to build a tiled hierarchy of images for use with
Google Earth.  The images are just PNG files created using Matplotlib.   To tile the images, we are using gdal_translate, gdalwarp and gdal2tiles.py.  When using the Macports installation of GDAL (installed via sudo port install gdal, everything works beautifully, and the tiled hierarchy is created and loads into Google Earth.  But for reasons I don't understand, the Anaconda installation is giving us an error.

Here is the results of gdalinfo on a typical PNG file that we produce :

% gdalinfo plot.png
Driver: PNG/Portable Network Graphics
Files: plot.png
Size is 2400, 2400
Coordinate System is `'
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 2400.0)
Upper Right ( 2400.0,    0.0)
Lower Right ( 2400.0, 2400.0)
Center      ( 1200.0, 1200.0)
Band 1 Block=2400x1 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA
Band 2 Block=2400x1 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA
Band 3 Block=2400x1 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA
Band 4 Block=2400x1 Type=Byte, ColorInterp=Alpha

The image we are loading is assumed to be in lat/lon coordinates.

When we use the Macports installation of gdal_translate, things work :

/opt/local/bin/gdal_translate -of VRT -a_srs EPSG:4326 -gcp 0 0 -120   0  -gcp     2400     0  -60   0 -gcp 2400  2400  -60 -60 -90 plot.png plot_tmp.vrt
Input file size is 2400, 2400

The file plot_tmp.vrt is created, and can be used by gdalwarp and gdal2tiles.py.

However, the same call to the Anaconda installation of gdal_translate gives us an error :

/anaconda/bin/gdal_translate -of VRT -a_srs EPSG:4326 -gcp 0 0 -120   0  -gcp 2400     0  -60   0 -gcp 2400  2400  -60 -60 -90 plot.png plot_tmp.vrt
ERROR 6: EPSG PCS/GCS code 4326 not found in EPSG support files.  Is this a valid EPSG coordinate system?
Failed to process SRS definition: EPSG:4326

I have GDAL_DATA set to an existing file gcs.cvs (although this doesn't seem to matter, as the MacPorts installation doesn't need this file).

I have exactly the same installed versions in both cases :

/anaconda/bin/gdal_translate --version
GDAL 1.11.2, released 2015/02/10

/opt/local/bin/gdal_translate --version
GDAL 1.11.2, released 2015/02/10

Is the Anaconda installation broken? Or is it making assumptions that the MacPorts version isn't?  Or, maybe the Macports version is picking up something in my PATH that the Anaconda version isn't?

We would like to build these tiling capabilities into a visualization package were are developing, and don't want users to have to rely on one installation over the other (especially since we tell users to install Anaconda Python!)

(I apologize for the cross-posting this question, but I just now discovered this stack-exchange site, and don't yet know how to migrate my question).


texts:
I tried to find out the lake's area in an image raster - I used NDVI and reclassify then I got a whole value file like this.

Is there anyone can tell me how to divide them to each polygon?

Or I can only analyse this with a whole part?


texts: Postgis - Find records that each contain a point within a circular area

texts:
I have a few tables:

hubs
coverage_areas
jobs

Jobs have a lonlat (st_point) column
Coverage areas have a lonlat (st_point) column and a radius (integer).
Hubs can have multiple coverage areas.

According to the image above, there are multiple coverage areas colored blue, and a single job colored orange.

Question:  How would I query for all hubs where the job lonlat point is within any one of their coverage areas?


texts:
I have a roads dataset downloaded for Christchurch, New Zealand, from OpenStreetMap. The attribute table contains a column titled 'fclass', which contains the type of road each feature represents (e.g. motorway, secondary, service, etc).

Using ModelBuilder, I would like to loop through each feature in the dataset and, for each type of road, assign a numeric value to a new column (e.g. '4' if road type is 'motorway' and '1' if road type is 'tertiary'). The column I wish to add the score to already exists, it is just a case of calculating it for each road type.

This loop, or lookup, forms a small part of a much larger model.


texts: Why does GRASS GIS output HTML files for r.stats when run from QGIS processing toolbox?

texts:
Running r.stats in GRASS GIS from QGIS has no parameter for output, only one named html. Does anyone know why this is? It doesn't match the documentation https://grass.osgeo.org/grass78/manuals/r.stats.html
Is there any way to persuade r.stats to output a CSV file? It would be much more useful for my purposes. Even if separator is set to comma, and a file with .csv is chosen as the output, it still outputs html format.
 processing.run("grass7:r.stats",
        {'input':[input],
        'separator':'comma',
        'null_value':'*',
        'nsteps':255,
        'sort':0,
        '-1':False,
        '-A':True,
        '-a':True,
        '-c':False,
        '-p':False,
        '-l':True,
        '-g':False,
        '-x':False,
        '-r':False,
        '-n':False,
        '-N':False,
        '-C':False,
        '-i':False,
        'html':output,
        'GRASS_REGION_PARAMETER':None,
        'GRASS_REGION_CELLSIZE_PARAMETER':0})


texts: Missing some lines after import of .PBF int PostGIS

texts:
I've a little problem with either the initial data (from Geofabrik) or the import (using osm2pgsql): I can't find some lines of a street in my city in the database while they are there on the OSM-Site (http://www.openstreetmap.org/).

So here is what I've done:

Downloaded the PBF from Geofabrik (karlsruhe-regbez-140706.osm.pbf)
Imported it using osm2pgsql (osm2pgsql -c -k -d osm -U postgres -H localhost -S openstreetmap-carto.style karlsruhe-regbez-140706.osm.pbf)
Trying to find a line which should be there (SELECT * FROM planet_osm_line WHERE "osm_id" = 132833416)

The line is part of a long street here in Karlsruhe and can be found via osm.org (http://www.openstreetmap.org/way/132833416#map=19/49.00566/8.40795&layers=D). The line "left" of the missing on is present in the database. The second next to it's right is there , too.

Versions used:

osm2pgsql SVN version af61cae663 (64bit id space)
PostgreSQL 9.3.4 x64
PostGIS 2.1.3 x64

Am I doing something wrong? No errors are shown, by the way. Any chance to find out if the line in question is in the PBF at all?


texts: Seeking software programs to run supervised classification on image segmented into objects?

texts:
I am trying to run a supervised MLC classification on a multispectral remotely sensed image, however, I want the image to be classified using a shapefile of segmented image objects (as opposed to the traditional pixel-based method). I have created the segmented shapefile in eCognition (Definiens) and can export it to ERDAS, PCI or ArcMap along with the original image file I am just not sure if these programs have the capability of applying the shapefile to classify the image as objects. From my searching it seems like IDRISI has this function (SEGTRAIN/SEGCLASS) but I do not have access to this program.

Does anyone know if this is possible in ERDAS, PCI or ArcMap?


texts: Generating start and end points for individual road segments

texts:
I have shape file with road network (line layer) as shown in Image 1. The road network contains multiple line segments as shown with blue line in image.

I am trying to generate start and end point of every road segment.
Save the start and end point in a seperate layer.

Based on the suggested answer here, I am trying to get the start and end points by using query in virtual layer
Problem:It merges start and end points into single colomn. I am trying to get them in seperate coloumns. For instance, Col 1: start points, Col2: end points
select From_id, st_startpoint(geometry) as geometry from lineshp
union
select To_id, st_endpoint(geometry) as geometry from lineshp

Attempt with geometry generator:
Problem: It only displays the start and end points. It does not save the data in seperate layer.
union (
    end_point ( $geometry ),
    start_point ( $geometry )
)


texts: How can I set python path and version for QGIS?

texts:
Possible Duplicate:
  Couldn’t load SIP Module

When I'm starting QGIS I'm getting the problem:
"Couldn't load SIP module. Python support will be disabled."
And there is also:

Python version: 2.6.5
Python path: ['/usr/share/qgis/python', '/usr/lib/python2.6'...]

I actually have SIP but my current python version is 2.7 so SIP located at /usr/lib/python2.7

So how can I set the right version of Python and Python path for QGIS?

P.S. export PYTHONPATH=/usr/lib/python2.7 doesn't work


texts: Labeling using chemical formulas in subscripts that contain a mask in ArcMap 10.6

texts:
I would like to label points in ArcMap, and the labels contain chemical formulas. These chemical formulas have both subscripts and superscripts (see snip below)

I am unable to use labels that both retain sub/superscript formatting, and have a mask (like the point names in the image below).
If I add a text box to manually (copy-paste) label all points with text formatting, I can not add a mask. (This is why they appear as such)

Attribute tables don't retain sub/superscript formatting, and as such display as plain text if I label directly from the attribute table.

Is there a way to have the formatting of sub/superscripts in the chemical formulas show in the labels, and still be able to use a mask? I have a large number of points so I would like to use the attribute table. However the only way I can think of to accomplish this is by exploding every part of each chemical formula into its own field (seeing as I have hundreds of points this doesn't seem realistic)

OKAY. Lukes code works great but I cannot get it to work with my code.
This is my code without sub/super formatting:

def FindLabel ( [Name], [Spring_Exc], [Fall_Exc] ):
  return [Name] + "<CLR red='255' green='0' blue='255'>" +  [Spring_Exc] + "</CLR>" + "<CLR red='0' green='122' blue='192'>"  + "\r\n"+[Fall_Exc] + "</CLR>"

& This is what it looks like:

I need it to retain the sub/super formatting;
This is what Luke came up with:

def FindLabel ([Spring_Exc]):
    formats = {
        'SiO2': 'SiO2',
        'CO32-': 'CO32-',
        'HCO2-': 'HCO2-</sup.',
        'HCO3': 'HCO3'
    }
    formulas = [Spring_Exc].strip('()').split(',')
    labels = [formats.get(f, f) for f in formulas]
    return '({})'.format(','.join(labels))

& this is what Lukes code looks like, it accomplishes my formatting issue.

I am looking to have [Spring_Exc] & [Fall_Exc] to be labeled with sub/super formatting, as subscripts of the point name. It should look like screenshot #3 but retain formatting.

My most recent thought is that I would have to approach it like this: (However I am not sure if this thinking is correct, as there are errors)

def FindLabel ( [Name], [Spring_Exc], [Fall_Exc] ):
    formats = {
        'SiO2': 'SiO2',
        'CO32-': 'CO32-',
        'HCO2-': 'HCO2-</sup.',
        'HCO3': 'HCO3'
    }
    formulas = [Spring_Exc].strip('()').split(',')
    formula = [Fall_Exc].strip('()').split(',')
    labels = [formats.get(f, f) for f in formulas]
    labels = [formats.get(f, f) for f in formula]

    return '({[Name] + "<CLR red='255' green='0' blue='255'>" +  [Spring_Exc] + "</CLR>" + "<CLR red='0' green='122' blue='192'>"  + "\r\n"+[Fall_Exc] + "</CLR>"})'.format(','.join(labels))

This is how Lukes code appears in my expression popup, I have advanced checked and have selected the python parser:

I'm not sure how to fix my issue of combining these two codes into one.


texts: What python web-mapping framework to use?

texts:
I am interested in developing a web-mapping application. I am relatively familiar with Python and so i'm looking for a python framework. What are my options? what are the pros and cons of each option?

I am looking for a simple option, one that displays the geographic information on the map and lets the user use "info" to get more details. At this point i don't need any queries or dynamic functionality. I would prefer a well-documented option.


texts: From a lat/lng point, load data clusters of other lat/lng points within radius using PostGIS

texts:
Very similar to how Zillow's mobile app mapping search works, I'm trying to pass in the lat/lng points & radius (meters) of a single user and then, on the fly, generate clusters to enable passing back a subset of points and intensities to represent all the users in the passed in radius (lat, lng, and radius are the three arguments being passed in). As the zoom level increases/decreases, the clusters would rebuild as well.

In a table of 100,000 users, with a geometry point column containing a single point, we're seeing around 6-8 seconds using the following query:

SELECT row_number() over () AS id,
  ST_NumGeometries(gc),
  ST_AsText(ST_Centroid(gc)) AS centroid
FROM (
  SELECT unnest(ST_ClusterWithin(lonlat::geometry, 0.003)) gc
  FROM users
) f;

What additional functions do I need (ST_DWithin?) to use to pass in a single lat/lng point and radius (in meters), in order to query on the user's location (the above query is just building clusters on all users in the table).

Additionally, we need this query to be a lot faster; ideally less than 3 secs. What else can we do to aid the optimization of this query.

(Note: we already have an index using gist on the lonlat column.)


texts: OpenSource Remote Sensing Tools for Classifying Roofs

texts:
with envi image processing and classification tools, you can get roofs from images with some spectral value and then you can convert it some vector data for your app.

in python with OpenCV which have devoloped by Intel (has lots of Object Detection Algorithms) you can detect faces from images.

OpenCV Example:

my question is that can we detect roof or anything from coordinated or not-coordinated satellite images with opensource tools as python?

Satellite Image Example:


texts: module object has no attribute classFactory

texts:
I asked this question several days ago on the QGIS developer list but didn't get any love. I'm hoping someone can help me resolve this error.

I have a custom repo and a custom plugin that I'm developing for QGIS. I
recently updated the plugin in the repo to a new version and tried to
upgrade on my local QGIS install. When I did so, I received the following
error:

AttributeError: 'module' object has no attribute 'classFactory'

Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 306, in startPlugin
    plugins[packageName] = package.classFactory(iface)
AttributeError: 'module' object has no attribute 'classFactory'

I've seen this issue before in my plugin (most notably when I try to
use the Plugin Reloader tool) but I've never been able to figure it
out. Is my plugin missing something in the init.py or in the main
plugin class?

The odd thing is that my plugin loads and works just fine except when I update via the repository or when I use the Plugin Reloader tool to reload it.

For reference, my plugin code can be found here:

https://github.com/spencerrecneps/TDG-Tools/tree/master/TDGAlgorithmProviderPlugin


texts: How to get "Pinching" in Openlayers working on Android?

texts:
If you go to THIS OpenLayers Mobile example on android you'll notice that "pinching" for zooming does not work. But it works for iPhone and iPad.

Anyone know how i can get "pinching" to work on Android?


texts:
I am new to GeoExt and OpenLayers world. I am currently using OpenLayers 2 and GeoExt 2. I want to add a mouse position on the toolbar. Currently my mouse position is on the lower right corner of the mappanel and where my map description is suppose to be, I have tried this and it is not working, complaining that GeoExt.ux is not defined.
I have also tried Get mouse position in OpenGeo then items: [pos] on the toolbar but still this is not working only creating a small button.


texts: Targeting capital cities only in Tilemill/CartoCSS

texts:
At a specific zoom level in my Tilemill map, I want to only show capital cities, and hide all other cities.

What data set could I use which will provide me with information oh whether a city is a capital city or not, so that I can hide/show based on that attribute?


texts:
I installed Postgres 9.5. Then I installed PostGIS. Then I created database named geodb. In it I created column with type polygon and several others like id.

Table polygon was created successfully, so it's seems that PostgreSQL know about geometry.

But when I am trying to run next query:

INSERT INTO public.rasters_previews(
            id, "Path", "Coordinates", "Name", "imageBounds")
    VALUES (1, 'foo', ST_GeomFromText('polygon((60.536 27.589,60.509 39.054,54.908 38.183,54.93 28.368,60.536 27.589))'), 'xname', 'xbound');

I am getting error that function ST_GeomFromText does not exists.

I tried to do same with setting postgis_22_sample as template but got same result.

What I am doing wrong? Should I do any other manipulation to get DB wotk as geospatial?


texts: How do you view multiple tables at the same time in ArcMap 10?

texts:
My original question was:

  How do you undock the tables in the ArcMap attribute window?

because that's how I thought it should work in the new ArcGIS 10 docking environment.  Either it isn't intuitive or I am missing something obvious.

I have an ArcMap user who went up to ArcGIS 10 yesterday and he wants to view two tables at the same time. If he opens two tables, they are loaded as tabs in the table window.  He(we) try to drag one tab elsewhere and nothing happens.  The only window control button is an 'X' which closes the table.

If I right-click on the tab, Close is the only option.


texts: Determining percentage of points visible within viewshed using ArcGIS Spatial Analyst?

texts:
I have done a viewshed (ArcGIS Spatial Analyst 10.5) on a DEM raster layer, where a limited amount of observer points (5) are aiming to capture as many points as possible on this DEM surface.

The idea is that the observing points won't capture all these points. But if I wanted to optimize this and be able to see how many points is being picked up by the viewshed, how would I go about this?


texts: Read through a feature class and export each feature BY ROW to KML via arcpy

texts: I have a geodatabase feature class of a polygon with multiple rows, where each row represents an individual polygon. I need to loop through each one of these polygons (rows) and export them to a KML file. What would be the best approach to deal with this using arcpy?


texts: Maintain Relationship Class between Feature Class and Attribute Table after primary key attribute is changed

texts:
I have a File Geoedatabase Feature Class with Polygon features of agricultural LAND_PARCELS.  Each land parcel has a unique PARCEL_ID.

The land parcel Feature Class needs to be related to a table that will store AGRI_ENVIRONMENT attributes for each land parcel.  The Table has a field for the land PARCEL_ID and additional fields for HABITAT, MANAGEMENT etc.

I created a 1-Many Composite Relationship Class with the LAND_PARCELS feature class as the origin and AGRI_ENVIRONMENT as the destination table.  The Primary Key and Foreign Key fields are PARCEL_ID in both tables.  I called the relationship class MANAGEMENT.

Here is the problem:

The PARCEL_IDs can change when there has been a physical change on the ground, for example if a land parcel is split in two then two new unique PARCEL_IDs are created, or if a portion of a land parcel is removed from agricultural use then a new PARCEL_ID is created for the new polygon shape.  When the PARCEL_ID is changed in the origin table the Relationship is broken.

Is there a way to update the Foreign Key automatically when a Primary Key is changed?


texts: Assigning IDs to villages which may have duplicate names?

texts:
I have more than 150 village points, each with a village name attribute village. The same village name may appear on multiple points.

I want to assign individual IDs for each village name, say vill_A = 1, vill_B = 2, and so on. I tried to calculate [village], but it didn't work.

Any suggestions?


texts:
I'm currently attempting to to convert a KML database and export in CSV for a research project.
I'm able to load the KML into QGIS but an issue has arisen.

The points appear perfectly in the mapping layer. However, when I open the attribute table, some of the information in the description field has been cut and the full description is not available. Is it possible to increase the character limit to include all the information in this field?

I am not a technical person and have no programming experience.

Running QGIS 3.8.2.


texts: Geoserver - How to make a psql-backed timestamp that uses timezones

texts:
I'm working on an application that extends geoserver and am frustrated as I'm trying to define a SimpleFeature that has timestamps that include timezones.

I've tried declaring my timestamp field using:

getBuilder().add(fieldName, Date.class);

As well as:

getBuilder().add(fieldName, Timestamp.class);

In both cases, the associated fields that are created in my postgres database have the type timestamp without time zone

Ultimately, I'm just trying to get that psql type to read as timestamp with time zone, there's a good chance I'm missing a key concept. I'm quite new to this.

Any help would be great.


texts: Displaying heatmap with large number of dense points of interest in QGIS?

texts: I am currently trying to make heatmaps of bird observations in an area. I have had a lot of success making the actual heatmaps for most birds, except the ones that are extremely abundant. I use the heatmaps to find density of the birds per acre at a given point, so it's important for me to get all of the birds on a map. I was wondering if anyone has had experience with making heatmaps from numerous, dense points? What do you need to do differently to get it to show up?


texts: QGIS processing toolbox: fieldcalculator - update only selected features is not possible

texts:
I am working on a model where I need some calculations on only some selected features.

In the normal fieldcalculator you can check 'only update ... selected features'. When using the fieldcalculator from the processing toolbox, it is not possible to do that.

Is there a workaround to fix this?


texts: How to replace arcpy.CalculateField_management with an update cursor?

texts:
I'd like to replace this expression

arcpy.CalculateField_management(bufferFile, "Shape_Area", "float('!shape.area@squaremeters!')", "PYTHON")

with an arcpy.da.updatecursor.
The reason for this is that i want to avoid the cryptic syntax of the command above to improve code readability.

Is this possible?


texts: Is it possible to proceed direct geo-referencing and ortho-rectification for a GeoTIFF with GDAL/OpenCV in one step

texts:
I work under Debian Linux and want to ortho-rectify and geo-reference images aquired by a tilted twin camera system using:

the attitude parameter (roll, ptich and heading) of the gyro-stabilized platform and

the position data (longitude, latitude, altitude)

from a parallel running IMU/GNSS logged at the mide-exposure time mark (see image below).

The flight platform is working over a sea surface, so terrain issues could be neglected.
The transformation from longitude, latitude, altitude (ellipsiodal) to x, y, z (ortho-height GEOID) is done by the proj tool.
Normally I start to correct the perspective distortion ("ortho rectification") using openCV using

getPerspective to implement the passpoint configuration and get the rotation matrix setup and

warpPerspective to create the new image with a given resampling algorithm

and apply the geo-referencing aftermath

gdal_translate to write the ..gpc's and the SRS and

gdalwarp to create the GeoTIFF container with the expected resolution (resampling routine/ type again).

So the GDAL is here used as "GeoTiff-Driver" to implement the SRS metadata and to assure the resolution via passpoints which are calculated also in the getPerscpective process before.
To avoid two interpolation steps, based on the two tools and saving time and resources,
I want do do this in one programatical step (tool) after reading the raw TIFF image into the RAM.
Question: Is either

the creation of a GeoTIFF (augmentation with the co-ordiante system metadata) using openCV or

on the other hand the perspective correction in GDAL (including the C-API)

in that way possible?


texts: How to replace characters to eliminate encoding errors?

texts: Working with Qgis, I have a table representing streets. Attributes inlude street name, length, pavement and some others. Unfortunately, all names with ä or ö or ü display 'odd characters' like Ã1/4. When trying to replace these odd characters with real German ones, ALL streets in my list end up having the same name, instead of only replacing these odd characters. How can I replace only certain characters?


texts: Automate map symbology using varying input data in ArcGIS/arcpy?

texts:
I'd like to generate a series of maps, where each map displays graduated colors based on a different variable in the feature's attribute table. The geographic area is the same in each map. I'm using ArcGIS 10.3, and would like to automate this using arcpy.

As an example, see the two maps below, except there will be loads of them:

Manually, I change the Value Field in the Layer Properties to get each map. How can this be done automatically for a high number of different Fields?

Since the underlying data differ for each map, arcpy.ApplySymbologyFromLayer doesn't get me there. Any tips?


texts: Applying Rule-Based Style taken from another layer to layer with no geometry

texts:
I have two layers

"Suburb_Type", that has more than 1000 suburbs in shapes and is styled with categorisation rule. (columns: 'suburb_code', 'geometry', 'category_variable')
"Suburbs_in_Study",  with identical geometry data to Suburb_Type but without the column 'category_variable'.

I want to apply a rule-based style on "Suburb in Study", so that it will highlight (draw thick outlines) those that are listed in another layer, "Study_List" (CSV, no geometry) using 'suburb_code'. (columns: 'suburb_code'; only a handful of suburbs are listed).

How do I apply a rule-based style using expression editor? I've seen tips that utilise geometry intersection. However, since my list does not have geometry but is a simple CSV list, I'm unsure how I'd go about it. The idea is that Study_List.csv will be updated frequently.


texts: Choosing CRS for metric distance calculations?

texts:
I have the following ArcPy script to calculate total length of Polylines in a Feature Class/Shapefile:

arcpy.Project_management('lines.shp', 'lines_projected.shp', arcpy.SpatialReference(TODO EPSG CODE))
arcpy.MakeFeatureLayer_management('lines_projected.shp', 'lines_layer')
geometries = arcpy.CopyFeatures_management('lines_layer', arcpy.Geometry())
print 'Number of lines: ' + str(len(geometries))
total_length = sum([g.length for g in geometries])
print 'Total length: ' + str(total_length/1000) + 'km'

What is the methodology to find appropriate Coordinate Reference System assuming the data associated with well known region (For example "Berlin" or "France")?

For example why a simple approach of choosing the appropriate UTM zone out of the 60 won't work


texts: does anyone know if there is a way to save a QGIS project in a manner that allows it or if there is a way to save a qgis project as mbtiles for use with mapbox


texts: Converting EPSG 32639 to WGS 84 using Proj.Net gives wrong coordinates

texts:
I've used Proj.Net in my c# application to convert from UTM 39N to WGS 84 as below:

private const string wkt32639 ="PROJCS[\"WGS 84 / UTM zone 39N\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",51],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],AUTHORITY[\"EPSG\",\"32639\"],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]";
        public static void ProjectLatLngToXY(double lat, double lng, out double[] xy)
        {
            var gcs_WGS84 = GeographicCoordinateSystem.WGS84;

            var cf = new ProjNet.CoordinateSystems.CoordinateSystemFactory();
            var f = new ProjNet.CoordinateSystems.Transformations.CoordinateTransformationFactory();
            var sys32639 = cf.CreateFromWkt(wkt32639);

            var transformTo3857 = f.CreateFromCoordinateSystems(sys32639, gcs_WGS84);
            double[] fromPoint = {lat, lng};
            xy = transformTo3857.MathTransform.Transform(fromPoint);
        }

But it gives me the wrong coordinate:
 WGS84(30.8463279037339, 53.5421539663397) --> UTM( 46.511532454882378, 0.00048291699191924472).

What is the problem?


texts:
I have the following requirement, currently I have 100 Raster files with precipitation data for each week represented in 52 layers. I have to load these Raster files in a system that can only work with Vectors.

The tooling that I have is QGIS and PostGIS. At first I was thinking to polygonize based on precipitation and load it in postGIS. With 1 Rasterlayer I get around 163k records. In the end it means that I will have around 847 million (163k*52*100)records. I am now considering more efficient options.

Right now I was thinking to polygonize each pixel on the raster and add each layer as a field (52 columns) in the attribute table. I have tested this situation and I get for 1 layer 760k records. This situation would generate in total 77 million records. This looks in my case like the way to go.

I am pretty new with Spatial data so I am wondering if this is the best solution. The goal is not to lose any detail. Of course we always have the raster files but it would be "handy" to have everything in the target database/GIS application.

Is my way described the best way? Perhaps there are any suggestions?


texts: Failed to export all rows in attribute table in ArcMap to .dbf

texts: I would like to export a large attribute table to .dbf format, which includes almost 5,000,000 rows. But the exported table only contains about half of the rows without showing any error message during export progress. I am wondering if there is a size limit for exporting attribute table in ArcGIS.


texts: Calculate % of point features within a certain distance/buffer

texts:
I am relatively new to ArcGIS.

I have point data of specific locations (e.g. doctor’s surgeries).  I have buffer rings around these points of 0.5 miles (roughly 10 mins walking).

I want to calculate the percentage of my surgeries which are in a cluster where there are 3 or more surgeries within 0.5 miles (as the crow flies).

What is the best tool to calculate this?


texts: ArcGIS convert TSurf to multipatch without license to use Layer3DToFeatureClass_3d

texts:
I'm trying to convert a TSurf into [1] polygons shapefile (got this part) and [2] a multipatch.

I tried Layer3DToFeatureClass_3d, but I don't have the license for it. Is there a viable alternative?

I'm working in ArcGIS and would prefer to write this up as a tool using ArcPy.

Worst case scenario, I would have to consider doing this in QGIS. If I do QGIS, is there a ready-to-go plug-in that converts TSurfs to polygons SHP and multipatch?


texts: How to install OTB/Sextante plugin on QGis 2.0 (OSX)

texts: I remember the Sextante plugin used to be available for my previous version of QGis. When I got a new computer however, I downloaded QGis again and got 2.0. Searching for "Sextante" or "OTB" yields no results in the Manage and Install plugins list. What's the best way to get Sextante working here? I'm worried about trying to install a previous version of qgis for fear of messing up the dependencies and so on...


texts: I'm using Window 10 Japanese OS. I would like to change the settings (menus etc.) of QGIS 3.0.1 from the default Japanese into English. I tried below but it wouldn't work.


texts: Error opening feature class from SDE (which can be opened in another application)

texts:
We're using ArcGIS 10.1 with ArcSDE 9.3.1 on Oracle 10g.

I've got two layers that cannot be opened or modified with ArcCatalog or ArcMap (but they show up in the list. Everything worked just fine until a few days ago when I added some columns from a third party software using SQL. As if this wasn't foolish enough (as it seems on Google) I also had an MXD open with these layers in it.

Now I can't open or use them in any ArcEnviroment of any kind (also tried Topocad and FME, and on different computers, one of them has ArcGIS 9.3.1... No go). Mostly I only get "Error opening feature class". Sometimes when I try to open the properties of the layers I get "Failed to edit the selected object(s). The workspace is not connected. Table attachments not supported in this release of the Geodatabase.". I've also gotten "Arcobjects error -2147216117 - Network I/O error".

The third party application however, can open and use them just fine, although it's reading from a view consisting of the data table + geometry table (the "F****"-tables) for each respective layer. With this in mind I've checked the database. Both the data tables and geometry tables exist with no errors and the connection between them is registered. I read somewhere on Google that the SDE.COLUMN_REGISTRY table could get out of sync when adding columns via SQL. So I checked it, but it's in sync. I also checked some metadata tables but couldn't see anything there (I don't really know what I'm looking for in there though).

My best guess is that the problem lies somewhere "between" ArcGIS and the database, since the tables obviously exists and is working in the third party application. There's no network error either since the rest of the database layers and tables can be used just fine. I'm guessing the problem lies in some kind of registry, metadata tables or cache, but I'm getting all out of ideas.

edit: I forgot to mention that the tables are not versioned, and we tried a server reboot.

Anyone have any ideas?


texts: Generating Mapbook with Dynamic Text based on Attributes from Related Table?

texts:
I have a series of individual parcels with multiple soil sample points on each parcel. I need a way to communicate the soil sample information to the landowners. There are about 500 parcels so I need a way to automate the creation of maps and a report of the soil analysis, which is in a series of related tables (Site data --> Soil Horizon Info --> Horizon Analytical Results).

One of my solutions is to flatten these tables into a database row for each point, do a spatial join and append the soil point data to the parcel polygon, but this is very time consuming to manually transpose these related records in Excel.

Is there a faster way to use data driven pages and dynamic text on the map layout displaying related data?


texts: Finding city area by city, region, country using overpass API

texts:
I am trying to define area for a particular city to find things in this area. I know about queries area[name="New York"]; node[...](area). The problem with such queries is that there can be many areas for a particular name. Let's use Atlanta, Georgia, US as example. There are many areas called "Atlanta", and many "Georgia". The best query I came up with is:

(area["ISO3166-1"="US"][admin_level=2]; )->.country;
(area["name"="Georgia"]["border_type"="state"])->.state;
(area["name"="Atlanta"])->.city;
node[...filter for node...](area.country)(area.state)(area.city);

I.e. I defined 3 areas and I use their intersection, and it works. In addition I can use tags to better define region and city areas, but it seems there is no single tag/key defining well region or city, different tags are used for different cities. "border_type"="state" works only for US http://wiki.openstreetmap.org/wiki/Key:border_type, so at this level it's hard to use keys and tags if you target all countries.

Is it the best way to uniquely identify area for City in Region, in Country?

I have feeling that my query is pretty expensive.

And why is it so hard to "resolve" city, region, country?

I am very new to overpass API, this is what 1 day of learning brought me to.


texts: Calculate the distance between two points on a sphere (earth) going through the earth?

texts:
I can see the formula and name of the term for the distance between any two points on a sphere when going around the surface of the sphere is the great-circle distance, or orthodromic distance.
What is the calculation for the distance between any two points on a sphere going directly through the sphere?


texts: How to merge two shapefiles with partial difference in QGIS?

texts:
As illustrated below, a copy of the same shapefile was given to two persons who edited them partially by changing the attributes of different features.

I would like to know how to merge the two shapefiles in QGIS into a new one with the differences included?

Following the advice below, I'm still unable to merge the two shapefiles "1" & "2" into one:


texts: Calculating monthly precipitation mean for Brazilian municipalities

texts:
Need as final product a table with monthly precipitation mean for all brazlian municipalities in the year of 2006. I did this code, which I think it calculated this, but there's no date reference in feature properties, so I don't know of which month is the data.

Can someone help me?

Code link: https://code.earthengine.google.com/f9dc0699062630a105032cbff1c10413

Script:

var mun = ee.FeatureCollection("users/rodrigoccuri/BRMUE250GC_SIR");
var chirps = ee.ImageCollection("UCSB-CHG/CHIRPS/DAILY");

var monthlyPrecip = ee.FeatureCollection([]);

var monthly = chirps
        .filter(ee.Filter.calendarRange(2006, 2006, 'year'))
        .filter(ee.Filter.calendarRange(1, 12, 'month'))
        .sum();

var mun_month=monthly.reduceRegions(mun, ee.Reducer.mean(), 1000);
monthlyPrecip=monthlyPrecip.merge(mun_month);

print(monthlyPrecip.first());

Export.table.toDrive(monthlyPrecip, 'precipbymun2', 'munprecip', 'MunPrecipitation');


texts: Can I create a cartodiagram in QGIS 1.7.3? I need one bar graph in every territorial unit of one layer. It must vizualize organization on X and number of research in one organisation. Is it possible? Is there some plugin?


texts: Choosing the correct value for proj4string for shapefile reading in R?

texts:
I am having a shapefile of polygons and another CSV file which contains a list of points as (Lat, Lng) pairs..

I want to check for each (lat, lng) pair from the CSV file which polygon does it fall inside..

The shapefile is projected and the proj file reads like this:

PROJCS["Transverse_Mercator",GEOGCS["GCS_OSGB 1936",
DATUM["D_OSGB_1936",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],UNIT["Meter",1]]

My plan is as follows:

Read the shapefile using the readShapePoly function in the R MapTools package.
Read the points coordinates from the CSV file into a dataframe and convert it to SpatialPointsDataFrame
Use over function to determine which polygon it falls inside.

In order to do so, I need to specify the proj4string while loading the shapefile in step 1 and also transform the coordinates from the CSV file into the same projection system using spTransform function before applying the over function in step 3 as it requires that the points and polygons must be under the same projection system.

Any idea about what should the correct value for the proj file content shown above ?


texts: Is there a way to change the default options for the labels in the layouts. It is annoying to have to add a frame, background, offset each time when you have multiple labels.


texts: Removing where building data is null in CartoDB?

texts:
I am new to GIS systems and am beginning with CartoDB. I have extracted polygon data from Open Street Map which I have uploaded and added as a dataset. The data shows building footprints but these seem to disappear into another poloygon(?) which shows the broader site boundaries; in essence everything is highlighted bar the roads when what I actually want is only the building footprints highlighted.

Anyway, in the table I have a lot of rows where the value in the building column is null. When I use the filter to switch this off, I achieve what i need. However, this is only possible when viewing the list layout (I just switch off null) because for city size data it says too much data to view as a list so I have to search to filter if that makes sense and I'm not sure how to switch it off this way?

I have also tried a basic SQL query on the table which did not seem to work:

SELECT * FROM map_table;
DELETE FROM map_table WHERE building = "null";

I'm new to programming so probably making some basic errors but if someone could shed some light or point me in the right direction?


texts:
I need to display a large raster with ArcGIS. To do so, I'm using pyramids, and it is working, but they can be long to build. So I would like to build the pyramids in a separate thread. When doing so, the layer is added in the TOC, but not on the map.

Here is a sample code :

private class Worker {

    private delegate void RasterLoadedCallback(IRasterDataset rasterDataset);

    public void DoWork() {

        // Set the workspace and file names :
        string workspacePath = "C:\\Path\\To\\My\\Folder";
        string fileName = "filename.tif";

        // Open a workspace :
        IWorkspaceFactory workspaceFactory = new RasterWorkspaceFactory();
        IRasterWorkspace rasterWorkspace = (IRasterWorkspace)workspaceFactory.OpenFromFile(workspacePath, 0);

        // Open a file in the workspace :
        IRasterDataset rasterDataset = rasterWorkspace.OpenRasterDataset(fileName);

        // Create the pyramids :
        IRasterPyramid rasterPyramids = (IRasterPyramid)rasterDataset;
        rasterPyramids.Create();

        // Run on the main thread :
        RasterLoadedCallback callback = AddRasterToMap;
        Dispatcher.FromThread(mainThread).Invoke(callback, new object[] { rasterDataset });
    }

    private static void AddRasterToMap(IRasterDataset rasterDataset) {

        // Create a raster layer from a raster dataset :
        IRasterLayer rasterLayer = new RasterLayer();
        rasterLayer.CreateFromDataset(rasterDataset);

        // Add it to a map if the layer is valid.
        if (rasterLayer != null) {

            IMap map = MyAxMapControl.ActiveView.FocusMap;
            map.AddLayer((ILayer)rasterLayer);
        }
    }
}

Does anyone know what could the problem be ?


texts: How to check if a geometry is contained in a geometry collection in postgis?

texts: How can I check if a geometry is contained in a geometry collection ? Specifically , I am using ST_ClusterWithin in PostGIS to get a cluster which returns each cluster as a geometry collection. Now I want to extract the cluster_id for each geometry. For this I need to check if the geometry is within the geometry collection. How can I do it ? It is related to this question I asked on stackexchange some days ago.


texts: Confusion regarding TopoJSON polygon coordinates

texts:
I have a TopoJSON file which represents a hexagon. A hexagon has 6 vertices, so I was expecting the arcs attribute of TopoJSON file would contain 6 points, but it contains 7.

I wanted to know why there are 7 coordinates instead of 6, and what does that extra coordinate represent?

{   "type": "Topology",   "arcs": [
    [
      [
        0,
        1
      ],
      [
        0.5,
        0.86
      ],
      [
        0.5,
        -0.86
      ],
      [
        0,
        -1
      ],
      [
        -0.5,
        -0.86
      ],
      [
        -0.5,
        0.86
      ],
      [
        0,
        1
      ]
    ]   ],   "transform": {
    "scale": [
      1,
      0.5
    ],
    "translate": [
      0,
      0
    ]   },   "objects": {
    "state": {
      "type": "GeometryCollection",
      "geometries": [
        {
          "arcs": [
            [
              0
            ]
          ],
          "type": "Polygon",
          "id": "A&N ISLANDS"
        }
      ]
    }   } }


texts: QGIS Virtual Layers based on WFS fail to load on re-opening project

texts: I have created virtual layers that use WFS layers as one of their sources. Usually, it is an intersection between the WFS layer and a local polygon layer. I embed all the sources. However, when I reload the project, the handle bad layers dialogue comes up and it is unable to resolve the source. Is there a way to reliably use WFS layers within virtual layers?


texts:
If I have two point pattern distributions within the same geographic region, how would I go about visually and quantitatively comparing those two distributions?

Also assume I have many points within a smaller region, so simply displaying a pin map is uninformative.


texts:
I have GeoJSON coord:
{"type":"FeatureCollection",
 "features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":
   [[[66.87480926513672,48.111213657240576],
   [66.89043045043945,48.111213657240576],
   [66.89043045043945,48.119751843350834],
   [66.87480926513672,48.119751843350834],
   [66.87480926513672,48.111213657240576]
]]}}]}

And I have image from satelite of this area in PNG format:
How can I connect coords and image in one TIFF/GeoTIFF file?
I tried this solution Georeferencing raster using GDAL and Python?, but I cannot understand how to convert my coord to this format:
gt = [-7916400, 100, 0, 5210940, 0, -100]


texts: Creating boundaries from points and area measurements

texts: I have a list of villages and the area measurement for each village. Is there a way to draw hypothetical boundaries of each village based on the area measurements and the calculation is able to measure around two thousand different villages?


texts:
I'm constructing new memory layer to do some spatial data processing. I opened new QgsVectorLayer and I'm trying to add fields dynamically using
fld = QgsField("Name", typeName = "TypeName")

Constructing a list of fields with a loop based on information from other layers.
When I call:
layer.dataProvider().addAttributes([list of QgsField])
layer.updateFields()

and then to check :
print("Layer init fields:", [field.name() for field in layer.fields()])

I get empty list, which means there are no initialized attributes in a layer.
My question is QgsField correctly initialized?
res = layer.dataProvider().addAttributes(field_def_list)
print("Adding attributes...:",res)

Says it is initialized. Any idea where I abused the QgsField init.
Is initializing QgsField by typeName right way to go defining new fields or should I use QVariant.Type?


texts:
I am using ArcMap.
I have a parcels layer and I am overlaying a soils polygon layer over it.  I am trying to filter out only the parcels that contain at least 50% of their total area in the soils layer.
Is there a way to effectively do this and create a new shapefile for the filtered out parcels?


texts: How to get output format JPEG using like source GeoTIFF (int16) in service WCS in Geoserver?

texts:
I have GeoTIFF file (int16), and I publish the layer in Geoserver using like store in Geoserver my file, now I used WCS request builder to get JPEG-like output format and I get an error "No possible show the image because have errors". But If I convert my GeoTIFF file from Int16 to Byte, and I publish another layer in Geoserver with it I don't have any problem and I get JPEG in WCS, but in this case I get GeoTIFF (byte) too.

So, I want to get GeoTIFF (int16) and JPEG file by WCS service, so what kind of GeoTIFF I need like source? Or maybe I need any extension to get this?

This is my system:
- Ubuntu 14.
- apache-tomcat-8.5.32_2
- jdk1.8.0_181
- Geoserver 2.13.2
- native JAI and ImageIO extensions


texts: Command line tools to generate elevation profile from DEM + GPX/GeoJSON

texts:
I'm looking to generate elevation profiles from a number of GPX traces (which I also have GeoJSON conversions of). I have 20m resolution DEMs of the area, in GeoTIFF format. Ultimately I want to generate a static image that combines a number of these elevation profiles, but I'll be happy if I can get something like a CSV of elevation values sampled at regular intervals.

Summarised, how can I turn:

1+ vector paths (.gpx or .geojson)
1 DEM (.tif)

into:

1+ .svg (raw plot, no axes or labels); or
1+ .csv

using only command line tools. I have managed to achieve this manually using QGIS (and the Profile Tool plugin), but need to automate it. I'd prefer to avoid writing code - but Python is much preferable to R. A workflow that added elevations to the GeoJSON file would be better than nothing. I'm really not looking to implement a sampling algorithm from scratch.

OS X or Ubuntu are ok.

(Note to moderators: there seem to be lots of similar questions, but many of them are just "how do I get an elevation profile from this GPX file". The key differences are that I have the suitable terrain file already, and I need to automate this for dozens of files.)


texts:
I'm trying to understand how dates are queried in the ArcGIS Server REST API (v10) using the query functionality (...MapServer/find?searchText=...). If I search on a string attribute I can get a result and its date field shows the value "6/1/1995". However if I then search by the date field using "6/1/1995" I get 0 results.

Am I supposed to provide my date in a particular format? I tried reversing the date's components' ordering, changing the separator, with/without leading zeros, and even tried the timestamp to no avail. I'm not in control of the service or the data so I don't know if any settings are in place in the source data that make this more difficult. The field's format is reported as esriFieldTypeDate with length 36.

Understanding Date Time Format output in ArcGIS REST API? suggests I should be seeing the date field reported as a timestamp in the JSON output of my query but in both HTML and JSON it is "6/1/1995".

I saw this thread on the ArcGIS forum but as using a timestamp didn't help me I assume it's not relevant.


texts:
So I have a table in PostGIS, and each row has a linestring geometry in it. I would like to do a query to return the whole rows of the table that intersect with the linestring along with the position(s) of that intersect.

At the moment I am using;

import geopandas as gpd
import psycopg2  # (if it is postgres/postgis)

con = psycopg2.connect(database="your database", user="user", password="password",
    host="your host")

sql = "select geom, x,y,z from your_table which intersects Linestring”

df = gpd.GeoDataFrame.from_postgis(sql,con,geom_col='geom' )

I’m a complete beginner to SQL and the resources surround PostGIS ST_Intersect aren't so helpful.


texts: Predict continuous variable (forest biomass) using trained Tensorflow model

texts:
I want to predict forest biomass over my study region. To do that I have trained Tensorflow model using field data (70 Temporary forest plots) and some remote sensing variables that i've extracted from images disponible in the Google Earth Engine Dataset. Thus, for each plot (training pixels) I got the following training data (sample).

After that I have trained a tensorflow model (DNN) that predict the output variable (acc_carbomasse) given the other input variables.
My question is : How can I apply  my trained model on ee.ImageCollection in order to predict acc_carbomasse variable over my full study region with the possibility of mapping that variable ?


texts:
unrecognized command do is occurring when i am trying to use below code in mapbasic window. can anyone help me how to fix it although syntaz is correct

fetch first from t1

Do while Not EOT(t1)
    'Do this with table t1
    fetch Next from t1
Loop


texts: Getting precipitation daily sum data from GSMap in Google Earth Engine

texts:
There are two posts about this issue, but neither seems to work properly:

Reduce image collection to get daily sum from hourly precipitation GSMaP 12:00h pm to 11:00h am
Reducing image collection to get daily sum from hourly precipitation and extraction of polygon data?

I want to get the precipitation plot (mean of a polygon) between a couple of months. By using GSMaP i can get the plot easily for a period of given time.
var lluvia = ee.ImageCollection('JAXA/GPM_L3/GSMaP/v6/operational')
.filterDate('2020-01-01','2020-11-30').select('hourlyPrecipRate')
.map(function(im){return im.clip(geometry);})
print(lluvia.size());
print(ui.Chart.image.doySeries(lluvia, geometry, ee.Reducer.sum(),1000));

The problem is if i want to sum the "hourlyPrecipRate" data for each day in that period. I saw many post about this issue.
Is it easier if I want the data weekly in stead of daily?


texts: Layer group export in KMZ format in geoserver

texts: I have created a layer group in Geoserver with several layers, but while I am exporting the layer into kmz and viewing in google earth all the consisting layers are displaying in the side panel. is it possible to display only the layer group name instead of all the layer which inside the layer group.


texts:
I have a shapefile of polygons, which are effectively borders of a geographic unit (consider as an example the 50 u.s. states, each state has within it some number of points.).

I'd like to create Voronoi polygons from the points, with the caveat that the state borders effectively constrain the Voronoi polygons created from the points within that state.

The labor-intensive way to do this would be to create 50 individual shapefiles for each state, create Voronoi polygons within each, then manually merge them back together.

Is there an easier way to do this, ideally in QGIS (am using 2.18 on Mac)?


texts: Gdal2Tiles getting tif with dtype = uint8 but want int16

texts:
I have a gdal2tiles code for getting tiff file. In my code I am getting true tiff format but it makes my dype uint8. I want int16 for dtype. how can I overcome it? I know I have to add gdal.GDT_Int16 somewhere but I don't know where... the relevant parts of the my code:

default_tileformat = 'png'

tempdriver = gdal.GetDriverByName( 'MEM' )
tiledriver = gdal.GetDriverByName( default_tileformat )

...

def writetile( filename, data, dxsize, dysize, bands):
"""
Write raster 'data' (of the size 'dataxsize' x 'dataysize') read from
'dataset' into the tile 'filename' with size 'tilesize' pixels.
Later this should be replaced by new <TMS Tile Raster Driver> from GDAL.
"""

# Create needed directories for output
dirs, file = os.path.split(filename)
if not os.path.isdir(dirs):
    os.makedirs(dirs)

# GRR, PNG DRIVER DOESN'T HAVE CREATE() !!!
# so we have to create temporary file in memmory...

#TODO: Add transparency to files with one band only too (grayscale).
if bands == 3 and tileformat == 'png':
    tmp = tempdriver.Create('', tilesize, tilesize, bands=4)
    alpha = tmp.GetRasterBand(4)
    alphaarray = (zeros((dysize, dxsize)) + 255).astype('l')
    alpha.WriteArray( alphaarray, 0, tilesize-dysize )
else:
    tmp = tempdriver.Create('', tilesize, tilesize, bands=bands)

# (write data from the bottom left corner)
tmp.WriteRaster( 0, tilesize-dysize, dxsize, dysize, data, band_list=range(1, bands+1))

# ... and then copy it into the final tile with given filename
tiledriver.CreateCopy(filename, tmp, strict=0, options=gdal_driver_options)

return 0

and another part:

 # Load raster from read window.
 data = dataset.ReadRaster(rx, ry, rxsize, rysize, dxsize, dysize)
 # Write that raster to the tile.
 writetile( filename, data, dxsize, dysize, bands)


texts: Alternative of OffsetByXY method of mapXtreme in PostGIS

texts:
I have an application in MapXtreme. I am converting that into PostGIS.For a purpose I am using the below given function in Mapxtreme.

IGeometryEdit geomEdit = ftrgeo.GetGeometryEditor();
geomEdit .OffsetByXY(-(Convert.ToDouble(300) / 2), -(Convert.ToDouble(300) / 2), DistanceUnit.Foot, DistanceType.Spherical);
geomEdit .EditingComplete();

What are the alternative methods of above in PostGIS?

Any Idea?


texts: Applying OS Mastermap symbology in QGIS?

texts:
I have downloaded OS MasterMap stylesheets from OS/Github.

How do I apply them in QGIS, all I get is style code rules for each symbology?
see below picture example from Topo area file.


texts: How to query Fusion Tables to produce a feature layer with the ArcGIS Android SDK?

texts:
I am hoping to find an example of how one can hook into Fusion Tables with the ArcGIS Android SDK.

The Fusion Tables API uses HTTP GET requests to query and retrieve data from a table. Shown here: https://developers.google.com/fusiontables/docs/v1/sql-reference#Select

This returns a JSON data that can hopefuly be consumed by the ArcGIS Android SDK.

Any ideas?


texts: Dragging Feature in ArcObjects and ArcGIS Engine (AxMapControl)?

texts:
I'm trying to implement moving a point feature in a custom C# ArcGIS Engine application on an AxMapControl. I've already created a custom tool to do some other things. And I can track when the user is doing a drag-type operation (i.e. click and hold while moving the mouse).

What I'd like to be able to do is give some visual feedback of the drag operation, but I'm not sure how to do that.

I can handle the feature selection, identifying the drag, and getting the new position, etc. Just need help specifically with the drag feedback. Ideally I would like to update the cursor to have the same symbology as the feature, but that's not an absolute requirement.


texts:
I am writing a plugin and have a postgis table which has EMPTY geometries in the geom column.

MULTILINESTRING EMPTY

I am having crashes which just close QGIS. I have narrowed it down to the EMPTY geometries. Removing them seems to help.

I tried editing the layer without using my plugin and still have the problem. It appears that the EMPTY geometries in the layer are not acceptable.

I am using the EMPTY geometries as a marker as this layer is a geom "changes" layer where I need all attributes but only the geometries which are added or changed from a similar layer.

Is the EMPTY geometry not valid in QGIS?  It should not cause a program crash.


texts: How do I produce a GeoJSON with 1 point at a certain lon/lat?

texts:
I need to create a GeoJSON string, which contains exactly one point at lon/lat 132.159633, 43.350116.

I'm trying to use GeoTools 12-RC1 for that.

Let's say I have following method, which is supposed to generate GeoJSON with that point:

public String geoData() {
    final GeometryBuilder builder = new GeometryBuilder();
    final Point point = builder.point(132.159633, 43.350116);
    return null; // Now I need to convert point to a GeoJSON string
}

How do I generate a GeoJSON string with point?


texts:
How to install and how to compile networkx python on QGIS?

I always get an error that no module named networkx in the console of QGIS
I copied the file networkx in C:\Program Files\Quantum GIS Lisboa\apps\Python27\Lib\site-packages and there are not change.


texts:
I'd like to make visible my var text between two resolutions so to speak between 150 and 50 for instance.
but I didn't find how to do this yet.

var communes = new ol.layer.Vector({
        title:'communes',
        source: new ol.source.GeoJSON({
            url: 'communes.geojson'}),
        style: function(feature, resolution) {
var text = resolution < 150 ? feature.get('nom_comm') : '';
if (!styleCache[text]) {
  styleCache[text] = [new ol.style.Style({
    fill: new ol.style.Fill({
      color: 'rgba(255, 255, 255, 0.2)'
    })

Any help ?


texts: Python output for batch "FeatureToRaster" in ArcPy

texts:
I am trying to batch process the conversion of shapefiles to rasters. I am stuck on how to specify the name for each output raster file. Part of the trick is that my input shapefiles are the names of frogs in "genus_species" format and go over the 13 character requirement of rasters.

For example, here are the names of my first two shapefiles:
Acris_crepitans.shp
Anaxyrus_americanus.shp

I would like the output rasters to be as follows (i.e., the first two letters of the genus, underscore, and then however many remaining characters can fit for the species):
Ac_crepitans
An_americanus

Here is my code thus far (it's probably horrible b/c I'm new to Python):

********************************************************************************
# Import arcpy module
import arcpy
from arcpy import env

#Set working environment
env.workspace = "C:\\GIS_data\\Frog_shps"
Dir = env.workspace

#List FCs
fcList = arcpy.ListFeatureClasses()

# Loop
for fc in fcList:

  output = Dir + "\\" + [here is where I am stuck]

# Process: Polygon to Raster
arcpy.FeatureToRaster_conversion(fc, "BINOMIAL", output, 1000)
print "finished polygon to raster"

********************************************************************************


texts: Subset raster stack with logical indeces R

texts:
Is it possible to subset a raster stack by indexing on a logical vector?

r1 <- raster(nrow = 100, ncol = 100)
r1[] <- round(runif(ncell(r1), 1, 4), 0)
r2 <- raster(nrow = 100, ncol = 100)
r2[] <- round(runif(ncell(r2), 1, 4), 0)
r3 <- raster(nrow = 100, ncol = 100)
r3[] <- round(runif(ncell(r3), 1, 4), 0)

s <- stack(r1, r2, r3)
names(s) <- c("a", "b", "c")

index <- c(TRUE, FALSE, TRUE)

s[[index]]

Error in .local(x, ...) : not a valid subset

s[index,]

Error in s[index, ] :
    logical indices are only accepted if only the first index is used

Desired result:


texts: How to get the TEXT from a layers attributes to display on my map

texts:
I'm totally new with GIS software, so I apologize if this is a question that's already been answered!

I'm working with the Texas Landgrid. It's composed of Leagues, Labors, Blocks, Townships, Sections, Surveys and Abstracts (Super confusing at times!). I've managed to find the shapefiles for the landgrid, but I haven't found a way to get the text to appear on the map. I'll provide screenshots for examples as to what I'm talking about.

Here is a screenshot from drilling info.com:

And here is a screenshot from my QGIS project:

As you can see, none of the text is displayed in my QGIS map, so it's improbable for me to be able to locate specific tracts of land for my purposes.

I have found that the data for Surveys, abstracts, blocks, etc. is contained within the "TX Land Grid" layer as attributes. (COUNTYID, SURVEYABS1, SURVEYNAME, SURVEYBLO3 & SURVEYSEC4).

So my question is, can I somehow get these attributes to display as text in a similar way to the screenshot from DrillingInfo? I need to be able to see the names/numbers within the separate tracts of land.

Here is a link to a zip file containing the "TX Land Grid" shapefile.
TX Land Grid Shapefile


texts: Google Earth ignoring gx:altitudeOffset in KML files

texts:
I am currently writing software that creates 3D polylines and outputs these in KML format. According to the official documentation it is possible to define an altitude offset via gx:altitudeOffset to raise or lower the line. This is quite handy to avoid 3D polylines rendered in Google Earth to "disappear" below the ground in areas where Google's topographic data isn't as accurate as one would wish. However, it seems that gx:altitudeOffset has no effect in Google Earth - at least for me.

Has anyone come across this issue before?


texts: GeoPortal - A database Reference has not been configured for connection Tag

texts:
I've followed the instructions on setting up to a tee. I am using Oracle as a database. My database structure has been setup.

I receive the following error message when I try to search for anything:

Could not get a csw search engine: Did not get key = local in repository
 com.esri.gpt.framework.context.ConfigurationException: A databaseReference has not been
configured for connectionTag:

When I login, regardless of what credentials I use, it displays "Welcome!" in green, althoug the login hasn't actually happened.

In my gpt.xml file, I have made the following changes:

<interactiveMap
    jsapiUrl=http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.3m
    apServiceUrl=”http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer”
    mapServiceType="dynamic"
    geometryServiceUrl="http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"
    locatorUrl="http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Streets_US/GeocodeServer"
    locatorSingleFieldParameter="City"
    />

I commented out LDAP authentication, and opted for simple. I changed the U/N and P/W for this example.

<simpleAdapter>
        <account username="exampleUseName" password="examplePassword" encrypted="false"/>
        <roles>
            <role key="gptRegisteredUser"/>
            <role key="gptPublisher"/>
            <role key="gptAdministrator"/>
        </roles>
</simpleAdapter>

My question: What does this error message mean? What haven't I configured?

EDIT: Checked the Tomcat logs and found this:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class 'oracle.jdbc.driver.OracleDriver' for connect URL '*connection string*'


texts: Copy a spatial table from one PostGIS database to another PostGIS database

texts:
I have two PostGIS databases on two different servers.
The first server is PostGIS 2.0 and the second server is PostGIS 1.5.

On the PostGIS 2.0 I have a table "lakes" with MULTIPOLYGON geometry column. My task is to copy my table from the PostGIS 2.0 database on the first server to a PostGIS 1.5 on the second server.

I can't access the first database through remote connection, and therefore I can only export the table by exporting it to a .sql file.

What command do I use to export my "lakes" table to an .sql file to ensure that the geometry column information and the spatial index is correctly recreated in the second database?

I used the tool shp2pgsql before. Is there a similar tool for "PostGIS to PostGIS" export?


texts: Moving graphics in Esri Flex Feature Layer

texts:
I have an ESRI Flex 2.3 FeatureLayer with some graphics in it. I am able to access the graphics geometry and parse the geometry as Esris MapPoint class for Flex Api. I am calling the update(x,y,srs) function..but the change doesnt seem to reflect on the fly unless i zoom in or zoom out. I am trying to make an animation in which the point graphics would move to given locations all at once, but the update() function is not effecting on the run, I called featurelayer.refresh() but that did not help at all. Is there a way to invoke feature layer`s redraw and not refreshing it so that it doesnt request data from service again?

my code..

//movementfeatureLayer is the layer which has point
var features:ArrayCollection=movementfeatureLayer.graphicProvider as ArrayCollection;
for(var i:int=0;i<features.length;i++)
{
var g:Graphic=features.getItemAt(i) as Graphic;
var geomPoint:MapPoint=g.geometry as MapPoint;
var x:Number=geomPoint.x;
var y:Number=geomPoint.y;
(((movementfeatureLayer.graphicProvider as ArrayCollection).getItemAt(i) as Graphic).geometry as MapPoint).update(x+500,y-500,map.spatialReference);
                    }


texts: Calculating area for range of values of spectral indices in QGIS?

texts:
How do I retrieve the area of a place which I've already calculate the NDVI index?

The thing is that I just need the area of the pixels that have values between 0.5 to 0.8 (It is a Landsat 8 image).

I'm trying to do the job in QGIS.


texts:
I have a sqllite table which has columns to hold the hectares and acres of polygons but I only want to have two digits after the decimal point - when calculated they have 14!

How do I change this so only 2 appear?


texts:
Have a binary raster. I would like to remove any 'islands' that are fully surrounded by one of the classes while leaving the 'islands' that are fully surrounded by the other.

If 1 is enveloped by 0, then reclassify to 0. If 0 is enveloped by 1, leave as one.

Essentially a select by location, but for raster.
This is super easy in vector - struggling to find a solution in raster.  Am I overlooking the obvious?

Platforms of choice are Arc or QGIS.


texts: Free datasets of Europe's historical country borders since the Middle Ages

texts:
Is there a source for historical shapefiles of Europe since the Middle Ages?

There was a promising answer to the similar question
Is there a source for historical shapefiles of Europe in the modern era?
but the link provided doesn't work (anymore).


texts: Creating plugin in QGIS to access PostgreSQL?

texts:
i want to develop a plugin in QGIS to access to my database in postgres :

i want to import a file.sql that contains my SQL Code in a textbox , and execute this code to assign myd database.


texts:
I would like to use the Filter App Template for an ArcGIS Online Map I'm creating.  I'm working with a water system, and I want the user to be able to use the filters to search for certain junction types (e.g. manholes, fire hydrants, etc.).

While in "Map View" I created filters for each unique value in my "Junction" field.  I selected "Apply Filter and Zoom," but when I go back to the Filter App it says, "Web map does not contain any interactive filters." Is there something I'm missing?


texts:
I'm using MapBox Studio to create a personalized map for slums.

In OSM we have many polygons representing buildings and I need to style them according to their "building" tag. For example, the building=hospital tag should have a red background.

I tried to select those polygons but I can't find a way
This works ok as expected:

#building {
    polygon-fill: #2aeb38;
}

... but none of these work:

#building [building='hospital'],
#building [amenity='clinic'],
#building [class='clinic'],
#building [class='hospital'],
#buildings [type='hospital'],
#buildings [type='clinic']{
    polygon-fill: #e28600;
}

In Maperitive I could easily style polygons and point easily by doing:

hospital : amenity=hospital OR building=hospital OR amenity=clinic
target: hospital
    define.....

but I can't replicate this on CartoCSS. Any ideas?


texts: Pix4D and ODM generated tiff with same source images not aligning?

texts:
I have created two georeferenced orthomosaics using dronemade images. I used OpenDroneMap and Pix4D for that and I used the same source images for both.

I thought that if I used the same images, the results should overlap perfectly since the exact same source has been used.
The problem now is that the Pix4D generated result seems to be shifted a little to the left and I don't know why that is.

The following images show what I mean:

This is the ODM result, which alines perfectly with the Google satellite basemap.

This here is the Pix4D generated result and it doesn't align at all, it is shifted.

The reference systems of both orthomosaics is : EPSG:32632 - WGS 84 / UTM zone 32N

The used .tiff files can be found on my DropBox:
https://www.dropbox.com/sh/tcoo03aqqflx5ht/AAC-emzFz7z0Ne1P9FY0LVc-a?dl=0

I am pretty new to GIS.


texts: Rotating ~90° using Two-Point Equidistant projection with Proj4

texts:
I'm trying to rotate a tif raster in R using Proj4's Two-Point Equidistant projection - I think the only way to rotate spatial geometries to custom angles.  But I'm finding the operation gets very slow approaching 90°, and in fact fails for that angle (possibly 2 separate issues).  This demonstrates:

require(raster)
require(rgdal)
# demo raster
r <- disaggregate(raster(volcano[1:60,1:60]), 4)
extent(r) <- c(-5,5,-5,5)
crs(r) <- "+proj=longlat +datum=WGS84"

# proj4 two-point equidistant rotate transformations
tpeqd_45 <- CRS("+proj=tpeqd +lat_1=2 +lon_1=-2 +lat_2=-2 +lon_2=2 +a=6371000 +units=m +no_defs")
tpeqd_80 <- CRS("+proj=tpeqd +lat_1=1.9 +lon_1=0.35 +lat_2=-1.9 +lon_2=-0.35 +a=6371000 +units=m +no_defs")
tpeqd_90 <- CRS("+proj=tpeqd +lat_1=2 +lon_1=0 +lat_2=-2 +lon_2=-0 +a=6371000 +units=m +no_defs")

system.time(r_45 <- projectRaster(r, crs=tpeqd_45))
   user  system elapsed
  0.350   0.051   0.404
par(mfcol = c(1,2)); image(r, asp=T); image(r_45, asp=T)

system.time(r_80 <- projectRaster(r, crs=tpeqd_80))
   user  system elapsed
  3.857   0.879   4.877
system.time(r_90 <- projectRaster(r, crs=tpeqd_90))
Error in if (value[1] != nrow(x) | value[2] != ncol(x)) { :
  missing value where TRUE/FALSE needed
In addition: Warning message:
In `dim<-`(`*tmp*`, value = c(nr, nc)) :
  NAs introduced by coercion to integer range

Note the increasing time to process for 80°.  For a 10x bigger raster this crashes my Macbook.  Does anyone know if this is a problem in the math for this projection and/or if there is any other way to rotate these in R?


texts: Reprojecting CRS from Geocode API fails to match shapefile CRS

texts:
I have a shapefile obtained from this link.

library(rgdal)
library(rgeos)

dir <- tempdir()
unzip('~/Downloads/4106902.zip', exdir = paste0(dir, '/4106902'))

shape <- readOGR(paste0(dir, '/4106902'), '4106902')
shape <- gBuffer(shape, byid = T, width = 0) #correcting orphaned hole problem

When I check the CRS associated with the file I get:

> proj4string(shape)
[1] "+proj=utm +zone=22 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"

This is equivalent to the EPSG:32722, according to spatialreference.org.
I need to locate a point obtained from Google Geocode API in this shapefile, so I'll read the latlong values and reproject them to the EPSG:32722:

google <- CRS("+init=epsg:4326")
point <- SpatialPoints(cbind(-49.25848, -25.45543),
                       proj4string = google)
point.rep <- spTransform(point, CRS('+init=epsg:32722'))

> summary(point.rep)
Object of class SpatialPoints
Coordinates:
          min       max
lng  675099.7  675099.7
lat 7183477.2 7183477.2
Is projected: TRUE
proj4string :
[+init=epsg:32722 +proj=utm +zone=22 +south +datum=WGS84 +units=m +no_defs
+ellps=WGS84 +towgs84=0,0,0]
Number of points: 1

However, when I try to match the locations, I receive an error message stating that the CRS are not identical.

> over(point.rep, shape)
Error in .local(x, y, returnList, fn, ...) :
  identicalCRS(x, y) is not TRUE

If I try to reproject the coordinates from google using the CRS extracted directly from the shapefile, instead of using the equivalent EPSG code, I get wrong lat value from the reprojection:

point.rep2 <- spTransform(point, proj4string(shape))

> summary(point.rep2)
Object of class SpatialPoints
Coordinates:
           min        max
lng   675099.7   675099.7
lat -2816522.8 -2816522.8
Is projected: TRUE
proj4string :
[+proj=utm +zone=22 +datum=WGS84 +units=m +no_defs +ellps=WGS84
+towgs84=0,0,0]
Number of points: 1

> over(point.rep2, shape)
   ID_ NAME1_ NAME2_ PARTS_ POINTS_ LENGTH_ AREA_
1 <NA>   <NA>   <NA>     NA      NA      NA    NA

My current workaround is to force the CRS of my points after the reprojection, allowing me to find the correct location of the point in my shapefile:

> proj4string(point.rep) <- proj4string(shape)
Warning message:
In ReplProj4string(obj, CRS(value)) :
  A new CRS was assigned to an object with an existing CRS:
+init=epsg:32722 +proj=utm +zone=22 +south +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0
without reprojecting.
For reprojection, use function spTransform

> over(point.rep, shape)
              ID_ NAME1_ NAME2_ PARTS_ POINTS_  LENGTH_    AREA_
1 410690205010318   <NA>   <NA>      1      27 1.661884 0.115704

Am I missing something? Why do I fail do reproject my point using the CRS from the shapefile?


texts: Creating hyperlink with relative path in related standalone table using ArcMap

texts:
I have a polygon feature class which has a related table (1:n Relationship) containing the relative path of pdf documents in a field. Using the Info-Tool to click in a polygon in ArcMap 10.7 I can see the related table but I would also like to define the field "URL" as a hyperlink which would open the pdf document.
Is this possible?
I cannot find a way to configure the field of this related table to be a hyperlink.
The URL field contains the relative path to the pdf file without a network drive letter e.g directoryname/filename.pdf. the path is not contained with quotations. The relative path is not recognised as a hyperlink. Why is this?


texts:
I'm converting layers from shape files to postgis with the below command:

shp2pgsql -s 22175 -c  -W "latin1" path/file.dbf' table_name db_name | psql -d db_name

Next, I add this layer to the GeoServer but the field native SRS is empty.
I thought that the SRID were wrong so I run:

SELECT ST_SRID(geom) FROM table_name;

And to my surprise I get 22175 the conversion is not the problem. What I am doing wrong?

Note: already exits other layers have been added (by someone else) and that layers have the field native SRS filled with value EPSG:22175.

What am I doing wrong?


texts: Upgrading Postgres database to Postgis 2.1.1

texts:
I executed the postgres 9.1.6 with Postgis 1.5.8 dump from a remote server on Linux

pg_dump -h localhost -p 5432 -U postgres -Fc -b -v -f "/somepath/tumidb9.1geom1.5.8.backup" tumidb9

So I have a valid dump

Can I just run the executable postgresql-9.3.0-rc1-linux-x64.run, select the Postgis 2.1.0 option with the check box that specifies prep for restore, create and intialize a new spatial database newdb in the 9.3 instance
and then execute
perl ../postgis_restore.pl "/somepath/tumidb9.1geom1.5.8.backup" | psql -h localhost -p 5432 -U postgres newdb 2> errors.txt on the 9.3 instance.

or do I have to install postgresql-9.1.6-1-linux-x64.run, with the Postgis 2.1.1 option, run the postgis_restore.pl on the 9.1 instance, and then use pg_upgrade to get us to 9.3?

thanks


texts: pgAdmin3 shp2pgsql tools: missing, how to obtain

texts:
We currently have installations of postgreSQL DBs of 9.3 and 9.4. On our clients in the folder C:\Program Files\PostgreSQL[9.3/9.4]\bin I cannot find the shp2pgsql tools.  I thought these older versions had the tool bundled with the with the PostgreSQL client software.

Where can we obtain these shapefile import/export tools (is it possible these additional "tools" were not installed when the base client software was installed).
If its a separate product that must be installed in addition to the base client software would QGIS be able to import a shapefile into our postgreSQL database lacking that standalone tool? Our QGIS version is v2.18.11

Our pgAdmin3 version is 1.18.1 - yes this old and we are unable to upgrade at this time!
NOTE: We cannot upgrade


texts: Calculating Distances between Field polygons via Road polygons using ArcGIS for Desktop?

texts: I have two polygons layers, one (grey) is Roads, other (blue) is Fields. Can I calculate distances between Fields (by field unique ID number) using Roads layer as distance measurement? What tools or extensions should I use?


texts:
I'm working with QGIS 3.14.
First I created my two fields "x" and "y", then I activate them on the label/placement window and I begin to work on the map:
I found that labels who are placed manually, move while I change my position on the map. That don't change the real position, it's just "virtually" to give us the possibility to see the polygon's name. But in my case it's slow down my work.
How can i change this option.... I don't found.
Here are images to help you to understand that I'm trying to explain:


texts: Plotting a circle on a Web map to view the resulting coverage over a central location

texts:
Not exactly a GIS question but I hope no one will mind.  Does anyone know of a website (something equivalent to Google Map) where you can indicate a location, give a radius and you can view the resulting coverage over that central location ?

Thanks.


texts: Dynamic (auto-refreshing) import of a polygon attribute to a point lying within this polygon

texts: I want to achieve something similar to what was discussed here. Except I would like this attribute to be automatically updated if I change the attribute of a polygon (its name specifically) or move them.


texts: SAGA algorithms not working on Qgis 2.18 on Mac OSX

texts:
Since last update to Qgis 2.18 from 2.14, I'm unable to successfully run SAGA algorithms (Mac OSX Yosemite). No matters if it is vector- or raster-oriented algorithm, the algorithm stops at this point with a message similar to :

"..Converting outputs
Loading resulting layers
The following layers were not correctly generated.
Kernel
You can check the log messages to find more information about the execution of the algorithm"

I can run SAGA algorithms for tables, tough. (e.g. Running Average works well). This makes me think that SAGA is correctly installed.

What I've tried so far:

I've reinstalled Qgis from scratch.
I've the same problem in two different Macs
I've checked the options in Processing (there is no option for SAGA folder as before)
I've checked the advanced preferences in QGIS (also, there is no option for SAGA folder)
I've deleted the /Users/user/.qgis2 folder before installing 2.18

EDIT: SAGA version is 2.2.3. It is installed automatically with Qgis.

EDIT 2: Exactly same symptoms in a second Mac. Reinstalled Qgis 2.14 and SAGA is live again (Saga version in Qgis 2.14 seems to be 2.1.4).

EDIT 3: New attempt in a brand new Mac resulted in the same symptoms.

¿Any ideas?

I'm pasting the full log of a failed execution, if it helps.

Algorithm Add coordinates to points starting...
shapes_points "Add Coordinates to points" -INPUT "/var/folders/r2/b15t0jvd45x_s7r0h1cpc0zh0000gn/T/processing644d036e8bde4096a10cdf7e37ed56a5/1478841643.755.shp" -OUTPUT "/var/folders/r2/b15t0jvd45x_s7r0h1cpc0zh0000gn/T/processing644d036e8bde4096a10cdf7e37ed56a5/78dc7b6f275e49afb2ec5dc408bcc39e/OUTPUT.shp"
/Users/daniel/.qgis2//processing/saga_batch_job.sh: line 3: 5770 Segmentation fault: 11 saga_cmd shapes_points "Add Coordinates to points" -INPUT "/var/folders/r2/b15t0jvd45x_s7r0h1cpc0zh0000gn/T/processing644d036e8bde4096a10cdf7e37ed56a5/1478841643.755.shp" -OUTPUT "/var/folders/r2/b15t0jvd45x_s7r0h1cpc0zh0000gn/T/processing644d036e8bde4096a10cdf7e37ed56a5/78dc7b6f275e49afb2ec5dc408bcc39e/OUTPUT.shp"
Converting outputs
Loading resulting layers

The following layers were not correctly generated.
Points with coordinates
You can check the log messages to find more information about the execution of the algorithm


texts: how to change the height of info window in carto

texts:
I have inserted a chart in info window for every feature of a polygon layer in Carto. I want to change the height of info window in order to be looked as a whole without the need of scrolling. In info window menu it is possible to change the width but what about height? I would prefer a way without using Carto JavaScript API?

My code is

  x

name_eng

{{name_eng}}

 the column_146851 is the column where there are the urls of every image. The outcome is here. The height didn't change. What is the problem?


texts:
I have tornados table with columns damage,date,month . I used the following code to create a barchart .

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>D3 Visualization API Sample</title>

        script type="text/javascript" src="libs/underscore-1.1.6.js"></script>

        <link href='css/cartodb.d3.default.css' rel='stylesheet' type='text/css' />

But When I run it, the chart is not displayed, instead I am getting the below as result.

Please let me know where I went wrong.


texts: Will using Zee Drive affect the performance of QGIS

texts:
At our company we are thinking of moving from a server to our local machines with Sharepoint.
Zee drive would be implemented to act as an interface for all our files, including our geospatial data. We would then run QGIS of our local machines and "fetch" the data we needed from one of these mapped drives.

I have read that using QGIS with a network drive is not very efficient and I am not sure if QGIS cache's this data. Will this effect rendering speed in QGIS?


texts: PostGIS - Snapping a point to a line doesn't work

texts:
I'm trying to snap one polygon to another, and I found that not all points are being snapped as expected. I tried to simplify the issue to make it all clear, and created this dummy example:

SELECT ST_AsText(ST_Snap(point,polygon, 0.00001)) AS point_snapped
FROM (SELECT
   ST_GeomFromText('POINT(-0.00000001 1)') As point,
   ST_GeomFromText('POLYGON((0 0,0 2,2 2,0 0))') As polygon
 ) As foo;
  point_snapped
-----------------
 POINT(-1e-08 1)

Why isn't the point "fixed" to be (0 1)?
And why does it work when I modify the polygon to have that point (which doesn't change the geometry at all)?

SELECT ST_AsText(ST_Snap(point,polygon, 0.00001)) AS point_snapped
FROM (SELECT
   ST_GeomFromText('POINT(-0.00000001 1)') As point,
   ST_GeomFromText('POLYGON((0 0,0 1,0 2,2 2,0 0))') As polygon
 ) As foo;
 point_snapped
---------------
 POINT(0 1)

Of course one thing I can do to solve that, for each point not snapped correctly, is to add the closest point to it from the other geometry to that geometry, and then snap. But it's quite difficult, and if there is a nicer way to do it, with built-in PostGIS function, that would be better.


texts: Formatting legend item and feature count text in ArcGIS Pro?

texts:
In ArcGIS Pro you can turn on the option "Show feature counts" in Format legend item -> Feature Display Options to show the number of features for each legend item. When turned on however the number is put right after the legend item without any spaces, like this: motorway245.

Instead I'd like either a space between the two, or better, put the feature count in parentheses like this:

  motorway (245).

Any way to do this in ArcGIS pro?


texts: Load multi CSV files from local disc to Postgres

texts: I want to load a lot of CSV files from a local disc in an already created postgres database. Which is the easiest way to do that? By using SQL or Java? I suppose that I need a loop for doing that, but how to implement loop in SQL?


texts: How to load OSM data to RDS instance (PostgreSQL) on AWS

texts:
I am trying to load the OSM data to PostgreSQL (RDS on AWS). I could not find any information on loading the OSM data to cloud. I tried the steps outlined in many website and osm2pgsql but nothing seems to work.

Any pointers?


texts: Loading GPS information into map and track waypoints?

texts:
I am using QGIS 1.8 in Ubuntu 12.04. I am working with Robot Operating System (ROS) and QGIS simultaneously. My ROS system is connected to LIDAR (sensors) that will publish GPS message so, I could subscribe and print latitude and longitude values continuously in terminal using C++ program.

My next task is to take this latitude and longitude values from terminal and plot it into QGIS map. Then, I want to track waypoints. Can anyone help me to do so?

I don't have any idea as I am new to QGIS. Note that everything should be done without depending to internet connection.


texts: ST_ApproximateMedialAxis returns multilinestring instead of single linestring

texts:
ST_ApproximateMedialAxis on POLYGON returns MULTILINESTRING. Shouldn't it be just single LINESTRING?

We use Postgres 11 + PostGIS 2.5.0 (Geos 3.7.0), SFCGAL 1.3.6 (CGAL 4.13), pgrouting 2.6.1.

Please see attached image with the visualization of the input polygon (blue) and output (red).