texts: How can I make a dialog box floating while working on the window?

texts:
I would like to have a floating dialog box just like the Named Views.mbx

How could make my existing dialog box float while working on other window?


texts: Error when attempting to upload shapefiles into Google Earth Engine

texts: When trying to import a new shapefile, I'm greeted with "Error: Unable to parse the specified file." I've imported hundreds of shapefiles previously so I have no idea why this error is just appearing now. I'm exporting the shapefiles from QGIS using a mac.


texts: Filtering CSV layer attribute table in QGIS Print Composer?

texts:
I have a Map content with attribute table and a related attribute csv table, linked with a common field.

When preparing a printing table I'd like to add both tables to my layout, filtering them with map content. For shapefile attribute table, it is pretty easy (checking"Show only visible feature" command).
I cannot filter related table, because if I check "Show only visible feature", I obtain an empty table.
Using "Relation children" option, I cannot see any relation, both with table used as children than as parent.


texts: Adding a CSV with GPS coordinates points to Google Earth Engine

texts:
I'm trying to add a CSV with Lat/Lon to Google Earth Engine.
I looked at the answer below, however, I seem to be making an error somewhere.
Adding x,y coordinates from table in Google Earth Engine
My CSV is structured as follows and is saved as comma-separated UTF-8. The file has 7000 lines, I have added the first 10:
y,x
50.1275,26.4817
50.1275,26.4816
40.5549,21.3141
40.5548,21.3141
46.5152,24.5436
39.0794,21.7808
39.0792,21.7808
39.0794,21.781
39.0789,21.782
39.0793,21.7811
39.0793,21.7812

Here are the steps I took:

Add new -> CSV - > Select the CSV file

Change X column to x and Y column to y. Dont touch anything else.

Wait for file to upload, ingest.

I keep getting the following when the file is uploaded (rather than the actual plotted coordinates)
Either this:

or a variation showing x and y as their own "float" columns
I've added this correctly before, but cant figure out where I am making the mistake. This is a previous "successful" upload:

Here's a link to the CSV:
https://drive.google.com/file/d/1GUsBqRURp6YVycyCAby3JdvzzJ0d-gsl/view?usp=sharing
Any help on this will be amazing - I'm up to ~100 slightly different attempts :/


texts: QGIS problem with External Resource widget in attribute table

texts:
I have the following problem and I am not sure how to fix it or if its a bug.

When setting an editor widget of a field to "External Resource" I can not access the widget from within the attribute table. When double clicking it, it shows the current path and the "..." button but I can't click on the button nor change the path manually (see the first screenshot). While accessing the same editor widget via the identify tool works fine (see the second screenshot).

Question:

Can I set the widget in some way so it works also while accessing it via attribute table or am I supposed to use the form in identify tool?

I am aware of the option, that I can set the view of the attribute table to "Form view" but this is not an option for my case.

Set up:
Windows 10 64 bit with QGIS 2.14.15. I also checked that the "Editable" Checkmark is set.


texts:
I adapted the following code from a QGIS 2.18 plugin to a QGIS 3.2 plugin:

    def showFeatures(self):
    layer = self.iface.activeLayer()
    features = layer.selectedFeatures()

    #Anzeigen der ausgewählten Features
    self.dockwidget.features_list.clear()
    for i in range (0,len(features)):
        self.dockwidget.features_list.addItem(str(i))

    layer.selectionChanged.connect(self.showFeatures)

def showAttributes(self):
    if not self.dockwidget.features_list.selectedIndexes():
        return
    item = self.dockwidget.features_list.selectedItems()[0]
    feature = self.selectedFeatures[int(item.text())]

    #Zoom
    box = feature.geometry().boundingBox()
    self.iface.mapCanvas().setExtent(box)
    self.iface.mapCanvas().refresh()

    #Anzeigen der Feature Attribute
    self.dockwidget.attributes_list.clear()
    for attribute in feature.attributes():
        self.dockwidget.attributes_list.addItem(str(attribute))

The plugin I adapted the code from writes the code in the file plugin_dockwidget.py, I write it in the plugin.py. The plugin refers to two list widgets. The first function shows the currently selected features in the first list widget. What the second function should do, is to show a list of attributes of the feature I selected in the first list widget and to zoom on the feature.

My problem is, that the plugin shows the features as expected, but it neither shows the attributes nor does it zoom onto the selected feature.

features_list displays the feautres
attributes_list should display the attributes


texts:
How can I write the following conditional statement with CON?

I want to run all the conditions(simultaneously).

IF rasterA>0 & rasterB>0 Then (rasterA+rasterB)-(rasterA*rasterB)

                               &

IF rasterA<0 & rasterB<0 then (rasterA+rasterB)+(rasterA*rasterB)

                               &

