texts: Change ArcSDE data source for mxds in specific folder using ArcPy?

texts:
I've searched all the forums and help and have made progess but recently got an error that has thrown me for a loop - also some mxds are not being changed at all! What I'd like my code to do:
Iterate through mxds in a specific folder, change the ArcSDE data source in each layer within an mxd and change it to the new ArcSDE source (we just upgraded our server). Then I'd like to either save over that mxd, or save to a new folder (whatever works!).

Here's the code:

import arcpy
import os

folderPath = "G:\GIS\Services\Test"
for fileName in os.listdir (folderPath):
    fullPath = os.path.join(folderPath, fileName)
    if os.path.isfile(fullPath):
        basename, extension = os.path.splitext(fullPath)
    if extension.lower() == ".mxd":
        mxd = arcpy.mapping.MapDocument(fullPath)
        print "MXD: " + fileName
        arcpy.env.workspace = fullPath
        mxd.replaceWorkspaces("", "NONE", r"Database Connections\Connection to gisserver.sde","SDE_WORKSPACE")

print "successfully changed data sources"
mxd.save()
del mxd

This worked sucessfully when tested with one mxd in a folder, so i thought it would apply to a folder with more mxds, however
The error I received while attempting to iterate through the folder:

  Traceback (most recent call last):
    File "C:/Users/lyee/Test2", line 10, in
      mxd = arcpy.mapping.MapDocument(fullPath)
    File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\arcobjects\mixins.py", line 608, in init
      assert (os.path.isfile(mxd) or (mxd.lower() == "current")), gp.getIDMessage(89004, "Invalid MXD filename")
  AssertionError: Invalid MXD filename.


texts:
I am a beginner with Geoserver. I have started reading the Boundless tutorial: introduction to Geoserver.

In the very first step, for installing the OpenGeo Suite and running the welcome page of Geoserver I have faced an error.

The error states:
404: Not found
The requested URL /geoserver was not found on this server

I received no errors during the installation phase.

when I try to run

http://localhost:8080/

I receive a logo of EnterpriseDB and some texts as follow:

  Apache - version 2.4.7  PHP - version 5.4.23  Server is up and running
  The default Apache context is www in the Apache installation folder

I've checked the instructions for windows installation from here:
http://suite.opengeo.org/docs/installation/windows/misc.html#installation-windows-misc

were it is stated that perhaps if the port used by Jetty web server (8080) is already used by another service, we can configure and change the port information. For this they mention to look for a file located at:
C:\Program Files\Boundless\OpenGeo\bin\jetty\start.ini

Where I don't actually find such a file. I can locate the bin folder in OpenGeo, but there is no "jetty" folder in "bin". I've tried stopping and starting the services, all performed with no error/message. I've tried re-installing OpenGeo Suite (even in different location than Program files path). Still have the same error when trying to load

http://localhost:8080/geoserver

Does anybody have suggestion to fix this?

I have installed OpenGeo Suite 4.0.2 on Windows Server 2012 R2 Standard.

Thanks


texts: Errors clipping a raster with a vector mask layer

texts:
I am running QGIS 3.4.14 (current stable version) on OSX Mojave 10.14.5.

I have a vector mask that I want to use to clip out a region of an image. Image was a jpeg originally but I translated it to a tiff in Q.

Now I'm getting the error "ERROR 1: The transformation is already "north up" or a transformation between pixel/line and georeferenced coordinates cannot be computed for /path/to/file/boston.tif. There is no affine transformation and no GCPs. Specify transformation option SRC_METHOD=NO_GEOTRANSFORM to bypass this check."

I can't change the GDAL console call directly in this version of Q, as far as I'm aware, but based on a previous question I can edit it within the python console using the following answer from a similar problem:

import subprocess

cmd = "gdalwarp -of GTiff -cutline /path/to/mask/mask_poly.shp -cl mask_poly -crop_to_cutline /path/to/raster/boston.tif /path/to/output/_boston_clip.tif SRC_METHOD=NO_GEOTRANSFORM"

subprocess.run ([x for x in cmd.split(" ") if x != ""])

I don't get any errors but no file seems to be created.
Does anyone know a way to resolve this error?

The above solution was posted at How to edit the GDAL/OGR console call in QGIS 3.0?


texts: Workflow for adding Pipe Systems to QGIS?

texts:
I want to layout a concept design for a sewer main in QGIS.  I have a variety of background information:

Aerial Imagery
Services from various sources
DEM from LIDAR
Lot Boundaries

I want to layout the system to get the following functionality, if possible:

Identify direction
Sum lots (or more particulary a Loading) moving in a direction
Where pipes join, add the Loadings
Profile the pipes to assess grades

I want to start off on the right foot, and seek any guidance, if possible.


texts: Why does my modulo expression return no results?

texts:
I have a big set of contour lines with 5 m and 10 m stepping from an ArcGIS File Geodatabase (wasn't a shapefile, as previously stated).

From time to time I need to modulo out the 5 m lines in the viewer. Given a column "contour" this should work (shouldn't it?):

"contour" % 10 = 0

However, it returns 0 lines with both, double or integer type. The column contains just values of xx0 and xx5.


texts: Applying cumulative usage to road sections

texts:
I would like to calculate the total 'weight' of goods which will travel
across each road section of a roading network.

Goods (from a nearby polygon) will arrive at the closest road section, and then travel along subsequent road sections to the destination. So, road sections nearest the destination will have multiple loads travelling over it which need to be added together. Example image is here.

Someone suggested sDNA may be able to do this. Any advice that this is the case? Or any alternative solutions? Have got Mapinfo 12 & QGIS 2.14 on Windows 10.


texts: QGIS modeler: select by attribute wrong results

texts:
I am new to QGIS modeler and trying to write a script in which certain attributes are selected and written to a shapefile. See the attached image for the script and the select by attributes box.

In the final shapefile there are still values <1 available.

What am I doing wrong.


texts: Using QGIS, I have a layer with 100 towns. I have another layer with 200 cycle routes, each with a different name. I want to create (automatically natch) a table that will help the people in each town, for example, get a list of all of the routes that pass within 1Km of their town centre.


texts: QGIS 2.14 Problem with Training Manual Exercise Data

texts:
The admin_boundaries/Western_Cape_UTM33S.shp file does not appear to have the relevant boundaries identified in the NAME_2 field (nor is there a NAME_2 field).

I have tried a few versions of the zip file where this is meant to be, but none have provided the correct result.

I am looking for a correct copy of the dmin_boundaries/Western_Cape_UTM33S.shp file that has all the relevant fields necessary to complete Chap 9.4.8 of the QGIS 2.14 Training manual?


texts: Writing SAGA_CMD command line formatting

texts:
I am trying to use SAGA_cmd to write a script that does the following:
The
united 1) Reads a series TIFF files I have in the work folder;
2) Runs a segmentation on the TIFF files on each respective file, and;
3) Outputs the corresponding shapefiles to a folder.

I have developed the following code based on examples from tutorials and searches online.

set PATH=%PATH%;C:\Users\PC\saga-4.1.0_x64

SET WORK=C:\Users\PC\Documents\MAP DATA\AERIAL PHOTOS\test

FOR %%i IN ('dir /b %WORK%\*.tif') DO (

saga_cmd io_grid_image  "Import Image (bmp, jpg, png, tif, gif, pnm, xpm)" ^

-OUT_GRID = %WORK%\%%~.sgrd ^
-OUT_RED="Band_1" ^
-OUT_GREEN="Band_2" ^
-OUT_BLUE="Band_3" ^
-FILE= %WORK%\%%i ^
-METHOD=2 ^

REM Tool: Object Based Image Segmentation

saga_cmd imagery obia ^
-FEATURES= %WORK%\%%~ni_seg.sgrd ^
-NORMALIZE=1 ^
-OBJECTS=%WORK%\%%~ni.sgrd ^
-SEEDS_BAND_WIDTH=500 ^
-MAJORITY_RADIUS=500 ^
-POSTPROCESSING=1 ^
-NCLUSTER=100 ^
 )

However, I get the following error:

  -OUT_GRID is not recognized as an internal or external command, operable program or batch file."

I would like to find the source of this error or figure out how to rectify it.

Also, is it possible to use the tool chains in SAGA to automatically input multiple files, i.e. batch process.


texts: Matching multiple properties in mapbox gl js filter

texts:
I am trying to write a filter that will match on values from several properties of a layer.

For example, in my hypothetical layer of breweries, I'd like to match those breweries that have a state name of Utah, Texas or Florida and a brewery type of Irish or American.

I can filter on state like this

var stateFilter = ['match', ['get', 'stateNam'], ['Utah','Texas','Florida'], true, false]
map.setFilter('breweriesLayer',stateFilter)

Or on brewery type like this

var typeFilter = ['match', ['get', 'breweryType'], ['Irish','American'], true, false]
map.setFilter('breweriesLayer',typeFilter)

How can I combine the two examples above into one filter? I looked at using expressions and concatenation of fields but in my actual use case, I have several fields with 100s of possible values, making the expressions cumbersome.


texts: How to make a frame that extends to next page automatically keep margins in QGIS print composer?

texts:
I am using an HTML frame component in the print composer, which displays a table.

The composer is controlled by Atlas, meaning I cannot know before-hand what the maximum height of the table will be.

I have set the HTML frame->Item properties->Frames->Resize mode: "Extend to next page".

This produces the following result:

If I set the HTML frame to "Repeat until finished", then this happens (because on the first page, the table does not start from the top, which is as it should):

I know that I can move the frame when set to "Extend to next page", but my placement is lost after I navigate to the next Atlas item.

Any (simple) solutions? I don't mind solutions that use HTML/CSS/Python, but I don't want to over-extend like creating a new composer plugin.

I am using QGIS 2.18 for Windows.

Edit: this is what I want to achieve, but automatically for every Atlas item.


texts: How to make a movie from a ascii grid files?

texts:
Lets say I have several ascii grid files for each time step for a particular location. I would like to spit out the image for each of these ascii grid files and legend on the side bar. I also would like to put the area boundary (County or state) on the top of every image. After that I would like to make a movie from all of these images. How to procede this task in python or R?

NCOLS xxx
NROWS xxx
XLLCENTER xxx | XLLCORNER xxx
YLLCENTER xxx | YLLCORNER xxx
CELLSIZE xxx
NODATA_VALUE xxx
row 1
row 2
...
row n


texts: Openlayers: Bind Text with feature (Outside Map in a Div)

texts:
I'm using OpenLayers to show routes on a map. These routes are loaded from JSON and I'm using a Vector Layer to get it onto the map - works great.

Now I want to Display all features in a div outside Map. and when user hovers on it, feature should highlight on map and on click only selected route should be displayed on Map and other features will be hidden. (Just like Google Maps route Information).

any guidance to archive with openlayers would be great.


texts:
I am able to attach a raster by using python console using the command shown below.