IF rasterA & rasterB Opposite sign then (rasterA+rasterA)/(1-min(rasterA & rasterB)


texts: exporting a polygon from a layer file to a file geodatabase feature in arcpy

texts:
I have a script that creates Service Areas(SA) using Network Analyst. I need to use the polygon of the SA later on in the script. I need to do an analysis using each resulting SA individually. The MakeFeatureLayer_management gives an error that input is not supported thus I assume I need just the polygon not the layer file.  Unfortunately,the script creates a layer file for the SA. I can't figure out how to select or create just the polygon from the layer file. Is there a "get feature from layer" or "get polygon" function? Below is the script.

I'm using ArcGIS 10.2 Desktop.
My workspace is a filegeodatabase.

with arcpy.da.SearchCursor(PL_Fac, PL_fld) as SAcursor:
    for SArow in SAcursor:
        #print('{0}, {1}'.format(SArow[0], SArow[1]))
        SArow_new = str(SArow[1])
        whereClause = 'Add_PNTID =' +SArow_new
    # Process: Make Feature Layer
        PL_Fac_MakeLay = arcpy.MakeFeatureLayer_management(PL_Fac, PL_Fac_Lay, whereClause)
    # Process: Make Service Area Layer
        result_object = arcpy.MakeServiceAreaLayer_na(ns_RoutingNetwork_ND, "SA_Lay", impedance, "TRAVEL_FROM", "25", "SIMPLE_POLYS", "NO_MERGE", "DISKS", "NO_LINES", "OVERLAP", "NO_SPLIT", "", "", "NO_UTURNS", "'One Way';Restricted", "NO_TRIM_POLYS", "100 Meters", "NO_LINES_SOURCE_FIELDS", "USE_HIERARCHY", "")
    #Get the layer object from the result object. The service layer can now be referenced using the layer object.
        layer_object = result_object.getOutput(0)
    #Get the names of all the sublayers within the service area layer.
        sublayer_names = arcpy.na.GetNAClassNames(layer_object)
    #Stores the layer names that we will use later
        facilities_layer_name = sublayer_names["Facilities"]
    #Load the fire stations as facilities using default field mappings and
    #default search tolerance
        arcpy.na.AddLocations(layer_object, facilities_layer_name, PL_Fac_MakeLay, "", "")
    #Solve the service area layer
        arcpy.na.Solve(layer_object)

    #Save the solved service area layer as a layer file on disk
        layer_object.saveACopy(output_SAlay)


texts: Translate coordinates between different CRS

texts:
There are two Coordinate Reference System, say they are wgs84 and crs2(a local crs).

A certain location can be translated from wgs84 to crs2 by official algorithm, and the algorithm is irreversible(Because the algorithm is confidential).

Now we have a lot of locations in crs2, and we want to translate them to wgs84.

We tried to use the grid to make this.

For example, we can generate millions of points in wgs84 which have a certain distance with each other, then they will make up a gird.

Then we translate these points to crs2 one by one by the algorithm. After that, for a given point in crs2, we first find the gird it reside in , and then calculate a approximate location in wgs84.

Like this:

And the precise depend on the distance of the gird, the small the better.

I am just not sure if there is any models or best practices out of box for building the grid and make the reverse calculation as fast as possible?


texts: Can GNSS precision be improved with a local atomic clock?

texts: Does the use of a local atomic clock improve the accuracy for position determination with existing GNSS?


texts: Adding GDA2020 NTv2 transformation to ArcGIS 10.5

texts:
The implementation of GDA2020 is drawing near! In an effort to be ready before time I have downloaded the NTv2 Grid Shift Binary (GSB) transformation grid from ISCM (available here) who are the official custodians of all things GDA2020 related. I am using the GDA94_GDA2020_conformal_and_distortion.gsb as well as AUSGeoid2020 (available here).

ArcGIS 10.5 does have GDA2020/MGA2020 in the list of available coordinate systems.. a good start. ArcGIS 10.2 does not recognize GDA2020 calling the CRS "custom" but locating correctly.

When transforming from GDA94 to GDA2020 ArcGIS has a default transformation GDA_1994_To_GDA2020_1 which doesn't match a GSB file in the australia folder but may be a parameter only transformation. I am uncertain as to the accuracy of this transformation and so followed the instructions in this Esri support post about installing a new NTv2 file attempting to install the downloaded GSB file as the assumed to be more correct transformation between these datums.

Has anyone verified that the default Esri transformation is close enough (4th decimal place in MGA2020) to the ISCM GSB for all of Australia so that I don't need to jump through all these hoops on every workstation with ArcGIS installed?

Note: I understand that this isn't much of a question; I have posted this mostly as a resource for users who will be implementing GDA2020 after frustrating hours encountering numerous broken links and reading through verbose documents in a quest for a correct transformation and I'm hoping that this vague question saves others a considerable amount of time and frustration by posting the working links... at least until the data moves again and these links become broken too.


texts: 'Add Colormap' tool returns nothing in ArcGIS Pro 2.2

texts:
In QGIS 3, I created a text file for my symbology.
Here it is:

symbology.txt

# Fichier d'exportation de palette de couleurs généré par QGIS
INTERPOLATION:INTERPOLATED
0,0,204,170,255,0
8,0,204,170,255,8
16,153,230,0,255,16
24,255,255,0,255,24
32,255,170,0,255,32
40,255,0,0,255,40
80,128,0,0,255,80

I apply it to my rasters with singleband pseudocolor symbology.
Here is the result:

I want to apply this color map file to a raster in ArcGIS Pro 2.2.0.
I modified the file like this:

symbology.clr

0    0    204    170    255    0
8    0    204    170    255    8
16    153    230    0    255    16
24    255    255    0    255    24
32    255    170    0    255    32
40    255    0    0    255    40
80    128    0    0    255    80

and tried like this too:

symbology.clr

0.000000    0    204    170
8.000000    0    204    170
16.000000    153    230    0
24.000000    255    255    0
32.000000    255    170    0
40.000000    255    0    0
80.000000    128    0    0

I used « Add Colormap » tool to apply this color map file to a raster. It says that it’s done, but nothing changed..

Does someone have an idea?


texts: Hillshade error: output values all equal 180

texts:
I am having trouble producing a hillshade using the ArcGIS spatial analyst (hillshade) tool. I am working with a 1m DEM in a projected coordinate system (GDA_94_MGA56) and have adjusted the Z-factor accordingly for a metric dataset to 0.0000898 (dataset is at -28 degrees). Everytime I try to output, all values in the raster are returned as 180. Any ideas please?

and the output looks like so:


texts: Ensuring that polygons rather than multipatch features are created by ArcGIS KML To Layer tool?

texts:
Today I received a 10m reference grid as part of a KMZ file and when I converted it to a file geodatabase feature class using the KML To Layer tool from ArcGIS Desktop 10.6 the features created had a geometry type of multipatch, instead of the polygons that I was expecting.

From Converting multipatch layer into polygon layer using ArcGIS Desktop? I know that an ArcGIS 3D Analyst license would enable me to convert the multipatches to polygons using the MultiPatch Footprint tool, but I do not have that extension licensed.

Surprisingly, a second KMZ file from the same source with what appeared to be the same reference grid, converted to two feature classes (one polygon and the other multipatch).

What triggers the KML To Layer tool to create multipatch features, and can that trigger be redirected to create polygons instead or as well?


texts: Waterflows simulation in Blender Game engine

texts:
I have written an ESRI ASCII DTM importer for Blender and now I want to create something that can simulate the waterflows on that portion of terrain.

I have no idea on how to start, so does anybody know a previous project or a good tutorial on how to do some parts of this?


texts: What is the main benefit and drawback of: GeoServer, MapServer, Mapnik?

texts: For the purpose of creating a comparison table, please recommend a couple of feature fields that would apply to each FOSS GIS server.  And, perhaps answer the question of which desktop GIS System, QGIS, ArcGIS, gvSIG it is best suited for migrating from, if applicable. Also, I hope to have field with skills required to set one up (for instance a specific programming language) if that's possible.  Thanks in advance.


texts: Add the distance along the route for intersection points of polylines

texts:
I have two sets of polylines, illustrated in the screenshot (roads in purple and bridges in blue). I want to find the distance along the route for intersection point of each bridges from the starting point of the road and add it as a field to the bridge attribute table. Essentially, I want to add a stationing field in reference to start of the road to the bridges. See the screenshot below for clarification;

What I thought of doing is creating a point feature with the intersections, then finding the distance along the route for those points, and later join the bridge and the created features to add the stationing in the bridges table. However that seems like a workaround to me. Is there a more straightforward method to do this?


texts: When working with Spatialite DBs, I can store multiple tables in single DB. But now I want to store multiple raster tables on a single Rasterlite DB. I tried QGIS for conversion but it converts only one table not more... (I am using Windows)


texts:
I need to know what we call the lands that are not pure deserts that i can think that they are the areas of metropolitan areas plus rular areas or forests plus areas that are near freshwater that can be occupied by people with minimum efforts.

Are there any information for this for countries?


texts: Drawing line between points at specific distance in PostGIS?

texts:
I have a data of points along the streets, I would like to turn those dots into simple coloured lines. Any pointers what this problem may be called or any algorithms that can help me solve this?

I was hoping to use PostGIS functions to do this but I'm open to suggestions, this is a data from a .shp file.

Edit1: Updated the picture to demonstrate ideal solution of this problem.

Drawing the line would be purely based on the distance between those points, there's nothing else that I can use to group them by. Ideally this would be points at max specified distance along the projected line? And by projected line I mean find 1st point then next one nearest to it then project a line and check if there are any points on this line at max distance to any of those already on the line.


texts: Building QGIS 3 undeclared identifiers and classes on macOS

texts:
Has anyone had any luck building QGIS 3 on macOS?
I keep getting unkonwn type name errors when running it:

/Users/user/Downloads/QGIS-master/src/core/qgspointlocator.cpp:62:39:
error: unknown class name 'IDataStream'; did you mean 'QDataStream'?

/Users/user/Downloads/QGIS-master/src/core/qgspointlocator.cpp:40:8:
error: no type named 'Region' in namespace 'SpatialIndex'; did you mean 'QRegion'?
static SpatialIndex::Region rect2region( const QgsRectangle &rect )

What is reponsible for rebinding QPoint to Point and QDatastream to IDataStream


texts: Getting days of week from date field, with field calculator?

texts:
I'm using ArcGIS 10.3.3 and have a field containing a date as following format M/D/Y. I need to get the day of the week based on my date field.

I need to do this from the field calculator.

Example of my data:

def dayOfWeek(dField):
dow = datetime.strptime(dField , '%d/%m/%Y').strftime('%A')
return dow

dayOfWeek(!evDate!)

but got error.


texts: Print composer custom grid label problem

texts:
In answer to this question Klas Karlsson puts forward a solution to the problem of formatting print composer grid labels for projected maps.

I'm very weak on scripting, but in QGIS 2.14 I've tried to enter the text as shown in Klas's illustration, which generates error messages. In my case I'm working with a coordinate system that has a six-digit Easting and a six-digit Northing and I'm trying to get a result similar to that shown in Klas's picture (but with a six-digit Northing). Can anyone help me with this?


texts: Get selected features on ArcMap in arcMap Addin (eclipse)

texts:
I am building a custom arcMap Addin button which onclick event tells info about selected features.

Following is my java class ---

public class Break extends Button {

/**
 * Called when the button is clicked.
 *
 * @exception java.io.IOException if there are interop problems.
 * @exception com.esri.arcgis.interop.AutomationException if the component throws an ArcObjects exception.
 */
@Override
public void onClick() throws IOException, AutomationException {
    // TODO Auto-generated method stub

    MapBean mapBean = new MapBean();
    try{
        IMap map = mapBean.getMap();
        ISelection selection = map.getFeatureSelection();
        IEnumFeature enumFeature = (IEnumFeature)selection;
        enumFeature.reset();
        IFeature feature = enumFeature.next();
        while (feature != null){
            System.out.println("FEATURE ID: " + feature.getOID());
            feature = enumFeature.next();
        }
    }
    catch (Exception e){
        e.printStackTrace();
    }
    }
}

I implimented the button on ArcMap but nothing seems to work onclick event , might be its not getting the ArcMap at all.Could anybody tell how to resolve this issue.

Thanks in advance////


texts: Making table from MySQL query with ArcPy?

texts:
I am trying to interact directly with data from a MySQL database in ArcMap using Python. So far, I have successfully connected the database using the MySQLdb.connect() function and have successfully executed queries using the cur.execute() function. I also am able to print the results in the Python window.

I cannot, however, figure out how to create a table from the query output that I can then use to, for instance, join to a shapefile or display XY data. I assumed that the MakeQueryTable_management() function would allow me to do this, but the syntax is very confusing to me. Do I execute the query using cur.execute() and then execute this function, does this function replace the cur.execute() function, or do I do something altogether different?

for example, here is a query:

cur.execute("SELECT count(zip_codes.zip_code) AS Zips, zip_codes.state FROM   zip_codes GROUP BY zip_codes.state ORDER BY zip_codes.state ASC")

so how would I write the MakQueryTable_management() function given this syntax?

MakeQueryTable_management (in_table, out_table, in_key_field_option, {in_key_field}, {in_field}, {where_clause})

I am new to ArcPy.


texts: network analysis that includes user defined nodes

texts:
I want to make network analysis using python. I want that user must be able to select point of interests and calculated route must contain that points.

For example between start and end nodes user, user want to visit 3 different location and calculated route must contain these locations, not just shortest path.

How can I make that? Any opinions?


texts:
I want to create a animate map using the TimeManager plugin in QGIS and then be able to upload it as an assignment at school.

Once it is created, how can I save the animated map as a video?


texts: Error in reprojecting raster from WGS 84 to GDA 94

texts:
I am trying to reproject multiple .tif files with the following code:

# Import system modules
import arcpy
import os

# Set environment settings
arcpy.env.workspace = r"H:\GIS Project\Bulk Density\In Rasters" #The file where your files are
arcpy.env.overwriteOutput = True
outWorkspace = r"H:\GIS Project\Bulk Density\Reprojected BDW" #where you want the new rasters to go
arcpy.env.parallelProcessingFactor = "50"
rasters = arcpy.ListRasters("*","TIF")
print rasters
for inrl in rasters:

        # Determine if the input has a defined coordinate system, can't project it if it does not
    dsc = arcpy.Describe(inrl)

    if dsc.spatialReference.Name == "Unknown":
        print ('skipped this raster file due to undefined coordinate system: ' + inrl)
    else:
        # Determine the new output feature class path and name
        outrl = os.path.join(outWorkspace, inrl)

        # Set output coordinate system
        inCS = arcpy.SpatialReference(4326)
        outCS = arcpy.SpatialReference(3577)

        # run project tool
        arcpy.AddMessage("Reprojecting" + inrl)
        arcpy.Project_management(inrl, outrl, outCS,inCS)

        # check messages
        print(arcpy.GetMessages())

print(arcpy.AddMessage("Reprojection complete"))

print "Script run ok"

I am receiving the following error message:

  Traceback (most recent call last):
  File "C:\Python27\ArcGISx6410.3\lib\bdb.py", line 400, in run
    exec cmd in globals, locals
  File "<module1>", line 3, in <module>
    import arcpy
  File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\management.py", line 8825, in Project
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Dataset or Feature Class: Dataset BDW_000_005_EV_N_P_AU_NAT_C_20140801.tif does not exist or is not supported
Failed to execute (Project).

I do not understand why the function is having troubles when I specifically call for .tif files. The folder does contain .tif files as well.

FINAL EDIT:
Here is my correct code:

# Import system modules
import arcpy
import os

# Set environment settings
arcpy.env.workspace = r"H:\GIS Project\Bulk Density\In Rasters" #The file where your files are
arcpy.env.overwriteOutput = True
outWorkspace = r"H:\GIS Project\Bulk Density\Reprojected BDW" #where you want the new rasters to go
arcpy.env.parallelProcessingFactor = "50"
rasters = arcpy.ListRasters("*","TIF")
print rasters
for inrl in rasters:

        # Determine if the input has a defined coordinate system, can't project it if it does not
    dsc = arcpy.Describe(inrl)

    if dsc.spatialReference.Name == "Unknown":
        print ('skipped this raster file due to undefined coordinate system: ' + inrl)
    else:
        # Determine the new output feature class path and name
        outrl = os.path.join(outWorkspace, inrl)

        # Set output coordinate system
        outCS = arcpy.SpatialReference(3577)

        # run project tool
        arcpy.AddMessage("Reprojecting" + inrl)
        arcpy.ProjectRaster_management(os.path.join(arcpy.env.workspace,inrl), outrl, out_coor_system = outCS)

        # check messages
        print(arcpy.GetMessages())

print(arcpy.AddMessage("Reprojection complete"))

print "Script run ok"


texts: PostgreSQL 9.4.7: PostGIS 2.2.1 via Stackbuilder Checksum issue

texts:
When installing PostGIS via Stackbuilder (3.1.1) I get an error:

"checksum verification failed for: postgis_2_2_pg94.exe! deleting file..."

I've neither seen this in previous installations nor found constructive solutions in the internet.

Download and installation of postgis-bundle-pg94x32-setup-2.2.1-1.exe seemed at first to work properly, but I was not able to add the postgis-extension to my DB. The error was something like

"could not load programs(x86)\PostgreSQL\9.4\lib\rtpostgis-2.2.dll"

But for shure this file is where it belongs and is expected.

Platform is Win10, MS Surface3 based on Intel Atom.

What might have gone wrong here?


texts: ORFEO vs ERDAS: How to extract a good DSM with ORFEO

texts:
I'm trying to use ORFEO to check is it suitable to replace ERDAS to perform DSM extraction from stereo pairs. First thing, I can't use ORFEO for complete Pleiades images, it always crashes (my machine has 8gb of ram and I use Kubuntu 14.04). Second, I started to use a part of my pair to make the process (1024x1024 pixels). This way ORFEO works, but, the resulting DSM is not as good as a DSM generated by ERDAS. Is anyone able to get good results with ORFEO regarding DSM extraction? I've used the same images and area used in this course (https://www.orfeo-toolbox.org/packages/OTBCourses.pdf)

ORFEO DSM:


texts: Cutting line features using polygons in one step?

texts:
I would like to cut a line layer using a polygon in one single step in QGIS.
There is a solution to do that in more steps: First, using Intersect function, line portions that fall within the polygons will be added to one resulting layer.
Using Difference, all other parts that don't fall within any polygon will be another layer. Finally, merging these two layers gives the result I need.

Is there a way to do this in one step?

Beginning: One feature

Result: Three features


texts: Creating Multiple Multi-Band Images in Python

texts:
I am trying to create multiple multi-band images based off of Landsat data in Python. I am using PIL for this. How do I use PIL to create multiple multi-band images at the same time?

Here is the code:

import glob
from PIL import Image

year = 1999
band5_list = glob.glob('LE07_L1TP_037032_*_01_T1_B5.TIF')
band4_list = glob.glob('LE07_L1TP_037032_*_01_T1_B4.TIF')
band3_list = glob.glob('LE07_L1TP_037032_*_01_T1_B3.TIF')

for band5 in band5_list:
    for band4 in band4_list:
        for band3 in band3_list:
            Band_5 = Image.open(band5).convert('L')
            Band_4 = Image.open(band4).convert('L')
            Band_3 = Image.open(band3).convert('L')
            try:
                Veg_Image = Image.merge('RGB', (Band_5, Band_4, Band_3))
            except ValueError:
                print('Impossible to merge. Try again.')
                break
            year += 1
            Veg_Image.save('Landsat_' + str(year) + '.tif')


texts: Selecting all pixels above a given value in a raster in PostGIS

texts:
I have a raster with one band whose value represents the date of the occurrence (a sequential integer). This raster file gets updated regularly, and each time that happens, I need to run a process that extracts the new pixels, converts them to points and populates them in a vector table along with the value and some other data (calculated on the fly and not represented here).

So far I've come up with this

with
c as (select max(date_code) as m from vector_table),
p as (Select ST_PixelAsCentroids (rast) as pixel from raster)
insert into vector_table (geom, date_code)
(select (p.pixel).geom as geom, (p.pixel).val as date_code from p,c where (p.pixel).val>c.m)

The problem with this approach is that in order to get the new pixels I need to convert the whole raster to point in a CTE, and then filter it to just the latest values.

Looking at the PostGIS pixel and band accessors I couldn't find anything that would let me select pixels above a certain value in just one query (except maybe setting everything below, one by one, to no data, which doesn't look like the way to go at all).

Is there a way I can run ST_PixelAsCentroids only in pixels that meet certain criteria in their band value?


texts: Using tempfiles for intermediate dataset in ArcPy?

texts:
I want to create a simple python arcpy script for ArcGIS.

Because in my script I have to many raster and shp where I need only to take
final result I try to use tempfiles for this unusually datasets.
I have read this post for in_memory files and I try

This snippet :

import arcpy
arcpy.CheckOutExtension("spatial")
# Local variables:
dem_tif = "C:/Users/my/path/dem.tif"
slope = "in_memory/slope.tif"
rastertopoint_shp = "in_memory/points.shp"
# Process: Slope
arcpy.gp.Slope_sa(dem_tif, slope, "DEGREE", "1")
arcpy.RasterToPoint_conversion(slope1, rastertopoint_shp, "Value")
..................................................................

But I take this error :

arcpy.gp.Slope_sa(dem_tif, slope, "DEGREE", "1")
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 001167: No extension is allowed for in-memory raster dataset name
Failed to execute (Slope).

How can I work with Python tempfiles in arcpy for intermediate files ?


texts: GRASS GIS - V.VOL.IDW interpolation interpolates same property vertically

texts:
When interpolating a 3D raster using v.vol.idw (ref), the vertical cross section show that the properties are the same vertically.

v.vol.idw input=GEOMOD_March24@Toronto output=April12_Res200x2_24interpolPts column=Texture_mm npoints=24

I am using 24 points as the number of interpolation, and I am wondering if that is too small which results in this continuous.


texts: Assigning accumulating numbers to events along a (river)network

texts:
I have a river network along which there are lake polygons that I want to assign orders to. So from headwaters to downstream I want the order to increase depending on the number of previous lakes.

As of now I have the network in both route and geometric network form and made route events of the lakes, however I can't sort out how to assign the accumulating order to the events.


texts: Is it okay to do analysis on coarse rainfall data, since the area calculations can be highly misleading

texts:
I need to find the area of different classes within the rainfall data, which will be pixel-based, and since coarser data may under and over cover the study area (image below), the area calculations can be wrong. How to deal with it? My professor suggested this: "You can create a buffer of one pixel around India boundary so that you  have data until India boundary if you clip the images with the buffered boundary."
but still, this won't solve the problem as still, the coverage problem will exist.
How to deal with it?


texts: pgsql2shp - fe_sendauth: no password supplied

texts:
I am at a total loss here.  I receive the error fe_sendauth: no password supplied when trying to execute the following pgsql2shp cmd.

  pgsql2shp -f folders/San Bruno/San Bruno.shp -h localhost -u postgres
  -P xxxxxxxx jcfcqrso "SELECT gid, name, geom FROM places WHERE name = 'San Bruno'"

As indicated above I have supplied the password. The installation appears to be fine as pgsql2shp --help returns the help options.  I have verified the syntax of the cmd also.  What does this error mean?

Edit (adding pg_hba.conf settings):


texts: Intersecting two polylines using ArcObjects?

texts:
I have two polylines and would like to find the intersection(s) using ArcObjects / VB.NET.

I'm using the following code:

Dim topoOp As ITopologicalOperator = TryCast(pTestPoly2, ITopologicalOperator)
topoOp.Intersect(TryCast(pTestPoly1, IGeometry), ESRI.ArcGIS.Geometry.esriGeometryDimension.esriGeometry0Dimension)
Dim pOutPointCol As IPointCollection = TryCast(topoOp, IPointCollection)

In the resulting IPointCollection I get all the vertices of the input pTestPoly2, although there should be one intersection of the two polylines.

What's wrong with this approach?


texts: ArcPy script to set TIFF color giving ERROR 000840

texts:
I have a Python script that read csv files containing location and attributes for several objects and put all of them in a geodatabase.
I modified this script adding also a TIFF imagine with the bathymetry of the interested region using RasterToGeodatabase_conversion.

When I open the gdb file in ArcGIS the bathymetry is in black & white and I have to modify it manually.

What I want is to set the bathymetry map colour thought the Python script.

Looking around I discovered that I can export to a xml file template with the changes I have done manually to the bathymetry map using the button Export raster function template... in Layer Propertis\Symbology.

I tried to use this xml file in my script in this way:

mdname = r"D:\Projects\test_map_colour.gdb\GEBCO_Geotiff"
editmode = "EDIT_MOSAIC_DATASET"
editmethod = "INSERT"
funcfile = r"D:\Projects\Stretched.rft.xml"
funcname = "#"

arcpy.EditRasterFunction_management(mdname, editmode, editmethod, funcfile, funcname)

but I obtain the error:

Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.1\helpers\pydev\_pydevd_bundle\pydevd_exec.py", line 3, in Exec
    exec exp in global_vars, local_vars
  File "<input>", line 1, in <module>
  File "C:\Program Files (x86)\ArcGIS\Desktop10.6\arcpy\arcpy\geoprocessing\_base.py", line 510, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))
ExecuteError: ERROR 000582: Error occurred during execution.

I don't think I really understand how to use the EditRasterFunction function neither if this is the right way to do it...
Do you have any suggestion?

I tried to save the modified bathymetry map, with the color and limits I want, into a layer file (.lyr).
Opening the .lyr file in ArcMap, it keeps the settings.
Then I tried to save it into the .gdb file using ArcPy, in this way:

arcpy.CopyFeatures_management(r'D:\Projects\test_map.tif.lyr',
                              r'D:\Projects\test_map_colour.gdb\map')

but I obtain the error:

arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000840: The value is not a Feature Layer.
ERROR 000840: The value is not a Raster Catalog Layer.
Failed to execute (CopyFeatures).

I also tried to export it using ArcMap with Data\Export Data... into the .gdb file, but I obtain the B&W imagine.

Any suggestion?
What I want is to have the colored imagine in the .gdb file, the way to obtain it is not important.


texts: Create RasterSymbolizer SLD style in Geoserver

texts:
I'm trying to create a sld style for my raster, but I'm getting this error :

line 18: cvc-complex-type.2.1 : L'élément 'sld:Normalize' ne doit comporter aucun enfant ([children]) de type caractère ou élément d'information, car le type de contenu du type est vide.
line 28: cvc-complex-type.2.1 : L'élément 'sld:Normalize' ne doit comporter aucun enfant ([children]) de type caractère ou élément d'information, car le type de contenu du type est vide.
line 38: cvc-complex-type.2.1 : L'élément 'sld:Normalize' ne doit comporter aucun enfant ([children]) de type caractère ou élément d'information, car le type de contenu du type est vide.

This is the sld file :