qgis.utils.iface.addRasterLayer('D:/Work/dt0017810q.tif')

But, when the same image/raster path is read from a text file using a customized plugin (which I developed), the addRasterLayer method/function throws an error message

  Invalid Layer: GDAL provider Cannot open GDAL dataset
  D:/Work/dt0017810q.tif : `D:/Work/dt0017810q.tif ' does not exist in
  the file system, and is not recognized as a supported dataset name.
  Raster layer Provider is not valid (provider: gdal, URI:
  D:/Work/dt0017810q.tif

How to fix this?


texts: How to share styles between layers in QGIS

texts:
Is it possible to share one style between different layers in QGIS? Now if I apply the same style from *.qml or use the same style from Style Manager for different layers then in *.qgs project file each layer contains full copy of the same symbology description. In this case not possible to discriminate layers which use the same style from others. Maybe possible to set name for used style?

I don't want to apply qml to each layer manually (I know about MultuQml plugin) but I want to change style in one place and apply modified style to appropriate layers within project automatically.

But it looks like style descriptions within qgs file doesn't contains any unique identifier which I can use for getting layers with the same styles.


texts: Loading GeoDataFrame as QGIS vector layer without exporting to shapefile

texts: I'm using Python console in QGIS to manipulate geospatial data using geopandas. I want to load the output (GeoDataFrame) to the canvas as vector layer directly without exporting it to a file first. Is there any way to do that?


texts: Is there a Service to get only nodes from OSM?

texts:
Assuming one builds a simple websearch and wants to display POIs as single markers based on the data in Openstreetmap. It is very easy to query this data with overpass when one is searching for nodes.

It is also possible though that the data is attached to ways/areas and not nodes. In that case overpass returns all the nodes and tells you which nodes make up the areas. This makes handling the response more difficult in a library like leaflet because one needs to handle those possibilities (node/area) differently. What would be sufficient for my example would just be something like the centroid of the area (read: a single node per area) though.

Is there a way to query for this in overpass or a similar service?


texts:
i want to label a point layer with those values exceeding a set of variables

attribute table as follows

'loc field'(text),'a'(float),'b'(float),'c'(float)

variables as follows

vara = 5, varb = 3, varc=1

basically i want to be able to label 'a' > vara, 'b' > varb, 'c' > varc on a multi-line label, needs to label if any are true not just all three
e.g

Loc: F23
a: 6

('b' was 2 so not labelled)

c: 1.5

If none are true then loc not labelled at all

I am thinking this will be best achieved using the expression based label with a python function but don't know how to go about it, as i haven't found any documentation that deals directly with this. Could someone point me in the right direction on how to write a function that takes in each field to be queried and returns the multi-line label.


texts:
I am running the below query and try to identify the end point of a line with gid 338 on the polygon's boundary with gid 1456 but got some error message:

SELECT public.st_contains((Select public.st_EndPoint(the_geom) from lines where gid=338),(select public.st_Boundary(the_geom) from polygons where gid=1456))

The error message:

> ERROR:  function _st_contains(public.geometry, public.geometry) does
> not exist LINE 1: SELECT $1 && $2 AND _ST_Contains($1,$2)
> HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
> QUERY:  SELECT $1 && $2 AND _ST_Contains($1,$2) CONTEXT:  SQL function
> "st_contains" during inlining

If I run

SELECT ST_Contains(ST_GeomFromText('LINESTRING(0 0, 5 5, 10 10)'),ST_GeomFromText('point(3 3)'));

It will return "t" as the correct value.


texts: Creating reference library for Python scripts?

texts:
We run a few scripts at my office in Python that automate some of our map making processes, but we're trying to consolidate everything as much as possible, in doing so we wanted to create a reference library that a script can be directed to for a specific variable.

For instance, one of our scripts pulls latitudes and longitudes from a CSV and maps them, however, the headings often change and can be anything from "Latitude" to "EST - LAT - SITE" depending on the type of report used.

Currently we're defining these in each individual script as:

LAT = ['Lat', 'lat', 'LAT', 'Latitude', 'latitude', 'LATITUDE'] (I've left some out because it's sensitive data)

Is there any way to define all of our variable that are frequently used (roughly 60) and point the script towards the file containing the definitions as opposed to writing them out every time?


texts: Using Calculate Field tool to make empty field be populated with adjacent field's data?

texts:
I have about 80 species of birds with at least about 100,000 records each. I used the iterator tool to create a field named [Count] for each species, but now need the empty field to be populated with the field that is next to it. The issue is the adjacent field is named after the species so I can't just select the field in the fields option of the calculator. If I went with that option, I would have to go through each species and have the empty field be equal to the species field. I just do not want to do this 80 times.

In the image, [ARTE] is the species code.

To clarify, I'm using ModelBuilder and have a iterator to go through and run several tools for me. I want to have it go through all of the species' attribute tables and populate the [Count] field with the field that is next to me. I will have more tools that are based on the [Count] field and do not think I can have the iterator look for 80 different field names. Just wanted to simplify it by having them all have the same field name.


texts: Creating a plugin that presents a list of projects as buttons, and opens one when pressed?

texts:
I'm pretty new to creating plugins, and python. I've created a plugin called open_projects that has 10 buttons, and I'd like each button to open up a project when its pressed. The plugin works when opened in QGIS, but I'm not sure how to apply the python logic to make the buttons open a project. So far I've tried this (unsuccessfully):

Add QPushButton to the list of imports in open_projects.py:

from PyQt4.QtCore import QSettings, QTranslator, qVersion, QCoreApplication
from PyQt4.QtGui import QAction, QIcon, QPushButton

Add a new method:

def PushButton1(self):
    from qgis.core import QgsProject
    from PyQt4.QtCore import QFileInfo

    project = QgsProject.instance()
    print project.filename

   'c:\project1.qgs'

I know I'm probably way off!


texts:
I have QGIS 2.18.
I have the ground truth of land type for France. That is a paletted raster (i think.. i'm new and maybe it is not the correct word)

I loaded a style.qml file for this raster and I get this:

0 : no data
1 : urban
2: Roads
...
21 : water

(all these values have an associate color on the raster visualisation ofc)

Based on that, can I split my raster into 21 different rasters, each one representing a single mask?

(And then merge them into one TIFF file and use it as the ground truth for a deep segmentation algorithm)

EDIT:
I found a basic solution: I save my ground truth raster and I exclude all the values excepted the value I care about (e.g 17: trees). So I have to do it manually for my 21 classes.


texts: Deleting all but one feature from a set of features with the same ID, keeping one with largest area?

texts:
I have a large polygon layer in which most of the polygons have a unique name in a text field.

Of the hundreds that are not unique, there will be 2-4 polygons with the same name but different geometries.

I need to keep one of those polygons in each set of duplicates, the one with the largest area. I'll need to delete the rest.

Since the geometries are different I am guessing I cannot use ArcGIS' built-in duplicate finder and will need an SQL statement to do what I need.

How could I do this when I am far from proficient with SQL?


texts:
I am in the need to extract metadata in XML format from a gml file
following the standard ISO 19115
Can anyone suggest to me how to do that
Is there any open source for the same


texts: Why does new feature created not snap to existing feature vertices in ArcGIS 10?

texts:
I have created a polygon feature earlier then I wanted to create points on the polygon vertices but it won't snap on top of the vertex.

I wanted to know the reason why it does not snap and is there any ways to convert the vertices into points instead of manually doing it?

Thanks


texts: Cannot select a feature using ArcGIS Pro 2

texts:
I have a lab full of students who are trying to work through and activity using ArcGIS Pro 2.0.1.  Students are building a polygon feature class from the same LiDAR point cloud.  I cannot see any difference in the resulting features.

When some students try to modify features using the modify features tools to split polygons and edit vertices.  Some of them are unable to select the features to modify.

What could be some other possible troubleshooting steps?


texts: Reducing number of XY points within distance of one another using Integrate tool in ArcGIS for Desktop?

texts:
I have XY data (lat/lon) that I'm importing into ArcMap.  I need to reduce the data to eliminate points that are within a certain distance of one another.  For example, if two points are less than 1km apart, I want to only retain one.

I thought this could be done with Integrate, which did allow my to successfully collapse all points within 1km to single points on the map, but all the original points are still in the underlying attribute table.  Is there a way to create a new attribute table or shapefile with just these "collapsed" points that I see on the map?  If there is a better tool for this, I'd be happy to know but I haven't been able to find anything else nor any tips on how to extract these new points after using the Integrate tool.


texts: Viewshed Analysis adjust for treetop/building roof classifying as visible

texts:
I need to depict the areas that a landfill will be visible within a 3-mile radius at the current height.

After pouring over the ARC Visibility toolset page, my thought is that the Viewshed tool is the best way to address this. For the input raster data I used an STRM raster which includes vegetation and building heights and added it to a land surface DEM to get an elevation/vegetation & building hybrid raster. For the input line observer feature I used a line feature class outlining the current footprint of the landfill. Seems simple enough. After running the tool, it looks pretty good.

Here is my concern. My understanding is that all the areas that are visible from the landfill looking out get classified as visible. But the goal here is really the opposite. Most of the time this detail doesn’t seem to matter. I “field checked” some points through google earth streetview and it seemed to match up well. The areas I noticed an issue is where there is very tall tree cover. These locations are being classified as visible, I think because the tree tops are visible from the landfill. But for this analysis, when looking from land surface (where a person would be looking from) those trees actually obscure the view. Is this a valid concern and if so, how could this be adressed?

This is my first time using any 3D analysis tools.


texts: How to get partial polyline from stream trace?

texts: I am creating SOE to do stream trace. That works fine. The geometric network only have NHD flowline. The problem is that tracing result return whole flow line. I am wondering if the result only return partial flowline stating from the input point(s) and stop at the ending point or end of flowline.


texts:
I was wondering if anyone knew the preferred upload file type is for CartoDB.I upload zipped .shp files for polygons, and sometimes .csv file for point data. I noticed that when I uploaded a zipped .shp file it hit the 50mb account limit even though the file only ended up being 9mb in cartodb when I upgraded accounts.

Is this becasue it is duplicating the table during processing? Is there a preferred file type for cartoDB? GeoJSON?

thanks,


texts:
In a win form I am getting location(latitude and longitude) by serial port and want to show this location in map but in offline mode. What is the best way to do this?

I have a device which is installed in vehicle and It sent some data to receiver at xxxK bytes/second out the serial port. And in this data I have lots of information including Latitude and Longitude. I want show that vehicle in map(google map, bing map...).


texts: Generating floodplain generation given river section polylines, flood level elevation points and DEM of land surface?

texts:
I am looking to generate flood plain polygons to represent 20 and 100 year flood zones, in the most accurate and efficient way possible, given the following datasets:

River cross section polylines
River flow polylines (center lines between opposing shorelines)
20 year and 100 year elevation values for the vertices of each cross section
A digital elevation model (raster with an elevation value for each pixel) of the land surface

Here is my proposed methodology so far:

Form polygons delimiting each section, the river center line and inland areas well beyond the flood plain
For each polygon formed in the previous step, extract the intersecting raster surface (Extract by Mask)
Isolate the pixels of the DEM that are less than or equal to the flood elevation (20 and 100 year) value for the section using the Reclassify tool
Perform a raster (reclassified raster from previous step) to vector (polygons) to form floodplains between each section.
Merge the polygons together to form a continuous floodplain

I am looking for insight and suggestions to produce the most accurate results possible given the available data.

I have access to ArcGIS and the Spatial Analyst and 3D Analyst extensions.


texts: Installing QGIS using software distribution?

texts:
In our company we use QGIS 3.4.8 (LTR). To install the same version for each user in a short time we use the rollout software, Baramundi.

It works for the most installations, but for one installation we get this error message:

  The job [QGIS 3.4.8 INST] was completed with error: the installation
  of [QGIS Development Team QGIS 3.4.8] failed: the execution of
  baramundi deploy scripts failed: the returned returncode [#2] is not
  valid (step: extern proces
  [C:_baradir\depot\Q-GIS_3_4_8_LTR\source\QGIS-OSGeo4W-3.4.8-1-Setup-x86_64.exe
  /S] start, row 41)

Does anyone know this error and know what we have to do?


texts: UnsatisfiedLinkError caused by org.gdal.ogr.ogrJNI.GetDriverCount()

texts:
I am developing in Java on Windows 7 with Eclipse (Luna).

I am using gdal for some ogr processes and running the application from eclipse is fine, but running from command line on the same machine is running into problems.

and I get the following:

Caused by: java.lang.UnsatisfiedLinkError: org.gdal.ogr.ogrJNI.GetDriverCount()I
    at org.gdal.ogr.ogrJNI.GetDriverCount(Native Method)
    at org.gdal.ogr.ogr.GetDriverCount(ogr.java:170)

I've added all of the directories under gdal that contain dlls and jars to both the CLASSPATH and PATH environmental.

I thought it might be the libraries, but I am using the deployment location in the paths, which works in eclipse.

In the eclipse project's .classpath file I noticed that the gdal reference has an attribute called CLASSPATH_ATTR_LIBRARY_PATH_ENTRY, this links to the gdal\dll directory, but I have already included that in the paths:

<classpathentry exported="true" kind="lib" path="dependencies/gdal/bin/gdal/java/gdal.jar">
    <attributes>
        <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="dependencies/gdal/dll"/>
    </attributes>
</classpathentry>

This is the only difference I can see. How do you replicate this on a windows machine or is that handled by the CLASSPATH and PATH?

Do I need to reference the individual dlls? I have tried the 4 that normally go with gdal.jar, but that doesnt change the error that I am getting.


texts: How to remove spikes in Polygons with PostGIS

texts:
I'm trying to validate the topology of a shapefile.
I managed to repair cases of overlap and gaps, but i can't resolve cases of spikes. The image shows one example of this situation.

I used the comand:

SELECT geom,
ST_Buffer(  ST_Buffer(  ST_Buffer(geom,0.00001, 'join=mitre'),-0.00002,
'join=mitre'),0.00001, 'join=mitre') AS geom_spike_removed
FROM repaired_polygons;

it works fine to remove the spikes, but changes the original form of the polygon. Comparing area and perimeter before and after, we can see that the perimeter changes because there is no more spikes, and the difference on area it's not absurd, but anyway it changes a little the geometry of the polygons, causing new cases of small overlaps and small gaps.

How can i remove this spikes without changing the original geometry of the polygon?
Any suggestions?


texts:
I am trying to add a 3D building layer with preferably as a tile (in GeoServer) to my Leaflet map. I have difficulty to find a tutorial for that. If you know a good link it would be great. I am open to any third party library like OSMBuilding.

I have found some questions like:
     https://stackoverflow.com/questions/41560237/how-to-get-the-vector-tile-by-geoserver

and

3D Map Visualization in Geoserver

but nothing that could help me to figure this out.


texts: Summarising all the (NDVI) values pixelwise for a masked polygon

texts:
A .tif image has been created using the NDVI formula in QGIS. The resulting image shows a region, with varying grades of NDVI values over the image. A .shp file has then been created for an area of interest, then the corresponding _mask file, using rasterio. I've been unable to identify the necessary steps in Python to firstly, remove all values on the edge (i.e. overlapping) the polygon's edge and to remove all "dead" values (dummy, None, whatever), then secondly, I need to look at every pixel in this _mask file and identify the NDVI value associated with it. Then sum all values and average it. My code so far:

def __init__(self):
    self.shape_file = r"path_1"
    self.raster_file = r"path_2"
    self.mask_file = r"path_3"

    out_image, no_data = self.create_mask_image()
    self.summarise_raster_values(out_image, no_data)

def create_mask_image(self):
    with fiona.open(self.shape_file, "r") as shapefile:
        features = [feature["geometry"] for feature in shapefile]

    # Extract raster values values within the polygon
    with rasterio.open(self.raster_file) as src:
        if src is None:
            print ("Raster file could not be opened")
            sys.exit(1)
        out_image, out_transform = rasterio.mask.mask(src, features, crop=True)
        out_meta = src.meta.copy()

        # BS test code
        x = (src.bounds.left + src.bounds.right) / 2.0
        y = (src.bounds.bottom + src.bounds.top) / 2.0
        for val in src.sample([(x, y)]):
            print (val)

    # No data values of the original raster (optional)
    no_data = src.nodata
    print (no_data)

    out_meta.update({"driver": "GTiff",
                     "height": out_image.shape[1],
                     "width": out_image.shape[2],
                     "transform": out_transform})
    with rasterio.open(self.mask_file, "w", **out_meta) as dest:
        dest.write(out_image)

    return out_image, no_data

def summarise_raster_values(self, out_image, no_data):
    # Extract the values of the masked array
    data = out_image.data[0]
    print(data)
    # Extract the row, columns of the valid values
    row, col = np.where(data != no_data)
    #elev = np.extract(data != no_data, data)

The problem is, how to make the calculations within my summarise_raster_values method. Any ideas how I can achieve this?

The output of print (data):

[[-3.4028235e+38 -3.4028235e+38 -3.4028235e+38 ... -3.4028235e+38
  -3.4028235e+38 -3.4028235e+38]
 [-3.4028235e+38 -3.4028235e+38 -3.4028235e+38 ... -3.4028235e+38
  -3.4028235e+38 -3.4028235e+38]
 [-3.4028235e+38 -3.4028235e+38 -3.4028235e+38 ... -3.4028235e+38
  -3.4028235e+38 -3.4028235e+38]
 ...

I was expecting NDVI values here, but as you can see the values are exceedingly large.


texts:
I am trying to take a set of points, use supercluster to create an index, and query that index for vector tiles. Things mostly work as expected, but when the tiles are loaded into Mapbox GL JS they appear to be the wrong size or incomplete:

I have tried adjusting the extent setting of supercluster with no success. Mapbox GL JS also throws a warning that the layer "clusters" does not follow v2 of the vector tile spec, but changing the code per this suggestion did not make a difference in the rendering.

You can find all the code demonstrating this behavior here


texts: Joining points to nearest line using pyQGIS?

texts:
I followed this suggestion to join points to nearest lines in QGIS. While most points get attached there are instances of points, often in close proximity to a line, that do not get connected (see figure).

Is this a numerical rounding issue?


texts: I have two columns in a nodes table, one column has the ground level of the node taken from the model and the other column has the ground level inferred from LiDAR. Is there a query that can be used to select records where one column is greater than the other by a certain value (eg 0.5m).


texts: I want to map layer selection as the example of cartodb (http://cartodb.github.io/cartodb.js/examples/layer_selector.html), the difference is that I want to choose a date in the layer selector and it work as a filter and show me one other column data. Anyone have a solution that can help me soon and I apologize for my bad English


texts: WriteRaster in a loop for several rasters while assigning unique band names

texts:
I have a series of raster stacks representing median and maximum composite images in a 35-year time series. Each stack has five bands: NDVI, NBR, brightness, greenness, wetness. I need to convert them from .grd to .tif on a band by band basis and label each band with the appropriate name and year (ex: Med_2001_NDVI).
In the past I've used this code to export stacks by band. It works well and assigns the correct band names, but can only process one raster at a time.
namesb<-c("NDVI_13med"," NBR_13med", "Bright_13med", "Green_13med", "Wet_13med")
for(i in seq_along(s13med)){writeRaster(s13med[[i]], file=namesb[i], format="GTiff")}

I would like to modify it to read every raster in the folder then writeRaster by layer with the correct names assigned. This is my preliminary code. I'm unsure how to name them appropriately.
a<-list.files(pattern="*.grd$")
b<-lapply(a, stack)
year<-substr(a, 1, 8)
bands<-c("NDVI","NBR","Brightness","Greenness", "Wetness")
for(i in seq_along(b)){writeRaster(b[[i]], file=(???), bylayer=T, format="GTiff")}

The final name for each band needs to be a combination of "year" and the appropriate band name from "bands". The name format doesn't need to exactly match my 2013 example. I just need to know the band name, the year, and whether it's a median or maximum composite image.


texts: calculating sinuosity of each road segment

texts:
I want to calculate the sinuocity of each road segment of a vector shapefile which contains roads. I have downloaded the python script from enter link description here

but I don't know what to do after that. I open the python console from Geoprocessing->Python and dragged the file into it but nothing occured. What should I do to run this script and how can I choose the roads file which I want to process?


texts: GeoServer WMS GetCapabilities AJAX response as JSON?

texts:
How can I get GeoServer WMS GetCapabilities request as JSON?

For example this is a WMS link: https://www.ngs.noaa.gov/GeoServer/NSDE/ows?service=WMS&request=GetCapabilities&

I am getting this request via AJAX call. But response is XML formatted like this:

<Format>text/xml</Format>

<GetCapabilities>
<Format>text/xml</Format>
<DCPType>
<HTTP>
<Get>
<OnlineResource xlink:type="simple" xlink:href="http://www.ngs.noaa.gov:80/GeoServer/NSDE/ows?SERVICE=WMS&"/>
</Get>
<Post>
<OnlineResource xlink:type="simple" xlink:href="http://www.ngs.noaa.gov:80/GeoServer/NSDE/ows?SERVICE=WMS&"/>
</Post>
</HTTP>
</DCPType>
</GetCapabilities>

I want to get this response as JSON format. Can I change format settings from GeoServer?


texts: How to save time without date in shapefile's DATE filed using ArcGIS 10.2?

texts:
I am trying to save a time in a shapefile's DATE field (without a date, because shapefile can only store something one simultaneously - date or time).

I use field calculator with PYTHON parser. I am typing a string '12:01:51'. After pushing OK button it seems all right - no error, but the value turns to 0:00:00.

What do i do wrong?


texts:
I have a 6000 USA addresses in form: Address, City, State and ZIP . I want to geocode these addresses. I have tried to use QGIS MMQGIS plugin with geocode tool using Google services, but I have got the message: "Exceeded daily limit".

Is there any tool or free geocoder which is good for USA addresses?


texts: Why are only some of my map lines exporting clearly?

texts:
I've got a sequence of large (E sheet) maps that are exported to PDF. The problem is that my roads layer (gray in the image below) is sometimes getting distorted on output -- but only in some places.

In the below snippet, the :( indicates a section of road that's got a distortion (almost "jumpy" line), while the :) points to the same layer with the lines printed cleanly.

What's even weirder, the other line layer (blue/yellow lines) is always clearly represented. That implies to me this is some sort of symbology difference between the two layers, rather than a compression or resolution problem, but I honestly don't know what it could be -- they're both plain cartographic line symbols, just one in color and the other gray.

I tried unchecking the Format options in the Export Map dialog (Compress Vector Graphics, Convert Marker Symbols to Polygons, Embed All Document Fonts) and none had any effect.

What do I need to tweak in either the symbology or the export settings in order to get the line vectors to show cleanly?


texts: CRS not lining up with base maps from OSM plugin in QGIS

texts:
I have QGIS 2.18.
I have a selection of routes that I have mapped. Shapefiles of these routes are in WGS84:4326
When I want to map them with a base map of google maps or OSM, it only works when the basemap and the project is in its default WGS84:3857(OTF) projection. But if I change it to 4326 (OTF), the map shifts. Depending upon zoom level, it shifts to different places.
At 3857 :

At 4326:

What should I do?


texts:
Question:
Is there an out of the box Flexviewer set up for a Flex Mobile Project?

Background:
I could just create a Flex Mobile AIR Project from one the samples that ESRI supplies, but that would require a bit more work to recreate an app that is based upon ESRI's ArcGIS Viewer.

Asked Here Initially:
http://forums.arcgis.com/threads/33387-Flex-Viewer-for-Mobile-Applications?p=215235#post215235

Flexviewer Github Page:
https://github.com/ArcGIS/ArcGISViewerForFlex


texts: Displaying CartoDB visualization on mobile with "Where Am I" button

texts:
I want to display a CartoDb visualization on my mobile device, but also have an icon that shows where the device is and centers/zooms to it when I press it.  I'm trying to find nearby features.

If this isn't available via a web page, then perhaps via a PhoneGap plugin?


texts: Creating centerline of polygon using PostGIS?

texts:
I am aware of Finding centrelines from polygons in QGIS? but I am looking for another Open Source GIS way to do this.

Is there a possibility to create centerlines in PostGIS?

I have this shapefile (see below) which contains different zones. I need a centerline in each zone - it may not be one line, it can be more (for example in brown zone).

In ArcGIS I can separate each zone as a new shapefile and then use ET Geowizard to create that lines.


texts: What program(s) can I use to edit a boundary?

texts:
So i've got some shapefiles imported into my Sql Server 2008 Database. A number of these boundaries need to get 'cleaned up'. As such I need to do the following :-

Export them from Sql Server 2008. sigh
Import them as a layer into some editing program
Overlay this layer, over a world maps .. like OpenStreet Maps, etc.
Edit the polygon(s). Eg. cut one boundary into two .. while following a road that defines the boundary between the two.
Export these new cleaned boundaries to files.
Import these boundaries back into Sql Server 2008.

I have absolutely no idea how to do this.
Are the programs out there that can do this?
The only thing I found was using ogr2ogr to export my boundary (from Sql Server 2008) to .shp/.shx/..dbf files.
If we need to purchase a product, then (assuming it's not a HUGE $$$ amount) we can do that do.
If i need to export the data into another type of database, I can setup a another database.
I've spent all day trying to play with MapWindow 6 and QGIS but I'm having no luck at all :(
Can anyone make any suggestions, please?
Update

Maybe you can describe exactly what does not work for you if you try
to achieve your goals in QGIS

Sure :)
Firstly, I can add an overlay of the shape file. TICK.
Next i can't get a world map to overlay. No idea how to do that :( It's like I would love google maps to be underneath my first layer.
Lastly, I have no idea how to cut the shape into two pieces. (and of course, I would be following a road or roads, to define the boundary-split.
This is the type of clean ups I need.
Oh.. I would also love to CREATE a new boundary, by just dropping lat/long points over a map and the closing the poly.
All these things need to be exported to shape files or WKT (that would be better :P) so i can import it back into Sql Server 2008.


texts:
I'm struggling to get my vector layer working. The wfs works as I have tested it by creating a wfs layer and adding it to the map, now I'm trying to display a vector layer with the results of a search but nothing is showing up. The results of the search appear in the gridpanel but not in the vector layer. Here is the code for the search:

var features = [];
var wfs = new OpenLayers.Layer.Vector("Search");
var select = new GeoExt.grid.FeatureSelectionModel();

var protocol = new OpenLayers.Protocol.WFS({
    url:  "http://localhost:8080/geoserver/wfs",
featureType: "location_points",
featureNS: "http://www.openplans.org/topp",
geometryName: "the_geom"
});

formPanel = new GeoExt.form.FormPanel({
title: "Species Search",
height: 150,
region: "north",
protocol: protocol,
items: [{
    xtype: "textfield",
    width: 200,
    name: "scientific__like",
    fieldLabel: "name",
    allowBlank: false,
    minLength: 4
}],
listeners: {
    actioncomplete: function(form, action) {
        features = action.response.features;
        store.loadData(features);
        vm=map.getLayersByName("Search");
        if(vm.length===0){
            wfs = new OpenLayers.Layer.Vector("Search");
            map.addLayers(wfs);
            store.bind(wfs);
            select.bind(wfs);
        }
    }
},
buttons: [{text: 'search',
    handler: function(){
        formPanel.search();
    }
}],
keys: [{ key: [Ext.EventObject.ENTER],
    handler: function() {
        formPanel.search();
    }
}]
});

Firebug shows the following error:

layer.map is null

layer.map.addControl(selectControl); (FeatureSelectionModel.js (line 174))

I followed an example on line (http://ian01.geog.psu.edu/geoserver_docs/apps/gaz/index.html). I appologise if someone has already asked this, I've looked everywhere for the answer and found nothing, I'm quite new to this, so any help would be very much appreciated.

Thanks

Will


texts: Want to create a parallel line with my curve line

texts:
I have a curve. I want to make a new curve which is parallel with the original curve.

I want to take them away from the original place 5 meter away while keeping its orientation.


texts: I've created a relationship class in Desktop and published to ArcGIS Online as a service.  The relationship still exists between my table and feature service but when I try to add one of the fields from the related table  to my POP-UPS all I get is the count showing how many rows were returned in the related table.  What I'd like is a ordered list showing the actual values, not the count.  The cardinality of my join is many rows in the table to one value in the feature service (many:one).  I find it odd that ESRI would include this functionality in their popups if all you could get is the count though I've read where a few others had the same issue.  Perhaps Arcade expressions provide the answer.  Does anybody know if it's possible to show the values from related tables in ArcGIS Online Pop-Ups?


texts: How can I export a set of images from Google Earth Engine?

texts:
I'm trying to export images of a bunch of latitude and longitude points, but I keep getting errors. For example, I am trying to export an image of this single point in this fusion table, but this is what happens:

3 instances of the image I want to export pop up in the Tasks.
The first gives error "Unknown variable references: [_MAPPING_VAR_0_0]."
The second and third give error "Failed to decode JSON.
Error: Field 'value' of object '{"type":"ArgumentRef","value":null}' is missing or null.
Object: {"type":"ArgumentRef","value":null}."

Below is my code.

// Import points from fusion table into feature collection
var fc = ee.FeatureCollection('ft:1i3_jdpBy0lorCbZ7eNVnsGL3NaZWyDGRVCUrmKGl');
print(fc);

var pairImage = function(feature) {
  var point = ee.Geometry.Point([feature.get('lat'), feature.get('lon')]);

  // USGS Landsat 8 TOA Reflectance (Orthorectified) Set
  var l8 = ee.ImageCollection('LANDSAT/LC8_L1T_TOA');

  // Only get images that intersect lat/lon point
  var spatialFiltered = l8.filterBounds(point);

  // Only get images for year of 2016
  var temporalFiltered = spatialFiltered.filterDate('2016-01-01', '2016-12-31');

  // This will sort from least to most cloudy.
  var sorted = temporalFiltered.sort('CLOUD_COVER');

  // Get the first (least cloudy) image.
  var scene = ee.Image(sorted.first()).select(['B4', 'B3', 'B2']);

  var visualization = scene.visualize({
    bands: ['B4', 'B3', 'B2'],
    max: 0.3
  });
  return visualization;
}

// Get all images of points
var images = fc.map(pairImage);

var saveImages = function(image) {
  Export.image.toDrive({
    image: image,
    description: 'true-color-composite',
    scale: 13
  });
  return null;
}

// Export the images
images.map(saveImages);


texts: How to pass a line feature as a GPFeatureRecordSetLayer parameter to a geoprocessing service using the JSAPI?

texts:
Can some one tell me whats wrong here.
The geoprocessing job always fails and i don't see much info in firebug to debug. This is my code to generate the feature set.

var inputFeature = {
    displayFieldName: "",
    hasM: true,
    hasZ: true,
    geometryType: "esriGeometryPolyline",
    spatialReference: {
        wkid: 3460,
        latestWkid: 3460
    },
    fields: [
    {
        name: "OBJECTID",
        type: "esriFieldTypeOID",
        alias: "OBJECTID"
    },
    {
        name: "RoadID",
        type: "esriFieldTypeString",
        alias: "RoadID",
        length: 10
    },
    {
        name: "Shape_Length",
        type: "esriFieldTypeDouble",
        alias: "Shape_Length"
    }
    ],
    features: [{
        geometry: geom,//poly line geometry returned from a query task
        attributes: { OBJECTID: 1, RoadID: $('#RoadIdTextBox').val(), Shape_Length: 0.00 }
    }],
    exceededTransferLimit: false
}

var searchRadius = {
    distance: $('#SearchRadius').val() / 1,
    units: "esriMeters"
}

var IRIParams = { "Input_Route_Features": inputFeature, "Search_Radius": searchRadius };

console.log(dojo.toJson(inputFeature));
gp.submitJob(IRIParams);

gp.on("status-update", function (e) {
    console.log(e);
});`