<?xml version="1.0" ?>
<sld:StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:sld="http://www.opengis.net/sld">
    <sld:UserLayer>
        <sld:LayerFeatureConstraints>
            <sld:FeatureTypeConstraint/>
        </sld:LayerFeatureConstraints>
        <sld:UserStyle>
            <sld:Name>ahfir</sld:Name>
            <sld:Title/>
            <sld:FeatureTypeStyle>
                <sld:Name/>
                <sld:Rule>
                    <sld:RasterSymbolizer>
                      <sld:ChannelSelection>
                        <sld:RedChannel>
                        <sld:SourceChannelName>1</sld:SourceChannelName>
                        <sld:ContrastEnhancement>
                          <sld:Normalize>
                           <sld:VendorOption name='algorithm'>StretchToMinimumMaximum</sld:VendorOption>
                           <sld:VendorOption name='minValue'>-55.2689</sld:VendorOption>
                           <sld:VendorOption name='maxValue'>214.7722</sld:VendorOption>
                          </sld:Normalize>
                        </sld:ContrastEnhancement>
                        </sld:RedChannel>
                        <sld:GreenChannel>
                        <sld:SourceChannelName>2</sld:SourceChannelName>
                        <sld:ContrastEnhancement>
                          <sld:Normalize>
                           <sld:VendorOption name="algorithm">StretchToMinimumMaximum</sld:VendorOption>
                           <sld:VendorOption name="minValue">-41.9121</sld:VendorOption>
                           <sld:VendorOption name="maxValue">163.9293</sld:VendorOption>
                          </sld:Normalize>
                        </sld:ContrastEnhancement>
                        </sld:GreenChannel>
                        <sld:BlueChannel>
                        <sld:SourceChannelName>3</sld:SourceChannelName>
                        <sld:ContrastEnhancement>
                          <sld:Normalize>
                           <sld:VendorOption name="algorithm">StretchToMinimumMaximum</sld:VendorOption>
                           <sld:VendorOption name="minValue">-22.1867</sld:VendorOption>
                           <sld:VendorOption name="maxValue">77.2479</sld:VendorOption>
                          </sld:Normalize>
                        </sld:ContrastEnhancement>
                        </sld:BlueChannel>
                      </sld:ChannelSelection>
                    </sld:RasterSymbolizer>
                </sld:Rule>
            </sld:FeatureTypeStyle>
        </sld:UserStyle>
    </sld:UserLayer>
</sld:StyledLayerDescriptor>

I followed exactly the Geoserver's documentation, here is the link

I'm using Geoserver 2.15.2


texts: Can't Form DataFrame from Parallel Offset Output

texts:
I've been developing code to take a .csv with lat-long coords and convert them to LineStrings before creating parallel offsets for them. This has been working so far, but yesterday after clearing my variables, I started running into an error when running my code.
from shapely.geometry import LineString, Point
import pandas as pd
import geopandas as gpd

df = pd.read_csv("***/Kingsboro Rd NE.csv")
df = df.drop_duplicates()

geometry = [Point(xy) for xy in zip(df.lng, df.lat)]
df['geometry'] = geometry
df['agg'] = 1
df_line = gpd.GeoDataFrame(df.groupby(['agg'])['geometry'].apply(lambda x: LineString(x.tolist())), geometry='geometry')
df_line = df_line.set_crs("EPSG:4326")
df_line = df_line.to_crs("EPSG:2240")

df_offset_l = pd.DataFrame(df_line.iloc[0].geometry.parallel_offset(25, 'left', 2, mitre_limit = 100.0))

Everything runs fine until the final line, for which I get the following error:
ValueError: DataFrame constructor not properly called!

As I mentioned before, I have not been getting this error until yesterday, and I need it to work properly to perform the other data manipulation steps following this line of code.
Here's a sample of the input file:

lat
long

33.85556214
-84.35139656

33.85569133
-84.35140193

33.85556214
-84.35139656

33.85553986
-84.35136706

33.85550868
-84.35134828


texts: How can I find the height in for a given topographic  point in QGIS?


texts: How to export the map in very high resolution

texts:
I made a map in QGIS.

Now I want to export the resulting image (layers upon layers) for further processing in GDAL.

The print composer only lets me export an image up to a fixed size. If I try to make it bigger via resolution or paper size, it says there might be a memory leak and refuses to export.

How can I export my map at a very high resolution (think 100k pixels per side)? I know it sounds silly but I really want to do this.

By making a map I mean adding various layers (vector and raster) and styling them. By map I meant the map view or a map view in the composer.

There totally might be a memory leak, I would think the developers removed the error otherwise (it is a non-quitting QGIS message dialog). I have lots of swap space though, so even if, it should be able to go very slowly.

I fully expect this to go above 10 gigabytes as GeoTIFF, that's totally fine for me. One of my inputs is 25G and ideally I would use it at 1:1 scale in my export. I did try the commandline export but QGIS simply quit (or crashed, gotta re-check) without outputting an image.

What I really want to do is create TMS tiles in a specific non-webmercator projection (EPSG:3035). There seems to be no sane workflow for this, so doing it via tif export, then gdal2tiles seems the best way. QTiles does not support anything non-webmercator.


texts: Issue with "Join attributes by field value" on QGIS 3.4.7

texts:
I have a shape file with polygons and a xlsx sheet, and I need to join their tables using Join attributes by field value in the modeler.

At QGIS 2.18 it works perfectly, but in 3.4.7 the join doesn't work, but if I do a manual join at the properties of the shape, the join happens normally.

I´m looking for some help with this tool to use in the modeler.

Both colums have the same type and size. I already tried to reinstall QGIS and tried on different machines.

Here are some prints to shows the issue.

The tables I want to join by the field FUNDO.

Set up for the join.

Nothing could be matched.

Set up for the manual join.

Everything is joined.


texts: Scrape GIS data to find sites that match certain criteria

texts:
I'm an architect (the building kind) that has been practicing open source architecture for a number of years.
All our 'blueprints' are open source and hosted on github.
We have a number of projects we've done in the past, residences, multiple family, etc.
Since we spent so much time developing these projects, it would be awesome if we could redevelopment them again, on another similar site.
The problem is, however, to manually find a site with the same (or similar) criteria (size of lot, setbacks, topography changes, etc.) as the original site would be near impossible.
Would be awesome if we could search/scrape GIS data to narrow down a list of candidate sites that matched the characteristics/criteria of the original site.
Relatively doable?
Perhaps a QGIS plugin?


texts:
I use QgsMapToolIdentifyFeature to trap the featureIdentified signal, so i can get some information from the identified feature and show it in a panel within my plugin.

here is the code, my problem is the connection between the featureIdentified signal and my slot is not works:

def onFeatureIdentified(self, ff):
    print("feature selected")

def run(self):
    f = QgsMapToolIdentifyFeature(self.iface.mapCanvas(), self.iface.activeLayer())
    f.featureIdentified.connect(self.onFeatureIdentified)

i don't know that's the problem in my code since it doesn't raise any error.


texts:
I have a QGIS plugin for displaying feature data and I'm trying to make a custom dialog to prompt the user to change the id of the feature being saved if the id is already in use.

For some reason the QDialog that works perfectly well in a standalone script returns blank when rendered in QGIS. In the following picture you can see both dialogs, the one on the right is the dialog from the standalone script, the one on the left is from QGIS:

The code for both dialogs is the same:

class NewIdDialogue(QDialog):
    def __init__(self, old_id='', parent=None):
        super(NewIdDialogue, self).__init__(parent)
        self.old_id = old_id

        layout = QVBoxLayout(self)

        self.line_edit = QLineEdit(self.old_id)
        layout.addWidget(self.line_edit)

        # OK and Cancel buttons
        buttons = QDialogButtonBox(
            QDialogButtonBox.Ok | QDialogButtonBox.Cancel,
            QtCore.Qt.Horizontal, self)
        buttons.accepted.connect(self.accept)
        buttons.rejected.connect(self.reject)
        layout.addWidget(buttons)

    def get_text(self):
        return self.line_edit.text()

    @staticmethod
    def getNewID(old_id, parent=None):
        dialog = NewIdDialogue(old_id=old_id, parent=parent)
        result = dialog.exec_()
        new_id = dialog.get_text()
        return new_id, result == QDialog.Accepted

The reason why I tried this with a custom QDialog is that the call to the standard QDialog returns a blank dialog with no height, here at least the dialogs are the same size, but all the internal elements are missing.

Any suggestions on how to fix this?


texts: "RuntimeError: Invalid Pointer" error when trying to export raster

texts:
I am trying to create an NDVI image from a Landsat 8 tif image, but I'm having trouble figuring out how to export the NDVI image without getting the "Invalid Pointer" error. I'm working with IDLE (ArcGIS 10.3) as my IDE. Here's my code:

#Import modules
import arcpy
from arcpy import env
from arcpy.sa import *

env.workspace = "C:\\rasterFolder"
env.overwriteOutput = True

#Check out extension
arcpy.CheckOutExtension("Spatial")

#Define raster
inRaster = arcpy.Raster("LANDSAT8_3244532.tif")

#Define bands
red = arcpy.Raster("LANDSAT8_3244532.tif\\Band_4")
nir = arcpy.Raster("LANDSAT8_3244532.tif\\Band_5")

#Compute NDVI
outRaster = ((nir - red) / (nir + red))

### Save raster: ERROR OCCURS HERE ###
outRaster.save("C:\\Users\\asdf\\downloads\\rasterFolder")

How can I export the raster (using IDLE) into a desired folder? Am I using the right method for this?


texts: Feature Class Extents Changed After Import

texts:
I have been tasked with editing the attributes and fixing geometry of a feature class in a shared geodatabase.  The feature class is not in a feature dataset.  I decided to export the feature class into a separate geodatabase with a feature dataset in order to set up topology rules on the data and clean it up.  Once I finished cleaning the data, I deleted all rows in the original dataset and imported my cleaned up data.  Everything worked perfectly.

However, now there is something strange happening with the data.  When I "zoom to layer" on my copy of the data, it does what is expected and shows the full extent of the data:

However, when I zoom to layer of the corrected data after I imported it back into the shared geodatabase, it shows an extent much larger than the actual data:

Each feature class contains identical data.  But when I compare the extents of each feature class, they are different.  The extents of the data in my copy:

The extents of the data after it was imported back into the shared geodatabase:

Is there a way to reset the extent of the feature class?

I'm reminded of a similar issue that has occurred in MapInfo that was fixed by packing the table's geographic data.

Thanks.


texts:
I am new to QGIS.

When I use OSM or Google Maps as a basemap via OpenLayers Plugin, the map should be projected as EPSG:900913. However, the coordinates shown in the status bar are useless for me, what I need to see is lat/lon or UTM.

Is it possible to have another CRS in the status bar than used for the map?

I did find the Coordinate Capture Plugin, which can be used to follow the mouse cursor in another CRS, but this is not handy for me and conflicts with the use of other tools.


texts:
I have a project that involves porting a lot of information from ordnance survey to a spatial database. From that database I'm going to extract the information I need for a routing application. However, I have a problem as I'm not sure how no turn works.

I have trawled through the ordnance survey documentation but haven't been able to work out how  no turn in the environment qualifiers apply. My question is, from the data in ordnance survey, how do you find out which links you can't turn onto (from link x)?

Any help would be appreciated.


texts: Importing shapefiles with unknown spatial reference into feature dataset?

texts: I was wondering if I import shapefiles with unknown spatial reference into a feature dataset, with desired coordinate system, would that work?


texts: getLonLatFromPixel not always correct / consistent

texts:
I have a problem with the conversion from pixel to lon/lat. It's not always correct.
The map is a simple XYZ map. The items on it are dragable. But after I dragged an item it gives me a wrong lon/lat value. Most of the time it's 50 pixels to low.

I've created a grid on the map with lines every 100 pixels. When I move an item on the 3th line sometimes I get 300, other times 250.

Is this a bug in OpenLayers or is there something I did wrong?