This is the output when i console.log() inputFeature

{
        "displayFieldName": "",
        "hasM": true,
        "hasZ": true,
        "geometryType": "esriGeometryPolyline",
        "spatialReference": { "wkid": 3460, "latestWkid": 3460 },
        "fields": [{ "name": "OBJECTID", "type": "esriFieldTypeOID", "alias": "OBJECTID" },
            { "name": "RoadID", "type": "esriFieldTypeString", "alias": "RoadID", "length": 10 },
            { "name": "Shape_Length", "type": "esriFieldTypeDouble", "alias": "Shape_Length" }],
        "features": [{
            "geometry": {
                "type": "polyline", "paths": [[[1966832.8483635725, 3875011.726536308, 0, 1189], [1966841.088767071, 3875017.3918245276, 0, 1199]]],
                "_path": 0, "hasZ": true, "hasM": true, "spatialReference": { "wkid": 3460 }
            }, "attributes": { "OBJECTID": 1, "RoadID": "10239011", "Shape_Length": 0 }
        }],
        "exceededTransferLimit": false
    }

It even fails when i paste and run the output in the services directory interface.


texts: Isolate features within buffer of another feature

texts:
I have 2 shapes - one representing line features of pipes, another of roads. I would like to create a separate shapefile consisting only of the pipes that lie within 20m of the roads. Only the segments of the pipe that lie within the 20m buffer should be returned. This means that some features have to be split.

I have tried adding a buffer of 20m to the road and then running an intersect query with the pipes. The problem of using this approach is that the output presents a full feature (pipe) if a part of it touches the buffer - I need to isolate only the parts of the pipes that are within the 20m buffer.


texts: ArcGIS Server Geoprocessing service weirdly changing file path

texts:
I encountered a weird phenomenon on my ArcGIS Server 10.1.

I have a geoprocessing tool that exports a mxd file to an image file on my local directory, say "c://map/dir/export/image.png" It worked well. Then I published it as geoprocessing service on ArcGIS Server 10.1. When I ran it, it still worked but the image file was generated but stored as "export" in "c://map/". This file had no extension.

Additionally, "c://map/dir/export/" was set up as a virtual directory on the IIS so that it can be accessed through web browser whenever updated.

Any idea about a solution?

In my code, I have the following snippet.

prodWebServerGCPath = "C://arcgisserver/map/GC/GrasslandCuringVD"
arcpy.AddMessage("* prodWebServerGCPath: " + prodWebServerGCPath)

When run as geoprocessing, it strangely printed out as part of GP result:

 {
   "type": "esriJobMessageTypeInformative",
   "description": "* prodWebServerGCPath: ..\\grasslandcuringvd"
 }

I don't have any data stores set up in ArcGIServer Manager. It happened even if I removed the virtual directory from IIS.