groundplan = new OpenLayers.Layer.XYZ(
    'GroundPlan',
    '@Url.Content("~/Centrals/" + ViewBag.Id)/Maps/' + planId + '/${z}/${x}/${y}.jpg',
    {
        attribution: "&copy; Limotec",
        transitionEffect: 'resize',
        maxExtent: new OpenLayers.Bounds(0, 0, 4096, 4096),
        maxResolution: 4096 / 256,
        numZoomLevels: 5
    }
);
map.addLayer(groundplan);

markers = new OpenLayers.Layer.Vector("Markers",
    {
        renderOptions: { yOrdering: true },
        renderers: renderer
    }
);
map.addLayer(markers);

dragFeature = new OpenLayers.Control.DragFeature(markers);
dragFeature.onComplete = function (feature, pixel) {
    var id = feature.geometry.id;
    id = id.replace('Det_', '');

    //var lonLat = map.getLonLatFromPixel(pixel);
    var lonLat = groundplan.getLonLatFromViewPortPx(pixel);
    console.info("Moved detector " + id + " naar " + lonLat.lon + " - " + lonLat.lat + " (x: " + pixel.x + " y: " + pixel.y + ")");

    $.post('@Url.Action( "MoveDet", "Api" )',
        { "centralId": @ViewBag.Id, "id": id, "lat": lonLat.lon, "lng": lonLat.lat }
    );
}

dragFeature.handlers['drag'].stopDown = false;
dragFeature.handlers['drag'].stopUp = false;
dragFeature.handlers['drag'].stopClick = false;
dragFeature.handlers['feature'].stopDown = false;
dragFeature.handlers['feature'].stopUp = false;
dragFeature.handlers['feature'].stopClick = false;
map.addControl(dragFeature);
dragFeature.activate();


texts: Automated/geoprocesing tool to slice, clip, or cut polygons using polylines using ArcGIS Desktop?

texts:
Looking for a simpler method here.

I am trying to split up / cut / slice existing polygons by using existing poly-lines. An example would be splitting a water body or land parcel at the point where a bridge/road crosses it. But the road network may not necessarily result in a closed loop.

Since the poly-lines are not necessarily interconnected or continuous, creating a polygon from them is not an option (which eliminates using the split tool). Also, I have tried using a topology with the geometry, but it keeps failing, probably due to the large/complex geometry.

Current Workflow:
I have accomplished this with the Feature to Polygon tool, combining the lines and polygons together, but it creates additional unwanted polygons anywhere a loop closes. I created a mask of the original polygons, and used this with the overlay->erase tool to remove the unwanted polygons. This still leaves some unwanted geometry (mostly slivers), but is somewhat workable.

This seems like an extremely convoluted and round-a-bout way to accomplish (what seems like it should be) a very simple task.

Other than manual edits, or using a topology, is there is tool that could accomplish this in a single step?

Using:
ArcMap \ ArcInfo Desktop 10 SP5

Edit 1: In my case, it is not actually roads as mentioned above. I have water polygons for a coastal area, and need to split the polygons where rock dams or levees have been put across the waterways. Which are typically not interconnected.

The water polygons have been simplified and repaired, to the point where I would no longer call the data "dirty" just complex and large. But I've got the workaround mentioned above working for this case.

I'm looking more "in general" for a tool that can simply divide polygons using polylines.

Edit 2:

Mapperz:Thanks for the Model Builder suggestion. I am going to use that as a stop gap solution, for now.

Jakub: Thanks for the suggestion. I'm not opposed to a programmatic solution or developing a custom tool, although I've never made one before. I have programming experience, but not in conjunction with Arc. I'd prefer something that directly cuts the geometry though, instead of following the roundabout logistics above. In theory that should reduce resultant gaps, since it wouldn't be subject to multiple iterations of cracking/clustering. Although, I'm not sure that would be as easy or even possible.

Edit 3: I'm looking for something to function like on the left in the image.


texts: ArcGIS REST OD Cost matrix based on matching ID points

texts:
In ArcGIS online it's quite easy to create an OD matrix based on matching ID points. If I have a layer with origins and a layer with destinations, I can easily create a matrix based on a common field. Lets say that origin layer A has a column airport, and destination layer B has the same column, I can generate all routes based on that matching column.
My question is, how can I achieve something similar but using the REST API instead? There is documentation on how to use the OD cost matrix but it doesn't specify any sort of ID matching.


texts: Creating a dynamic drop-down list based on an array expression

texts:
Would it be possible in a QGIS form to create a list of values with the array() function in the expression builder? This array would change, depending on different conditions.
The Value Relation widget is close to what I need, but it has to have one connected table, and the values in the list are only from this table. I'd like to add multiple conditions and values modifications.
Let's say I have 3 layers:

infra, where i'll find the type of infrastructure

geometry
"type"

line
'underground'

'aerial'

telecomLines, where I'll find the size of the lines.

geometry
"size"

line
'big'

'small'

equipment the layer i'll have to edit, where l'll choose the type of equipment to install, I would need an array of possible object to install depending on the intersected type and size. Id like the array to be used as a scrolling menu in the form when creating or editing a point. Depending on the intersecting lines, a filtered list of possible choices would appear.

geometry
"equipment"

point
'big pole'

'large pole'

'high pole'

'small pole'

'thin pole'

'low pole'

'big chambre'

'large chamber'

'deep chamber'

'small chamber'

'thin chamber'

'shallow chamber'

For exemple, for big and underground cables, an array of possible big chambers, and for small and aerial cables, an array of possible small telecom poles.
This Expression would produce the array of possible equipment on a the equipment layer when opening an form.
with_variable('lineType',
            aggregate(
                layer:='infra',
                aggregate:='max',
                expression:="type",
                filter:=intersects( $geometry, geometry(@parent) )),

with_variable('linesSize',
            aggregate(
                layer:='telecomLines',
                aggregate:='max',
                expression:="size",
                filter:=intersects( $geometry, geometry(@parent) )),

if (@lineType = 'underground',
         map_get( map(  'big', array('big chambre', 'large chamber', 'deep chamber'),
                        'small', array('small chamber', 'thin chamber', 'shallow chamber')),
                @lineType),
if (@lineType = 'aerial',
        map_get( map(   'big', array('big pole', 'large pole', 'high pole'),
                        'small', array('small pole', 'thin pole', 'low pole')),
                @linesSize),
--(Else)
array('big pole', 'large pole', 'high pole', 'small pole',
        'thin pole', 'low pole', 'big chambre', 'large chamber', 'deep chamber',
        'small chamber', 'thin chamber', 'shallow chamber')))))

here's a quick map of the exemple on qgis Cloud:
https://qgiscloud.com/nox/filterList/?bl=mapnik&l=telecomLines%2Cequipment%2Cinfra&t=filterList&e=172490%2C6003875%2C174522%2C6004867


texts:
Summarize by right clicking the field in the table of attributes is giving wrong calculations in some cases. We think is because of null values.

The following table is a subset of a larger (>200k objects) table but the results of this subset are already erroneous.

When summarizing the field "name" by right clicking in the table we get these results:

Magnolia and Yucca should give null results in the statistics. Certainly not a min/max of 1 in the case of Magnolia. The full table gives even stranger results. Running the same operation from the processing toolbox Summary Statistics gives the expected and correct results:

This is a major problem that worries us a lot, since this tool is one of the most frequently used and who knows how many times we may have given wrong results.

We have tried this in three different users and computers from ArcMap versions 10.6.1 and 10.3.1 with the same results so it seems it is an old problem. We are opening a case with ESRI. I will comment on the answer from them.

I would be interested to know if someone has encountered the same problem or has some theories. This can lead to errors that are difficult to spot sometimes so I wanted to share this as a question but also as a warning for users using this tool.

Edit: We got a first response from ESRI. They say they are aware of this problem and there is a Bug NIM084228.

They are aware of this since 2012, version 10.1!!

Currently, there are no plans to address this in ArcMap.

I really don't get it. So they know, they don't care, they won't fix it but the tool stays in every next release without even adding a miserable disclaimer.


texts:
I have a shapefile, imported in PostgreSQL using PostGIS when this shapefile is published in GeoServer it didn't show any layer.

I had used EPSG:4326..


texts: Using QGIS to draw a line tangential to an existing circle and parallel to existing lines

texts:
I am trying to draw a line tangential to a circle and parallel to an existing line. I have drawn the rough shape below showing the lines I need to draw as dashed lines.
Using the advanced digitalisation tool I can draw line A parallel to line X and line B parrallel to line Y but I cannot get either tangential to the circle.
I currently have the shape drawn as a polygon however I can draw it as individual lines to create the shape as needed and then trace the lines to create a polgon of the final shape.
I am using QGIS 3.12.1


texts:
I'm not understanding fully how extent is supposed to work in ArcPy/Python. I can't seem to get it to work in a function so I can filter it through my feature classes (FCs). I have read the ESRI help files, but remain confused.

Below is a description of what I am trying to accomplish, followed by the little code I have so far. I think it is an issue with my understanding of how this operation works, but any/all advice is welcome.

A script that will prompt for the name of a File Geodatabase and an XMIN, YMIN, XMAX, YMAX set of coordinates. Then loop over each feature class and determine if the extent of each feature class overlaps this extent. If so, it will also determine how many features are within that extent.
*** Note: It should report 0 for any feature classes that process through the extent but have no features in the extent. Also, check if any of the following geometry operations exist: within, contains, or overlaps.

    import arcpy, os
    from arcpy import env
    arcpy.env.overwriteOutput = True

    #Set user-defined inputs
    gdb = r"F:\....\&&&.gdb"
    XMin = 1260000
    YMin = 337000
    XMax = 1280000
    YMax = 360000

    # Set extent
    def Extent():
        XMin = 1260000
        YMin = 337000
        XMax = 1280000
        YMax = 360000
        try:
             arcpy.env.extent = arcpy.Extent(XMIN,YMIN,XMAX,YMAX)
             extent = arcpy.env.extent
             return extent
        except:
            print ("An Error has occurred in Extent().")
    extent = Extent()
    print extent

    #List available Feature Classes in a List
    def FCs_in_GDB(gdb):
        try:
             arcpy.env.workspace = gdb
             print (arcpy.env.workspace)
             fcs = []
            for fds in arcpy.ListDatasets('','feature') + ['']:
                for fc in arcpy.ListFeatureClasses('','',fds):
                    fcs.append(os.path.join(fds, fc))
            return fcs
         except:
             print ("An Error has occurred in FCs_in_GDB().")
    fcs = FCs_in_GDB(gdb)
    for fc in fcs:
         print fc


texts: MySQL GPS distance calculation is failing

texts:
MySQL 5.6 here. I'm storing GPS coordinates as MySQL Point types in my DB and am trying to build a query that takes a single GPS coordinate (consisting of latitude and longitude components) and searches for any other table records that are within a given distance (in km) from that point.

I'm using this excellent StackOverflow answer as a model to start with.

Here's my table's description:

mysql> describe locations;
+-----------------+---------------------+------+-----+---------+----------------+
| Field           | Type                | Null | Key | Default | Extra          |
+-----------------+---------------------+------+-----+---------+----------------+
| location_id     | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| location_ref_id | varchar(36)         | NO   | UNI | NULL    |                |
| location_gps    | point               | NO   | UNI | NULL    |                |
+-----------------+---------------------+------+-----+---------+----------------+

And here is the result of SELECT * from locations;:

mysql> select location_id, location_ref_id, AsText(location_gps) as location_gps from locations;
+-------------+--------------------------------------+----------------------------+
| location_id | location_ref_id                      | location_gps               |
+-------------+--------------------------------------+----------------------------+
|           1 | 76b3352e-b5a4-42a8-95cf-21686d331bec | POINT(18.469692 -63.93212) |
|           2 | cf85de5b-f91d-4975-88b7-79af478ab297 | POINT(28.469692 -73.93212) |
|           3 | 337bfea2-6e56-45f3-b6f5-43f6d59fe0b4 | POINT(38.469692 -83.93212) |
+-------------+--------------------------------------+----------------------------+
3 rows in set, 1 warning (0.00 sec)

And here's my query when I hardcode a specific latitude/longitude point (28.469692, -73.93212) as well as a specific search radius (1km):

SELECT
  location_ref_id, location_line_1, AsText(location_gps) as location_gps
FROM
  locations
WHERE
  MBRContains (
    LineString (
      Point (
        28.469692 + 1 / ( 111.1 / COS(RADIANS(-73.93212))),
        -73.93212 + 1 / 111.1
      ),
      Point (
        28.469692 - 1 / ( 111.1 / COS(RADIANS(-73.93212))),
        -73.93212 - 1 / 111.1
      )
    ),
    POINT(28.469692, -73.93212)
  )
;

And the results from that query:

+-------------+--------------------------------------+----------------------------+
| location_id | location_ref_id                      | location_gps               |
+-------------+--------------------------------------+----------------------------+
|           1 | 76b3352e-b5a4-42a8-95cf-21686d331bec | POINT(18.469692 -63.93212) |
|           2 | cf85de5b-f91d-4975-88b7-79af478ab297 | POINT(28.469692 -73.93212) |
|           3 | 337bfea2-6e56-45f3-b6f5-43f6d59fe0b4 | POINT(38.469692 -83.93212) |
+-------------+--------------------------------------+----------------------------+

Clearly these 3 locations are not all within 1km of each other, so something is wrong. Can anyone spot what it is?!


texts:
I have created a sde schema in my postgresql database , I check all the priviliedges and everything. I also put the st_geometry.so in lib path of postgresql 9.1.3 installed on the server. I have ArcGIS 10.1

When I am trying to "enable geodatabase" from the database in ArcMap 10.1 I am getting theses errors:

relation "sde.sde_layers" does not exist at character 22
STATEMENT:  select count(*) from work.sde.sde_layers

ERROR:  relation "sde.gdb_items" does not exist at character 15
STATEMENT:  select 1 FROM sde.GDB_ITEMS

ERROR:  function st_geometry_version() does not exist at character 8
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

STATEMENT:  SELECT ST_GEOMETRY_VERSION()::varchar
ERROR:  could not load library "/usr/local/pgsql/lib/st_geometry.so": /usr/local/pgsql/lib/st_geometry.so: undefined symbol: DirectFunctionCall1

STATEMENT:  Create OR Replace FUNCTION public.ST_Geometry_Version() RETURNS text AS 'st_geometry', 'ST_Geometry_Version' LANGUAGE 'C' WITH (ISCACHABLE, ISSTRICT)

I appreciate any help.


texts: Displaying of lake names similar to Google or OSM maps

texts:
This is a lake in Netherlands.

Right side of the image : Points contains names of the lake (red label). I performed a spatial join between the point and polygon in order that the polygon get names from the point shapefiles.

Problem : From the right images Ex:Limmergat is displayed in middle but should be displayed towards the left below.

Are there any other ways to display the labels as seen in left image using Arcgis or QGIS ?
Was doing spatial joint a bad option ??


texts: Problem loading spatialite extension with sqlite3 Python connector

texts:
I am trying to load the Spaltialite extension using SQLite3 python module. I am getting the following error when I run my script.

  EOFError: [Errno 10054] An existing connection was forcibly closed by the remote host

import sqlite3

conn = sqlite3.connect(r'C:\folder1\TestDB.sqlite')
conn.enable_load_extension(True)

conn.execute("select load_extension('libspatialite-4.dll')")

for row in conn.execute('SELECT AsText(Geometry) FROM alaska'):
    print row

I am able to connect to this db and run a non-spatial query without any issues.


texts: Resolution/displaying issue with legend item in QGIS

texts:
I'm having an issue in QGIS print composer. I am using QGIS 2.18.

Some of my legend items are displayed in low resolution or are partially cut off. The strange thing is that some groups of the legend are affected, others not, although they are using the exact same symbol and symbol size etc.
I have tried en-/disabeling the auto-refresh button, created a new legend from scratch and also refreshed several times using the blue refresh circle button (F5). I cannot get it to work though.


texts:
I want to create a circle with IPoint P and radius r in ArcEngine and then I need to cast it to an IGeometry.  Does anyone know how to do this?

ESRI ArcEngine 10 VS2010 C#


texts: Creating conditional style using CartoCSS on a CartoDB view

texts:
I’m generating a view using the query like this in CartoDB

SELECT
  table1.cartodb_id,
  table2.data_count,
  table2.event,
  table1.the_geom_webmercator
FROM
  table1 JOIN table2
ON
  table1.data_id = table2.data_id