texts: How to populate a feature table in a GeoPackage file using GDAL?

texts:
I want to use the binary version of GDAL to avoid programming in C or Java here. So I have created a SQL file and I want to run it using the following command :

ogrinfo.exe empty.gpkg -sql @my_sql_file.txt

I am about to populate some features in a sample table, lets name it "road".

Here is my question :

Do I have to create a BLOB out of a set of coordinates to be able to insert a polyline in my road table? If yes how should I do this?

I couldn't find any relevant document neither in GDAL nor in OGC website.

Here it is what I have got so far :

CREATE TABLE road (id int NOT NULL,name text(50),geom BLOB,PRIMARY KEY (id));
INSERT INTO gpkg_contents (table_name, identifier, data_type, srs_id) VALUES ( 'road', 'my_view', 'features', 4326);
INSERT INTO gpkg_geometry_columns (table_name, column_name, geometry_type_name, srs_id, z, m) values ('road', 'geom', 'POLYLINE', 4326, 0, 0);


texts:
I am trying to access a WFS from geoserver in QGIS, and when I load it, it comes in very strangely:

I can access it directly from the postgres database and it comes in fine. I'm wondering if there are settings to the geoserver layer I can adjust so that it comes in properly? WMS comes in ok, except when zoomed to full extent not all the features draw, in areas where there are a lot of polygons (it is a parcel layer with @ 170K records). When I zoom in on the WMS, the feature draw. But I'd really like to figure out what is going on with the WFS. I've also tried to load in feature for a limited extent with the same result.


texts: What is M-aware polyline in ArcGIS Desktop?

texts:
Can anybody explain the concept of M-aware geometry?

I want to construct the M-aware polyline by using xy values. Before doing this exercise I want to understand the concept of M-aware and work on it.


texts: Projecting points on line and calculating distance from line start

texts:
I have

a vector layer with a number of points which correspond to magnetic targets
axis retrieved from AutoCAD

The task is to project the points on the axis and then calculate the distance of each projected point from the start of the axis. Ideally, I would like the calculated distance to be on the same table as the points so I can know which point each distance refers to.

Moreover, it would be nice to know the perpendicular distance of each point from the reference axis. A picture of the above problem is also presented below.


texts: Sending attribute table of multiple vector files to excel in QGIS at once?

texts: I have three different vector files with some data. I want to save as Excel or CSV file. I can do it one by one, but I am wondering if I can do all three in one shot?


texts: Getting records from attributes table in Python console using PyQGIS

texts:
I have layer with 5 millions records. I would like to get 1 record from attributes table and show in Python console.
Is it possible?
This does not work:
> from qgis.core import QgsProject, QgsVectorLayer
>
>     path = r'C:/Users/ja/Inne/Desktop/POLSKA/PRG_PunktyAdresowe_POLSKA.shp'
>     lyr = QgsVectorLayer (path, 'PRG_PunktyAdresowe_POLSKA.shp', 'ogr')
>
>     for f in lyr.getFeatures():
>         print(f['ULIC_nazwa'])


texts: Is it possible to overlay a Geotiff in OSM?

texts: I've got a GeoTiff I'd like to overlay into OSM while editing in iD editor so I can extract features, but I don't see an option anywhere. Is this possible?


texts:
I am new to running scripts in ArcMap and am trying to run simple code to export data driven pages to images. I am trying to run the script below, but when I hit enter nothing happens (no message, error or otherwise, images are not exported - I can't tell if anything is happening at all):
... mxd = arcpy.mapping.MapDocument("CURRENT")
... for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
...   mxd.dataDrivenPages.currentPageID = pageNum
...   arcpy.mapping.ExportToPNG(mxd, r"C:\Temp\ParcelAtlas_Page" + str(pageNum) + ".png")
... del mxd

It's difficult to troubleshoot the code when I don't get any kind of output/feedback from the dialog. Having little to no experience running Python scripts I'm wondering if there is something simple I am missing or a setting I need to change, etc.


texts: ArcGIS Desktop not recognizing updates to xlsx?

texts:
I load an xlsx file into ArcGIS Dektop 10.6.1, and realize I didn't have headers in my xlsx so I need to go back and add those. I close everything since ArcGIS locks xlsx files down and won't allow editing. I update the xlsx in Excel and save my changes. Restart ArcGIS, new project and load the updated xlsx. In excel, I can see my new edits. In ArcGIS, its still showing me the old version of my file.

My workaround is to save the xlsx file with a new name, but that does not really suit my workflow.

Can I force ArcGIS Desktop to recognize changes to the original xlsx file?


texts:
I have three different layers loaded into QGIS. Two of the three are perfectly aligned, whilst the third is slightly off.

Layer 1: Raster - LIDAR data from here

Layer 2: Vector - Landscape feature from Ordinance Survey

Layer 3: Raster - Multispectral Image from Airbus (RGB channels)

All the layers have a CRS code of EPSG:27700, which is set in QGIS. However as you can see in the image below, there is still a slight misalignment:

The grayscale corresponds to a processed version of Layer 1, and the colour corresponds to Layer 3, unprocessed. The lines, Layer 2.

I am very new to QGIS and processing of this data in general. Could anyone please tell me if they know what could be causing this and more importantly how to resolve it?

I found a page on this site about manually translating Layers but this seems risky and very cumbersome, as any further processing could be erroneous if I am unable to perfectly line them up with my eye. And of course, if I wanted to do it to multiple files this wouldn't help. Does any one have any better suggestions?


texts:
I'm working with satellite date namely chlorophyll and sst. Each geophysical parameter generally has standard colours to represent them. I'm importing geotiffs into Qgis and I'm having difficulty finding the colours needed and a way of styling the raster data.

Is there a way to add colour maps when in the raster properties?

Can I show a colour bar in print composer or in the legent for these colours.

I found a way of changing each colour individually but I'm hoping to find a standard range of colours like the pseudocolour palette.

Any help is greatly appreciated.

Regards


texts: ArcMap - how to count polygons after intersection

texts:
I'm trying to count buildings that are in high risk in flooded areas. How can I see number of houses where flooded areas exist?

I extracted raster by mask, reclassified and converted raster to polygon that gave me water in shapefile. Then I created buffer to increase area of houses by 2 meters. Now I would like to have number of houses (buffers) that intersect with water, but unfortunately after using Intersect tool, I have overlapped areas shown as next ones.


texts:
I'm trying to set the Width of the lake's contours to zero or change the color to light blue, since the I dont want to see the black outline. The vector file is a Polygon (MultiPolygon) named vlayer2 and I have tried the following commands:
vlayer2.setStrokeWidth(0)
vlayer2.setStrokeColor([49,179,245])
vlayer2.setWidth(0)

But I always get the message:
''AttributeError: 'QgsVectorLayer' object has no attribute '....' ''


texts: Export each image from a collection in Google Earth Engine

texts:
I am trying to export each image in a filtered stack of Sentinel-1 images and cannot seem to get it right.

Think link suggests using imageCollection.map() and a custom function (such as a geometric clip).

// Create a geometry representing an export region.
var roi = ee.Geometry.Rectangle([-63.0, 9.2, -63.1, 9.3]);

// Load the Sentinel-1 ImageCollection.
var sentinel1 = ee.ImageCollection('COPERNICUS/S1_GRD');

// Filter by metadata properties.
var IW_H = sentinel1
  // Filter to get images with VV and VH dual polarization.
  .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
  .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH'))
  // Filter to get images collected in interferometric wide swath mode.
  .filter(ee.Filter.eq('instrumentMode', 'IW'))
  // Filter IWs to get High res.
  .filter(ee.Filter.eq('resolution', 'H'))
  // Filter IW-Highs to get 10m res
  .filter(ee.Filter.eq('resolution_meters', 10));

// Filter to get images from different look angles
var DescCollection = IW_H.filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING'));

var ClipFunc = function(iImage, geom) {
  var iClip = clip(iImage, geom);
  return(iClip);
};

imageCollection.map(ClipFunc(DescCollection, roi));


texts: A silly question but is there any way out of the box to run a query to select the top 10 highest records based on a specific field for the current extent of a map display? I'm using ArcGIS 10.2.2 for Desktop.


texts: How to create a PostGIS table with arc support compatible with QGIS?

texts:
In postgis database I have two tables - let's say 'polygons' (gid, the_geom,MultiPolygon,srid=2180) and 'lines' (gid, the_geom,MultLineString,srid=2180). I'd like to use "Add circular string tool" from qgis to create same arcs and save in those layers. From web and from qgis error message (Geometry type (MultiSurface) does not match column type (MultiPolygon); Geometry type (MultiCurve) does not match column type (MultiLineString)
I know that I should have tables in postgis with geometry type MultiSurface and MultiCurve.

How should I do that? Can I have that kind of geometry type added respectively to my existing tables ie. MultiSurface to 'polygons' and MultiCurve to 'lines'? If anyone can give working solutions in sql code?


texts: Import a shapefile with the needed CRS only if you are going to export it with that CRS?

texts:
In GeoPandas is there any need to read in a shapefile with its coordinate reference system or is it only the exporting that requires that a coordinate reference system.

shp1= gpd.read_file(i[1],encoding='iso8859_7',crs_wkt='2100')
shp1.to_file(out,encoding='iso8859_7',crs_wkt='2100')


texts:
I have created 3 print layouts in QGIS3. Now I am trying to get a list of all layouts in the LayoutManager with python. This is how I am trying to do it(this code is executed in the python console of QGIS3):

>>> from qgis.core import QgsLayoutManager
>>> layoutmanager = QgsLayoutManager()
>>> layoutmanager.layouts()
>>> []

What I get is an empty list. So what am I missing? Do I have to save the Layouts in a special way? For those who don't understand what I mean with layout, in QGIS3 Layout is the new Composer.


texts: Combining string and returned value in label of ArcMap?

texts:
Using ArcMap 10, I am trying to label features with the first character in from the field "label." I can get it to return the first character, but I want the label to be Div L, Div X, etc....

Here is my code:

    def FindLabel ( [label] ):
      L = [label] [:0]
      return L
      "Div " + L

How do I get that last line of code correctly in there?


texts: Reload ol.source.Cluster after moving slider

texts:
I try to refresh my layer with a CQL function, where the dateMin and dateMax are parameters from a slider. Because of cluster, I don't understand why the source is not refreshed. I work with openlayers 5. I've no console error with this code but it don't work :

var cqlFilter = 'date_debut BETWEEN 1000 AND 2000 OR date_fin BETWEEN 1000 AND 2000';
var urlTemplate = 'https://myServer/geoserver/mviewer/wfs?service=WFS&' +
'version=1.0.0&request=GetFeature&' +
'typeNames=mviewer:patrimoine&' +
'maxFeatures=150&' +
'CQL_FILTER=' + cqlFilter +
'&outputFormat=application/json&' +
'srsName=EPSG:4326';
var geoJSONFormat = new ol.format.GeoJSON();
var _vectorSource = new ol.source.Vector({
  format: new ol.format.GeoJSON(),
  url: urlTemplate
});

function changeDate(filter) {
  var dateMin = filter[0];
  var dateMax = filter[1];
  var cqlNewFilter = 'date_debut BETWEEN '+ dateMin + ' AND ' + dateMax + ' OR date_fin BETWEEN ' + dateMin + ' AND ' + dateMax + '';
  var urlTemplate = 'https://myServer/geoserver/mviewer/wfs?service=WFS&' +
  'version=1.0.0&request=GetFeature&' +
  'typeNames=mviewer:patrimoine&' +
  'maxFeatures=150&' +
  'CQL_FILTER=' + cqlNewFilter +
  '&outputFormat=application/json&' +
  'srsName=EPSG:4326';
  $.ajax({
    url: urlTemplate,
  }).done(function(data) {
    _layer.getSource().clear(true);
    var features = [];
    data.features.forEach( e => {
      var feature = new ol.Feature({
        id: e.id,
        properties : e.properties,
        geometry : new ol.geom.Point(e.geometry.coordinates)
      });
      features.push(feature);
    });
    _layer.getSource().addFeatures(features);
  });

}

var _cluster = new ol.source.Cluster({
    distance: 50,
    source: _vectorSource
});
var _layer = new ol.layer.Vector({
  source: _cluster,
  style: _patrimoineStyle
});


texts:
I have a point layer that I generated from a table with dresses using Geocode in the MMGIS plugin. In the attribute table I have several columns. I am interested in the column called "Factor". There I categorized each point by a factor (which is a name, and I have a total of 10).
Because a lot of points were overlapping on my map, I clustered them (to get a sense how much points I have in each region) but I want to display the factors in a pie chart to show in each cluster, what is the proportion of points with factor1, factor2, factor3, ...
How can I do this?
(Also, side note, but when I used the clustering method, I lost all the single points that were not clustered. I now have to have 2 layers, one for the clusters and another one underneath with all the points to also show the single points; is there a way to show the single points in the layer with the clusters?)


texts: I'm doing a plugin based on conda with 3rd party libraries. Is there a way to let users install all the dependencies at the same time when plugin is installing in QGis?


texts:
I am new to database sorry if this is basic.

I have selected point geometry from a geometry column in pgAdmin, however, I would like to know how to now copy the selected points to a new column?

This is my script used to select the POINT geometry

SELECT count(*) from public.test1  where GeometryType(geometry) = 'POINT'

so my update set might be something like

UPDATE test1 SET GeometryType(geometry) = 'POINT' = newcolumn;


texts: How to figure out the projection used in a map

texts:
I'd like to read in some data displayed in a map, but it's presented in a projection that it's totally unknown for me, so I have no idea how to get the CRS and transformations to georeference the images I can get. I'm referring to the following map of Russia in this gif image
I can live with an approximate solution, but currently and because of the weird angle of the image, I have absolutely no idea of what projection they use.
I don't know which tool to use to tackle this problem. I'm familiar with proj (with Python) and QGIS.
Using the comment by @Erik I have tried this projection which is pretty close (see image below).
Any idea how to tweak the parameters to improve the fit?
It’s perhaps worth to note that the meridians are not completely straight. This should discard some projections. However, I’m not sure which ones.


texts: Open a GDAL dataset with rasterio.open()

texts:
I am processing geotiff files with GDAL and rasterio.
Every process of my processing chain generates a file in output.
What I want is saving every file in memory instead of creating files in the disk. I know how to do that with GDAL using the "MEM" argument. However, how can I use the produced file (here 'dataset') in rasterio as rasterio.open needs a filename. Is there a way to convert 'dataset' into a string or something like that?

My code:

import os
from osgeo import gdal
import rasterio
import numpy as np

# path
path = 'file.tif'

# open with GDAL
file = gdal.Open(path)
band = raster.GetRasterBand(1)
array = band.ReadAsArray()
rotation = np.rot90(array)

# create memory file
x_pixels = array.shape[1]
y_pixels = array.shape[0]
driver = gdal.GetDriverByName("MEM")
dataset = driver.Create("", x_pixels, y_pixels, 1)
dataset.GetRasterBand(1).WriteArray(array)

# open the result with rasterio
with rasterio.open(dataset) as src:
    src_transform = src.transform
    src_crs = {'init': 'EPSG:3945'}
    dst_crs = {'init': 'EPSG:3945'}
    dst_transform, dst_width, dst_height =
    calculate_default_transform(src_crs, dst_crs, x_pixels, y_pixels,
    gcps=gcps)

    kwargs = src.meta.copy()
    kwargs.update({
        'crs': dst_crs,
        'transform': dst_transform,
        'width': dst_width,
        'height': dst_height
    })

My error:

Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\envs\python36\lib\site-packages\IPython\core\interactiveshell.py", line 3326, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-2-2770ecde2207>", line 65, in <module>
    with rasterio.open(dataset) as src:
  File "C:\ProgramData\Anaconda3\envs\python36\lib\site-packages\rasterio\env.py", line 423, in wrapper
    return f(*args, **kwds)
  File "C:\ProgramData\Anaconda3\envs\python36\lib\site-packages\rasterio\__init__.py", line 153, in open
    raise TypeError("invalid path or file: {0!r}".format(fp))
TypeError: invalid path or file: <osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x00000131C7385A80> >


texts: Avoiding GDAL ERROR 4 / Python - UnicodeDecodeError:?

texts:
I'm developing my QGIS-plugin.
Unfortunately I faced a problem I can't solve.
Plugin works pretty fine, until user hendles non-ascii characters inside input or output paths.

The problem occures when GDAL functions (gdalwarp, gdal_translate) are being executed via os.system(). I read a lot about handling non-ascii characters, but I still can't fix that bug. .encode('utf8') and .decode('utf8') don't help in this case.

I still get the following error messages:

When I'm using Python:

  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in
  position47: ordinal not in range(128)

When I try to run the problematic functions via OSGeo4W Shell:

  ERROR 4: `E:/projekty/python/dane/ŕ╣│┐čˇŠ˝_raster.jpg' does not exist
  in the file system

So, according to what I've already written.
How can one improve the following code, so it will not lead to error whenever non-ascii characters are or are not used within files paths?

import os

def do_something(input_path, output_path):

    os.system('gdalwarp -co COMPRESS=LZW "' + input_path + '" "' + output_path +'"')


texts:
I have the WKT of many linestrings which contains three dimensions, however my script only requires a two dimensional linestring and I therefore want to discard the third dimension.

My current code, using Shapely, does flatten from 3D to 2D, but it relies on the geometry's wkt method outputting as 2D (even if it is 3D). As this Shapely behaviour may change in the future, can anyone recommend a more robust method of flattening to 2D?

Python 2.7.13
Shapely 1.2.17
Ubuntu 12.10

>>> from shapely.geometry import LineString
>>> from shapely.wkt import loads
>>> line_3d_wkt = "LINESTRING (1 2 0, 4 3 0, 8 9 0)"
>>> line_3d = loads(line_3d_wkt)
>>> line_3d.has_z
True
>>> list(line_3d.coords)
[(1.0, 2.0, 0.0), (4.0, 3.0, 0.0), (8.0, 9.0, 0.0)]
>>> line_3d.wkt  # outputs as 2D even if 3D geometry
'LINESTRING (1.0000000000000000 2.0000000000000000, 4.0000000000000000 3.0000000000000000, 8.0000000000000000 9.0000000000000000)'

My current technique to flatten the 3D geometry to 2D is:

>>> line_2d = loads(line_3d.wkt)
>>> line_2d.has_z
False
>>> list(line_2d.coords)
[(1.0, 2.0), (4.0, 3.0), (8.0, 9.0)]


texts: find XY values of Great Britain and Northen Ireland

texts:
I'm using Openlayers 3 to show the map of Great Britain and Northern Ireland. For that I need to provide the extent values of GB and Northern Ireland. I tried in google and couldn't find a proper resource for grid locations in GB and Northern Ireland.

I need to provide the extent values as in below format.

(minX,minY – maxX,maxY): -521611.7877215, -99060.2018315805 - 1107515.6274664556, 1234593.14792

Can someone let me know the correct grid locations for GB and Northern Ireland or a proper source to find those please.


texts: Applying Google Earth Engine cloud mask on each individual image BEFORE mosaicing the images?

texts:
How can I apply a cloud mask to each individual image in a collection THEN mosaic them together based on (for example) mean pixel value across images? The code does not work because the maskClouds function requires the input to be a single image but I do NOT want to mosaic all images before all cloud pixels have been removed.

//CDI AOI
var region = ee.FeatureCollection('ft:1tdSwUL7MVpOauSgRzqVTOwdfy17KDbw-1d9omPw')
.filterMetadata('Country', 'equals', 'Ghana');

var landsat8 = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
.filterDate('2013-01-01', '2013-12-31')
//.filterMetadata('CLOUD_COVER', 'less_than', 25)
.filterBounds(region);

////////////////////////////////////////////////////////////
/////////////////Start Function/////////////////////////////
////////////////////////////////////////////////////////////

// Fmask classification values var FMASK_CLEAR_GROUND = 0; var FMASK_WATER = 2;
//var FMASK_CLOUD_SHADOW = 3; var FMASK_SNOW = 4; var FMASK_CLOUD = 5;

var getQABits = function(image, start, end, newName) {
    // Compute the bits we need to extract.
    var pattern = 0;
    for (var i = start; i <= end; i++) {
       pattern += Math.pow(2, i);
    }
    // Return a single band image of the extracted QA bits, giving the band
    // a new name.
    return image.select([0], [newName])
                  .bitwiseAnd(pattern)
                  .rightShift(start);
};

// A function to mask out cloudy pixels.
var cloud_shadows = function(image) {
  // Select the QA band.
  var QA = image.select(['pixel_qa']);
  // Get the internal_cloud_algorithm_flag bit.
  return getQABits(QA, 3,3, 'Cloud_shadows').eq(0);
  // Return an image masking out cloudy areas.
};

// Second function to mask out cloudy pixels.
var cloud_shadows_mean = function(image) {
  // Select the QA band.
  var QA_mean = image.select(['pixel_qa_mean']);
  // Get the internal_cloud_algorithm_flag bit.
  return getQABits(QA_mean, 3,3, 'Cloud_shadows_mean').eq(0);
  // Return an image masking out cloudy areas.
};

// A function to mask out cloudy pixels.
var clouds = function(image) {
  // Select the QA band.
  var QA = image.select(['pixel_qa']);
  // Get the internal_cloud_algorithm_flag bit.
  return getQABits(QA, 5,5, 'Cloud').eq(0);
  // Return an image masking out cloudy areas.
};

// Second function to mask out cloudy pixels.
var clouds_mean = function(image) {
  // Select the QA band.
  var QA_mean = image.select(['pixel_qa_mean']);
  // Get the internal_cloud_algorithm_flag bit.
  return getQABits(QA_mean, 5,5, 'Cloud_mean').eq(0);
  // Return an image masking out cloudy areas.
};

var maskClouds = function(image) {
  var cs = cloud_shadows(image);
  var c = clouds(image);
  image = image.updateMask(cs);
  return image.updateMask(c);
};

var maskClouds_mean = function(image) {
  var cs_mean = cloud_shadows_mean(image);
  var c_mean = clouds_mean(image);
  image = image.updateMask(cs_mean);
  return image.updateMask(c_mean);
};

////////////////////////////////////////////////////////////
/////////////////End Function///////////////////////////////
////////////////////////////////////////////////////////////

var visParams = {
  bands: ['B4', 'B3', 'B2'],
  min: 0,
  max: 3000,
  gamma: 1.4,
};

var landsat8_mask = maskClouds(landsat8)

var cloud_free_mean = landsat8
.reduce(ee.Reducer.mean());

Map.addLayer(cloud_free_mean, visParams2, 'Cloud Free Mean');


texts: Determining accuracy of coordinates from handheld GPS?

texts:
I'm working on a project for class, and I'm mapping GPS on Google Earth with a KMZ file. I used a handheld GPS  24°6.691'N + 74°27.833'W.

How accurate is my coordinates? I know I'm in decimal minutes!


texts: After exporting data to table from statewide dataset, how to align exported data of same type from regional dataset in separate colum?

texts:
I am using ArcGIS Desktop 10.4.1 to do my analysis.

I have a statewide dataset of plant community polygons identified by plant community type. I want to calculate the total acreage of each specific plant community type and export this information to a .csv table, with column 1 identifying each plant community type and column two identifying the total acreage.

I then want to calculate the acreage of each plant community type at smaller regional scales and export this data into column 3,4,5,... with the partial regional plant communities aligning with the originally exported statewide plant community rows regardless if the plant community doesn't exist in that region.

Example:

What is the process that I would take to make this happen?


texts: Displaying labels created using LabelLayer only at certain scales in ArcGIS API for JavaScript

texts:
I am using ESRI Javascript 3.7 framework to develop a map application, in it I am trying to display labels created using LabelLayer at certain scales only, say from 1:1 to 1:500 scale only.

How can I achieve this?

I played a little with ScaleDependentRenderer but it results in 2 firebug exceptions. Not sure if the ScaleDependentRenderer is the right answer or not.

var occupancyLabelLayer = new esri.layers.LabelLayer({ id: "labels" });
// add the label layer to the map
map.addLayer(occupancyLabelLayer);

var labelField = "FLOOR";
// create a text symbol to define the style of labels

var spaceLabelColor = new dojo.Color("red");
var spaceOccupancyLabel = new esri.symbol.TextSymbol().setColor(spaceLabelColor);
//spaceOccupancyLabel.font.setSize("14pt");
spaceOccupancyLabel.font.setFamily("arial");
var spaceOccupancyLabelRenderer = new esri.renderer.SimpleRenderer(spaceOccupancyLabel);

var spaceLabelScaleDependentRenderer = new ScaleDependentRenderer({
    rendererInfos: [{
        renderer: spaceOccupancyLabelRenderer,
        minScale: 500,
        maxScale: 1
    }]
});

occupancyLabelLayer.addFeatureLayer(featureLayer, spaceLabelScaleDependentRenderer, "${" + labelField + "}");

Firebug Exceptions:

1)exception in animation handler for: onEnd
http://js.arcgis.com/3.7/ (line 45)
2)TypeError: b is undefined
http://js.arcgis.com/3.7/js/esri/layers/LabelLayer.js    Line 21


texts:
I have a group layer that I have populated with a collection of feature layers. When I right-click on the group layer and select "Zoom to Layer" the view zooms so that I can see the full extents of all of the feature layers. I'd like to be able to do this using ArcPy, but so far I haven't been able to determine the proper method. The group layer doesn't have its own Extents, so I can't set the Extent of the current data frame using groupLayer.getExtent(). Is there a simple way to replicate what the right-click menu does?

There may also be a case where I want to zoom to only the visible layers inside of the group, so a method that allows me to do that would be even better (seeing as my first case is a special case of this one with all layers set to visible).

The code below shows how I am currently trying to go about this. Essentially I am looping through some collection of datasets that have already been brought into my mxd file to export pictures. The groupLyrDict and zoomLyrDict dictionaries contain the layer objects for the group layers that I am using. They are created elsewhere in the code and work correctly, so for instance zoomLyrDict[tuple([dataset,"Groupview"])] returns a group layer that contains several feature layers.

datasetNames = ["ds1", "ds2", "ds3"]
for dataset in datasetNames:
    groupLyrDict[tuple([dataset, "Groupview"])].visible = True
    df.extent = zoomLyrDict[tuple([dataset,"Groupview"])].getExtent() # causes an error because the group layer does not have an Extent object
    arcpy.RefreshActiveView()
    arcpy.mapping.ExportToTIFF(mxd, outDir + "\\my_view.tif", "PAGE_LAYOUT", resolution = 300, tiff_compression = "NONE")
    groupLyrDict[tuple([dataset, "Groupview"])].visible = False


texts:
How do I save a .mxd programatically? The project is never saved and on button-click, I want to save the project.

I use SaveFileDialog to get the filepath and then use the following:

IMapDocument mapDocument= ArcMap.Document as IMapDocument;
mapDocument.SaveAs(projectPath);

This crashes my ArcMap. Any suggestions?


texts:
I'm having difficulty understanding why ArcGIS Javascript API isn't rendering SVG when running in IE9 quirks mode.

When I visit the ESRI sample site at http://help.arcgis.com/en/webapi/javascript/arcgis/demos/graphics/graphics_add.html and switch to IE 9 + Quirks mode I notice dojox/gfx/vml.xd.js loads but vector rendering does not work.  Point, Multipoint, Extent all work fine but anything gfx related (polyline, freehand, line) does not work.

Is it possible to use dojo/ArcGIS Javascript API in IE9 + Quirks mode?  The reason I ask is because the  pages I'm embedding the map in must run in this mode.


texts: ArcMap Spatial Join Tool Equivalent In Hadoop

texts:
Does anyone know the equivalent of the spatial join tool in ArcMap that can be used in Hadoop?

I am trying to join point and polygon data in Hadoop and create a new point files that adds the attributes of the polygon data.


texts:
I'm really new to GIS tools.
I'm trying to make ortho projection maps of all the countries. I've downloaded Natural Earth Data and QGIS. I imported the data files by dragging them into QGIS. I added a Grid to my default projection by using the "Vector->Research Tools->Create Grid..." menu option. Then I densified the grid with "Vector->Geometry Tools->Dentify By Count". Then I switched the Projection to a custom projection defined as the Proj String:
"+proj=ortho +lat_0=23.868 +lon_0=121.0521 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"
It almost looks exactly how I'd want, but the grid lines are both curved (like I want) and straight across the globe.

I've tried poking around the menus and searching the internet for what I did wrong, but I haven't had any luck yet.


texts:
I have an application where each user has individually generated geotiff files.
Since the users pay for the generated geotiff, I have to make sure that the users can only see their own geotiff and not the geotiff of any other user.

I'm using geoserver and PostgGIS and I plan to user WMS / WCS to deliver the data.
The geotiff files are stored in the database, together with some additional data like an id.

How can I setup such an security?
Is it really necessary to create an own layer and role for each user? Or is there any way to create a security based on the id of the files in the database?

best regards,
DDD


texts: Two adjoining lines becomes clearer than two individual

texts:
When having an outline style where the two edges interfere, they become much more dense in the color than when they are individual, see image below.

It is an outline of a polygon. The thing is that I'd like them to become just as dimm as the rest.

Do you have an idea how to style them?


texts: Setting up local ArcGIS feature access services in Geocortex when the services (and end users) are behind a firewall

texts:
We have an ArcGIS server (version 10.1) at my workplace - it is inside the firewall, and will (it seems) stay there. We also have a Geocortex web mapping solution based on Amazon hosting (version 3.14). The content on the Geocortex site is based mainly on copy data we upload to the cloud server, together with available WMS services.

What I try to do is to set up a site on our Geocortex to access certain feature access services on the ArcGIS Server for users within our firewall. That is - server, data and users are all inside the firewall. I am not trying to make data available outside of the firewall.

The problem is that the Geocortex REST manager application (which is in the cloud) requires access to the server to set up feature access services, and the firewall is preventing that. I have worked around this for WMS services by copying the GetCapabilities definition to somewhere outside of the firewall, but I can't find a similar workaround for ArcGIS services like feature access.

Anyone know a way to access the service definitions without opening the firewall? I am loath to go through the cumbersome and time-consuming process of getting IT to open the firewall every time I want to make changes...

Alternatively - do anyone have suggestions on other (affordable) solutions to set up a simple web-map for users inside the firewall using ArcGIS Online maps, available WMS services plus my feature access services?


texts:
I am doing an urban prediction using some classified image of previous years. It can be done through Land Change Modeler. It is an Arc-GIS extension tool. I have the license too. But the tool is not showing in my toolbox.

What should i do ?


texts: How can I import open street map power grid data into QGIS?

texts:
I wanted to download power grid network of Cologne city from following url
http://www.flosm.de/en/Power-Grid.html

But I could only download in jpg format. I wanted to import this in GIS as vector (*.shp) or raster image but failed to do so.


texts: Georeference Canadian postal codes in CartoDB

texts:
I'm having issues trying to map by Canadian postal code. I'm prompted with "No rows geocoded in test_cartodb dataset"

I mapped by "administrative area".


texts: Unit of $area in the field calculator in Albers Equal Area projection (ESRI: 102033)

texts:
I need to find the area of a set of polygons that are spread across South America. I researched a bit, and found that the Albers Equal Area projections reduces distortion and can be used for calculating areas within large landmasses.
My question is: What unit is the output of the $area function in the field calculator when using the ESRI: 102033 projection?


texts: Issues calculating range with QGIS 2.0 raster calculator

texts:
I would like to calculate a simple range using the QGIS 2.0 Raster Calculator, but am getting strange results. I believe I am not using the correct syntax.

To get all values between .003-.5, I entered the following:

This resulted in the following raster:

As I found this result very strange, I decided to check all values above .003:

This resulted in the following raster, which I believed to make sense. It is simply the inverse of the first without any overlap, meaning I am unable to target all values within my needed range:

When attempting with AND logic, I got a completely black raster image:

Now, I've tried to fix the issue by separating the categories completely. The raster is still black.

Elevation greater than 5:

Elevation greater than .03. Note, that I happened to test .03 instead of .003 in this case as opposed to previous screen captures:

I'm just looking to have the elevation between these two values.


texts: What file format has 18n, 18g and 18o file extensions?

texts:
My professor (who is now unreachable on holiday) gave me files to work with for a mapping project. The files were retrieved from the Ordinance Survey Ireland webpage. They were used to differentially correct GIS data that had been collected in the field.

I don't recognize the file format, and I am unsure how I am meant to interact with these file types. The files have suffixes like .18N, .18G, etc. I have attached a picture. What is this format?

How do I use these files?

I'm working with Grass/QGIS.


texts: Joining data associated with geographic coordinate to region in shapefile containing those coordinates?

texts:
I have two shapefiles that I essentially need to join, but inconvenience in the boundaries in each shapefile, traditional join methods have proven to be quite difficult (often there are multiple matches). However, one shapefile contains two columns containing the centroid of the area in lat/long, and frankly, simply matching those coordinates to the region in the other file that includes those coordinates would work really well for me. Alternatively, if I could tell QGIS to return the area for which there is the most overlap with the target vector in case it overlaps with more than 1, that would work.

How can I do either of those things?


texts: Stripes between 2 images of Sentinel 2A (Level-1C)

texts:
Why do i get these stripes between 2 images of Sentinel 2A? (Figure)

I notice that this happened for 2 images of different sensing date (even they're just 3 days away).

Has anyone had this problem and solved it?


texts: Opensource Tools for Optimizing Server Performance

texts:
I use a server with a basic Microsoft OS primarily for data storage and as a central repository for edited vector data.  These data are not intended to be used as mapping or GIS products available publicly on the web.  Additionally, I have always used a standard file structure for organizing data on the server, where files exist within folders.  Given this information, I am interested in optimizing my server performance with opensource database management tools such as PostgreSQL and PostGIS.  I do not have a strong IT background and am looking for a starting point.  So far, I have downloaded PostgreSQL/PostGIS, although I find the process of loading data cumbersome and find myself asking why go through the hassle?.

Questions:

Where should I begin in bringing my GIS server and data management practices up to par?
What opensource/commonly available software can be utilized to
optimize a server designed for editing vector data and storing GIS
data?


texts: Importing data from personal geodatabase to Excel and/or Access?

texts: My dataset it much more than what ArcGIS 10.3 can export to a .xls file so I was told that I could write the data to a personal geodatabase which I then could import to excel and/or access. I tried to use Table to geodatabase but it does not seem to work. When I try and import the data into excel for example as access database I dont get the information from the attribute tables. I just get things like GDB ItemRelationship types with sub categories such as forward lable, backward lable etc... I just want a copy of the attribute table! Can anyone help me with this?


texts:
Using QGIS version 3.8
I have a group of layers that I want to rename to get rid of a prefix inserted from the import process.

As I began to right-click on each, I notice an underline

I am hoping to use this, but looking in the Keyboard Shortcuts and elsewhere online, I am not finding a reference to it.

Is the indicator there for some other reason, maybe?


texts: Updating leaflet L.imageOverlay using jquery serialize without page refresh?

texts:
I am developing an application that fetches and displays raster/image maps (png, tif), into a leaflet map. However, I didn't like the page and the map refresh upon form submission.

In addition, I want the map to only refresh the image layer. Using the normal way, it is full of refershes. So I managed to get this code working.

    $('#forms').on('submit',function(e) {
        $.ajax({
            url:'fun.php',
            data:$('#forms').serialize(),
            type:'GET',
            success:function(result){
                $('#downloads').html(result);
            }
        });
        e.preventDefault();
    });

And the leaflet image layer here.

raster = L.imageOverlay('<?php echo $datafile;?>', [[33.00, 31.00], [43.50, 35.00]]);

So the exact problem is, the $datafile couldn't be echoed on leaflet raster layer and I would like to reset the form values after submit. I tried to use setUrl from leaflet method on image layer but it doesn't work.


texts:
I wish to change the colors of various roads on a map and save the changes to either a "personal map" or a "map layer."

The personal map could look something like this, except it would need to have the "snap to roads" feature, which is currently bugged on google mymaps.

The map layer option seems a lot more complicated, but would be ideal if combined with a wiki function as the entire point of this exercise is to color roads according to a cyclist's perspective: according to speed and volume of traffic.

It would be ideal if the road itself could be selected and highlighted so that any changes to the road would automatically be incorporated into the color scheme--instead of having colors going where the road no longer goes.

I am not necessarily asking for a detailed step-by-step walkthrough of a specific possibility (though that would be nice), but rather a general overview of what my options are and hopefully some idea as to which options are most promising. I have been researching various mapping systems for several hours and feel as if I'm re-inventing the wheel. Please suggest a method for highlighting roads.


texts:
I have my roads and locations added into my PostGis DB, and have installed pgRouting's SQL files. However, when I attempt to run:

SELECT * FROM shortest_path('
   SELECT gid AS id,
          start_id::int4 AS source,
          end_id::int4 AS target,
          shape_leng::float8 AS cost
   FROM myr_roads_point',
1,
5110,
false,
false);

It gives me the following error:

ERROR:  function shortest_path(unknown, integer, integer, boolean, boolean) does not exist
LINE 1: SELECT * FROM shortest_path('
                      ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

********** Error **********

ERROR: function shortest_path(unknown, integer, integer, boolean, boolean) does not exist
SQL state: 42883
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Character: 15

Any idea?


texts: where to find gdal_proximity.py files on ubuntu?

texts:
I have installed QGIS, and I use gdal_proximity.py to get a proximity raster, I would like to know where can I find that file on an ubuntu 14.04 distribution.

I ran find command in the .qgis2 directory but got nothing


texts:
I am trying to execute unary_union on a GeoDataFrame to run Shapely's nearest_points() method. It is taking a very long time! The set is around 6,500 points. Is there a better way to find nearest neighbor?

I am on Windows 10.


texts: Copying JP2000 from Mosiac Dataset turns white

texts:
I am trying to copy a raster to jp2000 from another File Geodatabase that I created as a Mosaic Dataset.

It came out as a whiteout in the middle. I don't know what it cause this.

See screenshot :  Mosiac Dataset :

See Post copied from Mosiac Dataset to the new File Geodatase :
See Result log :

Why does this jp2000 cause it to turn white?


texts: I have followed @underdark instructions but I fail in one respect!  When I go to the OSGeo4W installer and select Advanced Install>Select Packages>Web I don't have the option for installing Apache as it's missing from the list - I'm now down the end of a blind alley with no idea how to proceed - can anyone help?


texts: Customizing / Editing Dynamic Text for  in ArcGIS Desktop?

texts:
To encourage GIS users here to adhere more rigidly to the existing folder architecture as well as demonstrate the functionality of dynamic text, I'm trying to update one of our templates so that I can automatically generate Layout title using dynamic text to display the file path, but only with select levels of the folder tree.

example, for a project path:

D:\PROJECT_FOLDERS\PROJECT_AREA\CLIENT\PROJECT\PROJECT_NO\SUB_SECTION\GIS\PROJECTS\Project1.mxd

I'm trying to generate as dynamic text (separated by spaces):

CLIENT  PROJECT  PROJECT_NO  SUB_SECTION

I am using ArcGIS Desktop 10.4.


texts: Reclassification of MODIS collection in Google Earth Engine

texts:
I want to reclassify the MCD43A4_006_NDVI collection and change all negative values into NAs.
I have the following code but I am not sure how to do this.

Any ideas?

 var geometry = /* color: #d63000 */ee.Geometry.Polygon(
            [[[107.4876749263151, 43.53145035042672],
              [107.2899210200651, 40.74603425026213],
              [114.4530069575651, 40.56266845308453],
              [118.6717569575651, 42.72968876300252]]]);

        var modisNDVI = ee.ImageCollection("MODIS/MCD43A4_006_NDVI")
        .filterBounds(geometry)
        .map(function(image){return image.clip(geometry)})
        .filter(ee.Filter.calendarRange(7,7,'month'));

 // Here I have no idea how to continue and set the "values less than 0"
            var reclassified = modisNDVI.map(function(img){
          return img.gt(-1) // or gt()
        })

        var check = ee.Image(modisNDVI.first());
    Map.centerObject(check);
    Map.addLayer (check, {min:0.0,max:1,palette:['FFFFFF','CC9966','CC9900','996600','33CC00','009900','006600','000000']},'NDVI');

    print(modisNDVI)

    var batch = require('users/fitoprincipe/geetools:batch')
    batch.Download.ImageCollection.toDrive(modisNDVI, "Folder", {scale:500,region: geometry});