In my CartoCSS, I want to set the torque marker color conditionally. Both of the following fail.

  ['table2.data_count' < 10]{ marker-fill: #D6301D; }
  [data_count < 10]{ marker-fill: #D6301D; }

How can I set the CartoCSS to set marker color based on table2.data_count


texts: connect ArcGIS server with different instances of oracle database

texts:
Is it possible for a development team to have personal oracle database instances, for testing purposes, connected with the same GIS server?
In other words I want every user to work with his own data, but use the same services that are exposed in the ArcGIS for server.
I am going to use ArcSDE .


texts:
I made a map with QGIS that I really would like to export in Google map format (Zoom/X/Y.png).

I search everywhere and no comfortable answer was found.

For now, I am making a map using TillMill, export it in MBTiles and then use mb-util (https://github.com/mapbox/mbutil) to convert it to Z/X/Y format.
This is painful, and the QGIs map style interface is much better than the hand coded Carto CSS for TileMill


texts: How to select features from one layer and save them to a memory layer?

texts:
I am new to QGIS Python scripting. I want to select some features from an input layer and save them to a memory layer for further processing. Here is my code:

##Sampled_trees=vector
##Input_field= field Sampled_trees

from qgis.core import *
from PyQt4.QtCore import *

inputTrees= processing.getObject(Sampled_trees)
inputField = inputTrees.fieldNameIndex(Input_field)

tempLayer = QgsVectorLayer("Point", "temporary_points", "memory")

processing.runalg("qgis:selectbyattribute", inputTrees, inputField,0,1,inputTrees)
processing.runalg('qgis:saveselectedfeatures', inputTrees, tempLayer)

When the last line is executed, I get the error:

  TypeError:
  'QgsVectorLayer' object has no attribute 'getitem'

How can I fix this issue?


texts: How do I skip rows with searchcursor based on an interger value

texts: For example, if I have 100 records, and I want to sample 10% of the records. How do I tell the search cursor in arc10 to read the value of the 9th record, or every 10. I tried to do row[0 + count] and updated a count variable += 9 but it said I can't slice a row. Any suggestions, thanks.


texts: Where to set the Bing Map Key in NMF file?

texts:
Where do I have to set the Bing Map Key in my NMF file?

  At ArcPad 10.2, the ability to browse for Bing Map services in the Add Data from Server dialog box was removed. The Bing Map NMF files are included in the Sample directory (\Shared Documents\ArcPad\Samples\Bing Maps). Use the Add Layer(s) tool to add any of these NMF files to your ArcPad map. With an NMF file in your map, your Bing Key entered in ArcPad Options, and an active network connection, ArcPad will automatically download the Bing Map tiles for your map extent.

Source: http://resources.arcgis.com/en/help/arcpad/10.2/app/index.html#//00s10000015z000000


texts: Drawing Line Starting/Ending at Pre-Existing Points in QGIS

texts:
I am trying to create a editing condition with a error message.
The condition is while drawing a new line feature, line should start and end at pre-existing point feature. If user try to start or end line at any other place other than these points, it should show an error message.


texts: Calculating service area for trucking drive time of 11 hrs around point using ArcGIS Network Analyst?

texts:
I see the maximum cut of limit for generating a service area is 5hrs or 300 min from ArcGIS documentation. This is the cut off duration.

If I try to provide beyond that, there is an error popping up.

Error : 030122: Exceeding largest break value
Error : 030024: Solve returned failure.

Is there any alternative to obtain the service area?


texts: Qfield photo functionality - Increment filename

texts:
The question is in the title, when I use the photo functionality in Qfield, it stores the pictures in a DCIM folder, and the filenames are tagged with the time and date. I would like to be able to name the jpg file with the ID of my station.

Also, is there a way to take several pictures on one station, if so how would one do to increment filenames with ID_Station+1 ?


texts: Can transparency on symbols be set within symbology, or only on the whole layer, in ArcGIS Pro?

texts:
I can see how to vary transparency of a whole layer, and also how to vary transparency by attribute.

Assuming that I have set my layer symbology to use Unique Values (e.g., different point colors depending on whether VALUE is A, B, or C), is it possible to set transparency on a symbology level (e.g., A and B are 25% transparent, C is 75% transparent)? I can't use VALUE as the transparency by attribute field, because it's not numerical.


texts: How to re-compile ogrinfo against gdal used by QGIS?

texts:
I just solved Repairing broken GDAL and PROJ.4 on Ubuntu? which was blocking use of ogrinfo and ogr2ogr, only to find that these utilities are garbled in one more way: whenever I run any of these, I get following error (this is for ogrinfo, for ogr2ogr it's analogical):

ERROR 1: ogrinfo was compiled against GDAL 1.9 but current library version is 1.10

I think I understand the cause: I mistakenly installed GDAL 1.9 manually through make-install as suggested here; make-uninstall is not possible for it. Ogrinfo was compiled to this version of GDAL and forgot about version 1.10 shipped with my QGIS (2.10). But I'm stuck here, with no idea how to re-compile ogr against the right version of GDAL.

What I tried:

reinstall QGIS (with sudo apt-get --purge autoremove to clean the dependencies after uninstall)
trash ogrinfo, ogr2ogr and even whole GDAL-1.9 directory; then I have recovered the ogr files but not gdal 1.9, though I can do it any time
few more options like sudo apt-get autoclean

Perhaps I could cleanly purge and install the ogr package if I knew it's exact name. Or do I need to purge the old version completely and then somehow (how?) tell the QGIS installer to install ogr as well?

I searched for all the gdal files on my computer and found that I have files for gdal-1.10 in /usr/bin/ and those for 1.9 in /usr/local/bin/. I manually deleted all the 1.9 files - @evilGenius pointed to this. Now there's just the last step: to point the system to the correct path to the binaries. As /usr/bin/ogrinfo it works perfectly.


texts: What method is used to assign values to raster projected raster cells in QGIS?

texts:
I have a raster in GCS NAD83 with a resolution of 0.008333 (see properties below)

I want to project it to NAD83 /Conus Albers with a new pixel resolution of 2500m. Can I do this using the save as option as shown below? If so, what is the method of assigning new values to the new (larger) cells?


texts: Is it possible to split a polygon inside another one in QGIS simply?

texts: I can split polygon if I put the points of start and end outside the boundaries. How can I do the same if I have a part that I want to split completely inside a polygon. In Arcgis I can do it if the splitting line is self-intersecting but it doesn't work in QGIS. I'm interesting in the existenceof a simple and quick way.


texts: How to model multiple topology classes in one query with ArcGIS

texts:
We have a lot of geographic data with different geometry type in our application, which are persisted in the Oracle 11g database with ST_Geometry supported by Arcgis SDE 10.

The features can be organized with a tree structure:

Geographic Data(shape,name,address)
    ImportantFeature(level,classcode....)
        ImportFeaturePoint
        ImportFeatureLine
        ImportFeaturePolygon

    River
            RiverLine
            RiverPolygon

    Hotel:
        HotelPoint
    School
        SchoolPoint
    ...
        ...

And the origin data are created by Esri FileGeotadabase(.gdb), one feature one table(in arcmap), and then these data are exported to Oracle 11g by SDE.

Now we have database tables:

BuildingPoint
RiverLine
RiverPolygon
.....

And we need to query these data by different criteria, for example, we need to query all the geographic data, all the ImportantFeature data or all the River no matter the geometry type is point,polyline or polygon.

So I create view to make the features together like:

create view xxView as
    select shape,name,address from ImportFeaturePoint
union all
    select shape,name,address from ImportFeatureLine
.....

However I got a very low performance for this solution, check my last post, so I wonder if there is an alternative way to implement my requirement?


texts: QGIS Print composer using margin and scale

texts: When using the Atlas feature in the print composer is there any way of using both the Margin around feature and a defined scale?


texts: Finding highest point of vector with DEM

texts:
What I have is:

ArcGIS 10.4.
DEM raster file.
Feature class "street".

What I need is the highest point of the street.


texts: Alternatives to Shapefiles as open-source, cross platform dataset types

texts:
I am working on software that is very ESRI oriented, but a future version will likely not be using ESRI software. It uses Shapefiles and Geodatabases. I'm planning on getting all of my data to Shapefiles in anticipation for future versions of the software that will likely be on Android and other mobile devices. It appears that Shapefiles are the most common datatype for features in the open-source GIS world, but what are the others, and what benefits do they bring? I'm familiar with GeoJSON and KML, but I'm sure there are others.

I would like to know all options, but I am particularly interested in dataset types best suited for storing on mobile devices (the data must be accessible without an internet connection).


texts:
I have a shapefile (my basin limit) and one raster file that I projected it to the shapefile coordinate system and set its cell size to 1000m(area=1Km2). my basin area is 5400 Km2 and it should contain almost 5000 cell of raster file at least. but just one and a half cell put on this range.
what's the problem?


texts: How do I file a QGIS bug report through alternative means?

texts:
I have tried to file a bug report per the instructions on the QGIS get involved page.
Signed up for an osgeo account, but keep on getting kicked off.

It could be my connection (Wireless DSL, wildly varying speeds, and connection reliability)

The bug refers to Version 2.14.---  GPS Information module which does not record a point.  There are two other questions/reports concerning this here starting on May 28th.

Can someone else report this, or provide a solution so I can file the report myself?


texts: how to use the TRIM function in field calculator

texts: I need to remove leading spaces in a field in my attribute table, but not how to do it from the field calculator


texts: Is there a way to set a geometry filter on a esri.layers.FeatureLayer?

texts:
Suppose I want to limit the extent of a feature layer to a geometry (say a circle).  Is that possible?

I am aware of setDefinitionExpression but that is limited to a attribute filter.  There seems to be nothing like a setGeometryFilter.

If not it would be nice to get a "before-apply-filter" event where we could modify the underlying query.


texts: ArcGIS 10.1 - Re-writing an add-in application from processing an SDE Geodatabase to processing a file Geodatabase

texts:
ArcGIS 10.1- I am planing to re-write an Add-in application targeting SDE Geodatabase(ArcObjects) to an add-in application targeting file Geodatabase.

The Add-in application is a Tool that allow the end user to select a set of features and return the list of attributes values related to the selected features into a combo box. I've also another button on the toolbar that perform upstream tracing following the user placed point on the feature.

I am looking at what are the changes that I have to make and best practices to use.

Any input will be appreciated.


texts: Get no map with a WFS request using OpenLayers tool

texts:
I tried to insert a map in my page with a WFS request and using OpenLayers tools. I followed the same example here: http://openlayers.org/en/v3.6.0/examples/vector-wfs.html with the vector part but I get just a white page with no errors:

This is my code :

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.6.0/ol.css" type="text/css">

and this is my WFS request URL: http://localhost:8080/geoserver/opengeo/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=opengeo:comgeo&maxFeatures=50&outputFormat=application%2Fjson


texts: Can auto fields be added to existing address locator schemas?

texts:
There is a type of address locator that comes as part of RouteSmart for ArcGIS plug in. When this address locator is used to geocode it gives a match status field and a street ID field. Is it possible to duplicate these fields in the add locators schema but turn off the update behavior? I want to keep track of what doesn't automatically geocode and when a point is moved around the corner, which changes it's original link ID.

Thought maybe something like this?

<outputs>
                    <output component="Shape" type="geometry"/>
                    <output component="Status" candidate_mode="false" length="1"/>
                    <output component="Status2" #(I added this as a possible way to duplicate. Can I make a change here so it doesn't auto update)candidate_mode="false" length="1"/>
                    <output component="Score" type="float" decimal_digits="2"/>
                    <output component="Match_addr" length="120"/>
                    <output ref="House" batch_mode="false" length="12"/>


texts: Calculating Shannon's diversity using moving window in R

texts:
I have a raster where each pixel is a particular vegetation type. I'm interested in the diversity of vegetation types around each pixel.

I'd like to assign a Shannon's diversity index value (see this link for equation) to each pixel based on a moving window analysis of surrounding pixels.

I've come up with some code to count the number of unique values in the moving window using functions in the raster package (at least that is what I hope it is doing!), but I am having trouble with the rest of the needed code.  Here is what I have so far:

fw<-focalWeight(veg_map,5000, "circle") # creates circular filter with a radius of 5000m
test_fcl<-focal(veg_map,w=fw, fun=function(x,
          ...){length(unique(na.omit(x))) }) #counts unique values in moving window #  (e.g. species richness)

The part I'm having the most trouble with is finding the proportion of each unique type within the moving window.  From that I could calculate several metrics of diversity, including Shannon's.


texts: Transfer indexed Oracle geoloc table to PostgreSQL using ogr2ogr

texts:
I am copying tables using ogr2ogr from Oracle to PostGIS using

 ogr2ogr -f "PostgreSQL" PG:"host=<host> port=5432 user=<user> dbname=<dbname> password=<pwd>" OCI:<USERNAME>/<PASSWORD>@<SID>:<table>

This command fails to copy indexed tables, but works on regular tables.

ERROR 1: ERROR: permission denied for relation spatial_ref_sys when copying <table>@AWS

This might be related to https://github.com/hdknr/note/issues/11

Update: By indexing I mean these commands in Oracle:

INSERT INTO user_sdo_geom_metadata VALUES ('my_table', 'GEOLOC',  MDSYS.SDO_DIM_ARRAY(
  MDSYS.SDO_DIM_ELEMENT('X', -180, 180, 0.0005),
  MDSYS.SDO_DIM_ELEMENT('Y', -90, 90, 0.0005)),  8307 );
--Commit
CREATE INDEX my_table_IX ON my_table(GEOLOC)  INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS ('SDO_INDX_DIMS=2')

What is the right way to copy an indexed table?


texts:
Our office is using QGIS to design zoning maps.

Our maps display the zones in colors (area shapefile with "Zone" text attributes) and the parcels with a thin outline and the number as label (area shapefile with "Parcel #" integer attribute).

What would be the best way to be able to output a list of all parcels with their area and their land use ? (note that some big land lots may be divided in different zones, so some parcel would appear twice, with let's say 35% of their area for residential zone and 65% for commercial zone)

I thought of "splitting" the zone polygons with the land lots polygons (think of a puzzle-shaped cookie cutter). But I can't seem to find such a function.

I thought of going the other way around, by performing a spatial join of the zone attributes into the parcel polygons. But this doesn't seem to work neither because it joins the first polygon it touches, and there seem to be no way to tell it to join the polygon which it overlaps the most.

And idea ?!

Thanks !!

(and sorry for english mistakes ;) )

Olivier

Edit :

Ok, UNION seems to be the function I need ! Thanks Rayer !

However, I tried it on my data, but it doesn't work at all. I get no error, but the progress bar doesn't move at all and I have to force quit QGIS.
I tried on a very small dataset, and then it works well.

My datasets consists of about 1000 zone polygons and 3000 land lots polygons. Is there a chance it would work with this amount of data ?

Thanks !

Still didn't find a way to do what I want... In fact, I didn't see there were some notifications in the console as soon as I run the UNION command :

Message: "Feature geometry not imported (OGR error: )"
Level : 0
The messages appears many many times (quickly fills the console), about 10 every second (when looking at the timestamp).
At the end I get a shapefile with no content.

Any idea about what's going wrong ?

(by the way, is editing the initial message the right way to continue a discussion in this forum ? or should I rather answer to my question ?)


texts: How to resolve "premature end of script headers" error with QGIS Server?

texts:
I attempted installing QGIS Server following these instructions.

Installation was successful with no errors reported.

However, when I try to use GetCapabilities I am getting this error:

  Internal Server Error

  The server encountered an internal error or
  misconfiguration and was unable to complete your request.

  Please contact the server administrator, admin@local.domain and inform
  them of the time the error occurred, and anything you might have done
  that may have caused the error.

  More information about this error may be available in the server error
  log

I looked for the error in Apache's logs and found this entry:

[Mon Oct 28 16:02:40 2013] [error] [client 127.0.0.1] Premature end of script headers: qgis_mapserv.fcgi.exe

Can anyone suggest how to troubleshoot this issue?


texts:
I am making a tool in ModelBuilder that will allow me to create a fishnet (using Create Fishnet tool) and add field called "Reviewed" in one swoop. I want to use this when QCing data. I can add the field manually no problem, but when I run it through ModelBuilder I get the error below.

The error says it is not valid or it doesn't exist.

I checked with the fishnet and it looked fine. I am not sure what the disconnect is between this step and the Add Field Step.

I tried Parse Path, thinking it was reading the entire Output Feature Class string as the table, but it will not allow me to use that as the input table because the Parse Path returns a string and not an object.

Edit to add current model:


texts: VDatum to transform MHHW to WGS84 error code

texts:
I am using VDatum vdatum.noaa.gov/ to transform the vertical coordinates of a surface from MHHW to WGS84.
I am getting the error code below:

Exception in thread "C:\Users\User\Desktop\Honduras\O_file.tif" java.lang.NoClassDefFoundError: Could not initialize class gov.noaa.vdatum.filetransform.geotiff.Geotiff_Reader
        at gov.noaa.vdatum.filetransform.geotiff.GEOTIFF.getReader(Unknown Source)
        at gov.noaa.vdatum.filetransform.FileTransformNADCON5.run(Unknown Source)
        at java.base/java.lang.Thread.run(Thread.java:834)

I created a grid of points with lat, long, and the Z value=0 in excel.

I saved this as a csv and opened it in ArcGIS 10.6

I converted it to a raster with Z data.

I exported it as a .tif and as a shapefile.

I tried using the .tif and the shapefile as inputs in VDatum. Neither worked. The .tif produced the error code above.

I have no idea what is wrong--maybe the way I created the .tif? Maybe the specific transformation I'm performing and the lat long values in my file? Maybe I chose the wrong WGS84 as the output coordinate system (there are 3, and I don't understand the difference.)


texts: Seeking 3rd party / API way to access exported ArcGIS/Esri style information?

texts:
I am writing a GIS app that allows import of various file formats, and I want to include an importer for data coming out of ArcGIS. My understanding was that Geodatabase was the default format for sharing ArcGIS data, and I am familiar with the C++ SDK API they provide for reading Geodatabase.

I asked this question:

Does Esri Geodatabase contain style information?

and learned that a Geodatabase itself does not contain styling information.

But if Geodatabase doesn't contain style info, it made me wonder how ArcMap users share data with each other when they want to include styling information.

I learned that styling information for an Esri map can be found (along with the geometry data) in a Layer Package or a Map Package.

So I am now trying to understand if there is a documented way for me to read the style information from a Layer Package or Map Package. But even if there were, I don't know if there is a way for me (as an app external to ArcMap) to read the geometry out of a Layer Package or Map Package. (I don't know, for instance, if Layer and Map packages include a Geodatabase as a subset of their data, and I could read that Geodatabase using the API SDK.)


texts:
I receive the following error running 3.8 on macOS High Sierra - thoughts?

Couldn't load plugin 'AusMap' due to an error when calling its initGui() method
AttributeError: 'NoneType' object has no attribute 'get_groups_with_layers'
Traceback (most recent call last):
  File "/Applications/QGIS3.8.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 359, in startPlugin
    plugins[packageName].initGui()
  File "/Users/new/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/AusMap/aus_map.py", line 111, in initGui
    self.createMenu()
  File "/Users/new/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/AusMap/aus_map.py", line 131, in createMenu
    self.config.load()
  File "/Users/new/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/AusMap/config.py", line 29, in load
    self.am_config.load()
  File "/Users/new/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/AusMap/am_config.py", line 41, in load
    self.background_category, self.categories = self.get_kf_categories()
  File "/Users/new/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/AusMap/am_config.py", line 55, in get_kf_categories
    groups_with_layers = self.kf_qlr_file.get_groups_with_layers()
AttributeError: 'NoneType' object has no attribute 'get_groups_with_layers'


texts: Using CanVec from Natural Resources Canada?

texts:
It has now been a little over 3 years since Natural Resources Canada released CanVec, a national coast to coast to coast spatial dataset at 1:50,000 or better nominal scale. In the interverning time there have been several updates, we now sit at Edition 6, and there are scheduled updates every 6 months, indefinitely.

Canvec replaces the National Topographic Database (NTDB) which was both expensive, ~$240 per NTS tile if memory serves, and definitely not libre. With the NTDB we had to pay royalties for every map that went to another party, even if we gave it away. The royalty was reasonable, on the order of 25 cents each, but we had to pay in advance, in $5,000 chunks, with a minimum of $8,000.

Canvec is a well modelled internally consistent dataset of good quality, better than the NTDB, and it's FREE, both libre and gratis. What puzzles me, greatly, is the virtual silence online* about this fantastic resource. There is little chatter about Canvec. Perhaps this scale of data just not that relevant south of 60°N and you're using something different. Perhaps the naming conventions are so opaque that people just can't drum up the energy to figuring out what's what.

Where are the resources and tools to make using this stuff easier (or even possible)?


texts: Problems with french coordinate systems (i.e. Lambert Zone I, EPSG 27571)

texts:
I'm working on a coordinate library implementation and I seem to be stuck with the French Lambert coordinate systems. I'm using this page as a reference (can anybody confirm the results there are accurate?)

The individual steps in the conversion seem to fit, but my overall result differs up to 50m from the one computed on that web site.

Now step by step: I'm converting as an example the point 2.1°E, 49.8°N from WGS84 to EPSG27571 (NTF Paris / Lambert Zone I)

WGS84 -> WGS84 Geocentric: 4122109.79, 151150.90, 4848460.24 (meters)
WGS84 Geocentric -> NTF (PM Paris) Datum conversion using Bursa-Wolfe: 4122273.66, 151210.75, 4848135.39 (meters)
Geocentric -> Geographic, including meridian shift to Paris: -0.004127387, 0.86917528, -49.58 (radians)

I'm quite sure the result is right so far, because these are the same values than said web page returns when using EPSG 4807 as target CS (and converting from grad(!) to radians).

Geographic -> Projected coordinates using lambert conformal 1sp, with latitude of origin = 0.86393797974 rad, longitude of origin = 0, False easting 60000, False northing 1200000, Ellipsoid Clarke 1880 IGN: 582974.00, 1233402.04, while expected is 582976.09, 1233397.93. Offset is about 3-5m here.

I have verified the lambert conformal projection using an example for EPSG 24200 JAD96 Jamaica, therefore I also think that the projection itself is right.

The error increases the farther away from Paris I get. Not including the false easting or false northing values, the error (quotient between right and wrong values) is in the order of 0.997-0.9998. This looks like some scaling problem, and the WKT description for EPSG 27571 mentions some scale, but I have no clue where to apply that. I do have a scale in the datum, though.

Now: Where is the error?


texts: GetLegendGraphic from layergroup in Geoserver 2.8.2

texts:
I am working with Geoserver 2.8.2

I am requesting a GetLegendGraphic to a layer group that holds three layers, each layer with one single SLD styling.

I am getting a legend from Geoserver, but not as desired. The legend is showing the name of the layers in the layergroup and i do not want to show the layer names, i just want to show the labels (forceLables:on), but not the layer names!

Is there any way to do that? Any vendor parameter that can handle it?


texts: Exporting list of Feature Classes to CSV using ArcPy and Python?

texts:
I am successfully using the follow script

import arcpy
from arcpy import env
import os
env.workspace = ("WORKSPACE")
fcList = arcpy.ListFeatureClasses()
print fcList

to export feature class names from a workspace.

I'd like to export the results to a CSV file (creating a simple one column list of Feature Class names); I've looked into the Python help guide but am struggling with the syntax and where to place the csv.writer and import csv functions.

How do I get the results to be written to a csv file?


texts: GRASS GIS: connecting vertices with lines along following Node Number

texts:
My goal:

Convert vertices to a poly line describing the general route to have 1 line describing the center line of a river.

Limitation:

The whole process has to be automated.
The raster can contain gaps.

The initial input is a raster containing a scan of a proposed river. This scan is of very low resolution (see yellow resulting pixels in picture). I have processed this as follows:

r.mfilter: High pass filter to sharpen the river using
r.reclass to reclass all non-river pixels to NULL
r.to.points to get the vertices of the raster cells

Result:

Now I want to connect these points to get a generalized (smoothed) line describing the points. I do not have a specific network to do a network analysis. Converting points to lines results in too many lines.
Also, the nodes number does not correspond completely to the desired trajectory.

Any recommended approach or a different approach altogether to reach the desired result?

@MarkusN:


texts: I have a very big KML file, I want to remove all the placemarks from it

texts:
I want to remove all the Placemarks that has a name, and keep the lines which is between , as the performance of the file is awful

I've tried to do it using Notepad++ Replace function using the below

<Placemark>       <name>.*</name>

to be replaced by

<Placemark>       <name></name>

and its not working :(


texts: Replacement for pgr_pointToEdgeNode for pgr 3.0

texts:
I am working through the book 'pgRouting: A Practical Guide' and have come across a function that has been deprecated.  The function is pgr_pointToEdgeNode. Is there a similar function I can use to convert a point to a vertex_id based on closest edge?

This is a link to the function from version 2.1.0.


texts: Different coordinate systems match in QGIS but not in ArcGIS

texts:
I have digitized some shapefiles (polygons) in QGIS. Some polygons have the CRS 5678 DHDN 3-Degree Gauss Kruger Zone 4 E-N and the rest have the CRS 4326 WGS84.
The Project coordinate system is also 5678 DHDN 3-Degree Gauss Kruger Zone 4 E-N.

But I don't know why they match on the map.

Then I load the shapefiles into ArcGIS and because of the different coordinate systems they don't match there. I have tried anything (project, transform, reproject) and Google can't help me but I need the shapefiles to match in ArcGIS.

Can anybody help me?


texts: Combine overlapping rasters with priority to values of specific rasters?

texts:
I have 5 rasters that cover a large area. I want to combine all 5 into 1 raster. Each raster has data for portions of the total area that none of the other rasters cover.

Raster C overlaps A,B and D. While E overlaps D. No other rasters overlap each other.

On the portions that are overlapping, only certain Rasters contain the data that is needed to be displayed. The following shows which Raster are needed to be displayed.

Raster C > A

Raster C > B

Raster C > D

Raster E > D

I've tried Mosaic to New Raster, Mosaic Dataset and Mosaic (Data Management), all unsuccessful. The result is only the first Raster. The Blank area has a Value of 0, which I believe is overlapping the other rasters value when I combine them. How do I display the Values > 0 when I combine the Rasters giving priority to the values of Raster C when combined with A,B and D and Raster E when combined with D?

The edges of Raster D that overlap C and E have missing data as seen below.

ArcGIS 10.1, advanced arcinfo license.

Edit: I've tried all the suggestions below and here are results:

Above: This is Radouxju's suggestion using raster calculator with IsNULL, the resulting image is Raster C and I tried to overlap only D, D's area is not present. It is an exact image of Raster C.

I also tried Raster to New Mosaic with FIRST and LAST, the resulting image was the same as above, but with colour.

Above: This is Cody's suggestion using Mosaic Dataset and setting priorities, as you can seen the 0 Values overlap the other Rasters depending on their priority. This image is an example/ test to visualize what happens, the priorities here are B > CE > AD.