texts: Displaying flow direction raster in QGIS?

texts:
I have a raster with flow directions (geotiff). In ArcGIS I can use the vector field symbology option to display nifty arrows (see image). Is there a way to accomplish something similar in QGIS? I've looked at previous questions that suggest using the GRASS tool r.to.vecbut it is already running for 5 minutes on a relatively small 4320x2610 raster. Trying the method using r.to.vec on a sample extent works but I am looking for a method that works with larger rasters.

[EDIT] The original r.to.vec would result in a  4320*2610=
11,275,200 point shapefile. For displaying purposes it would be better to leverage a pyramiding policy using some sort of plugin and on-the-fly analysis.


texts: How to calculate a map scale with bounding box, width and height?

texts:
I have a map that will allow the user to select or slice images/pictures out of it.

As example a map width is 1200px * 1200px and the user selects say 700px x 700px square (note: aspect ratio is preserved) I grab the bounding box for that selection and I ask the tile server to generate a 1400px * 1400px image. That being said, I believe the scale of the image changes (ex. 1 inch equals 500feet) as its size change.

So I am trying to re-calculate that new scale level.

Scale is defined as the ratio of the distance on a map to the corresponding distance on the surface the map represents.
The distance on the map is the scale given.

How to calculate the corresponding distance on the surface the map represents?

Example: I have bounding box

-10655713.482723532,4537884.8313487405,-10650238.680572607,4543359.633499665

The map says 1KM or 3000feet when I grab it. The bounding box width and height on the map is Width : 573px / Height: 573px.

Now I want to resize the image to be 900px by 900px and re calculate the scale, because the scale value changes as the size of the image changes.


texts: Change attribute of a line according to overlapping polygon features

texts:
I'm pretty new to QGIS and python in general. For my work I'm faced with a bit of a problem.

I got 100-m-segments of several streams and polygon-features of the surrounding substrate. The polygon features determine if sand, gravel or stones are the primary substrate in the stream segments.
So I tried using a simple spatial join. If I do that however only the segments that are 100% inside a certain substrate are correctly joined.
If a segment is overlapping with two substrates, then the bigger overlapping polygon (> 50%) should be used as the primary substrate.

Is there a plugin for QGIS (version 2.18) that can do this? Otherwise, how can I create a corresponding Python script?

I searched for hours and found similar problems only with two polygon features so I tried to modify a script but failed. (Percentage of polygon in one shapefile within polygon of another)

Here's an example of overlapping substrates:


texts:
I'm sorry this might be duplicate. I'm trying to call stored proc with sql server. I saw this question which says its not possible but its a 5 yr old question and thought I'd check if there have been any improvement since.

For my part, I'm creating a layer as sql view and here is my query:

Exec [GetSPData]

I'm getting the following error:

2018-06-11 11:54:12,203 INFO [geoserver.web] - Error testing SQL query
java.io.IOException: Error occurred building feature type
    at org.geotools.jdbc.JDBCFeatureSource.buildFeatureType(JDBCFeatureSource.java:375)
    at org.geotools.jdbc.JDBCDataStore.createFeatureSource(JDBCDataStore.java:977)
    at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:395)

... truncating the stack

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'EXEC'.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1655)


texts:
I want to go from
http://www.zolnai.ca/WMS/whereintheworldV2.htm
to
http://www.zolnai.ca/WMS/whereintheworldV3.htm
I went through Gmaps API documentation on code.google.com and added the changes that I could find, but I cannot get the V3.htm to display anything.

Comments or suggestions please?


texts: Can REST or the ArcGIS API for Flex read VAT tables from a Raster?

texts:
When publishing a bare earth DEM that has a VAT table, or value attribute table "A VAT is a table containing attributes for a grid, including user-defined attributes, the values assigned to cells in the grid, and a count of the cells with those values"

...The fields are empty in the REST service where there should be values.  Anyone know how to consume the VAT table that resides inside the gdb.?

I want to be able to use the identify tool to depict elevation values.


texts: Select all points that fall within any polygon from multiple layers

texts:
I'm using MapInfo and would like to achieve the following:
Find out all the points that fall within any of the polygons on screen, and which polygons they are contained within.
The data I am working with:

As you can see, there are about 30 different layers. So far I can only see myself going through each table with an SQL statement as I cannot seem to do it in bulk (or statement between multiple tables generates errors regarding join), but then this could produce 30 different files that then need sorting.
Is it possible to do an update table? For example a new column titled "Overlap" which will print the name of the polygon it is contained in or the layer name.
I am open to suggestions.


texts: osm2pgsql backwards compatability issue during my biannual elevation contours import process

texts:
Every two years when I upgrade to the latest debian stable I start from scratch with my elevation contours pgsql/postgis database.  This year I spent an entire day trying to find some new combination of work flow that would allow me to import the data successfully. My old work flow goes like this:

unzip srtm3 data
create osm file using phyghtmap version 1.47
import osm to pgsql db using the following command:

osm2pgsql -d contours --style [path to style file] (add -a for subsequent imports)

(with osm2pgsql v0.92) I first ran into memory issues, which forced me to use -C (cache) and -s (slim) options. The first file imported ok, but the next one took 300 some seconds at 0.4k/s. If you assume 1 osm file for each of the 550 srtm3 zip files to be converted/imported this works out to over 45 hours.  Actually, it would take much longer since phyghtmap spits out sometimes 5 or so osm files for a given zip archive. So this is not feasible, and this process used to take me only 6-7 hours with older versions of osm2pgsql.  So after a day of trying everything I could think of including combining the osm files prior to import using osmconvert and osmosis (this resulted in garbled data verified in qgis), I gave up and went searching for an older version of osm2pgsql.  I compiled version 0.86 from source, and bam, I was back on track with my old work flow.

So finally my question is this: is the old behavior of osm2pgsql gone forever or can we resurect it just as a cli switch?  It seems to me the problem is all the indexing that is being done on each import, but I do not see any switches that allow that behavior to be turned off.


texts: in a single vector layer I have a three of polygons with different field values (e.g1,2,3). How Can I color each field value polygon differently?

texts:
In a single vector layer I have a three  of polygons with different field values (e.g1,2,3). How Can I color each field value polygon differently?
To explain a bit more my three polygons are showing the levels of risks. I would like to demonstrate red color where ever the polygon field value is 3 and blue where is one.

I can show the polygons field attribute value (number as text) on the map using labels but can not use the value to illustrate different color for each field attribute value.


texts: Creating multiple, independent Gaussian plume outlines in ArcGIS

texts:
In an effort to create buffers that preferentially capture downwind populations of numerous air pollutant sources, I would like to create Gaussian-like plumes in arcgis (or in another program such as ALOHA that can easily be imported into arcgis). I have several US states broken up into 36x36 km grids, each with an assigned mean wind speed, direction, and other meteorology, and population counts. I would like to capture the downwind populations that would be exposed to emissions from each grid. "Downwind" can be defined in many ways, and one approach would be to create a Gaussian (or Gaussian-like) plume for each cell and then use a portion of them as buffer outlines.

However, I have not come across any clear method of creating buffers that can be weighted toward downwind areas, or a method of creating Gaussian plumes within ArcGIS. Any ideas?

Also, I posed a similar question here:  Creating vectors based on U and V values using ArcGIS Pro?

The suggested solution is different from what I am asking currently, but the background information may be helpful.


texts:
I have a state layer with counties outlined I've joined an .XLSX file on County_Name with populations.  Finally figured out how to do a graduated symbology but when I run it I get the highest symbols and the rest of the display is blank; I lose the outlines of all but the displayed symbols.
Does what I want in ArcGIS 10.6 and trying to replicate in QGIS 3.8.1.
It's probably something simple that I've just overlooked.
Not a GIS professional, just a dabbler.


texts: What suit of components do I need to get installed to start with QGIS?

texts:
I have a requirement for a GIS product and following advice from firends and colleagues have decided that Quantum GIS seems suitable for what I need. I have input a request to our IT section to install it on our network laptop but this needs to be done by an engineer because of prohibited install functions as is normal on corp networks.

Anyway - my question is, i will be using QGIS to interpret things like Ordnance Survey Codepoint with polygone and Boundary data to make bespoke geography shapefiles of our organisational areas  (made up from clusters of postcode districts).

Could you advise what suit of components i would need to request to be installed to start with (so that i can get up and running without having to raise seperate requests to bolt on plugins at a later date).

Any help appreciated - can't wait to get started on it!


texts:
I have been given a large dataset of X,Y positions of animal movements in a generic grid system.  It uses 0,0 as an origin and then position units are in feet from origin.  I have the geo-referenced coordinates for the origin of the generic grid in the real world and would like to convert the entire grid to the coordinate system. One complication is that the x-axis of the generic grid is ~-38.4 degrees off of equatorial flat. They used a structure as their x-axis plane.   Any tools or techniques that would enable this?

Basically the manufacturer of an animal tracking system dumped this generic X,Y grid on us and I need to overlay with geo-referenced imagery.


texts: How to connect a dbo database through the add database server in ArcCatalog?

texts:
I am trying to add my database through the "add database server" so that I can add users and maintain their permissions. We are running a dbo schema and our spatial database connection is working but not the server itself. Our database is running a SQL Server 2008 full edition instead of the Express edition.

When we are prompted to enter it, we enter ourdatabasename\sqlserver2008. Is this correct?


texts: Merging Raster: ImportError: No module named _gdal_array

texts:
When I try to merge rasters I got following error message:

  _gdal_array = swig_import_helper() File "C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\osgeo\gdal_array.py",
  line 18, in swig_import_helper import _gdal_array ImportError: No
  module named _gdal_array

I tried to update Qgis to 2.2 and did a the whole OS4GEOW installation, as recommended in an other thread.


texts: Does the ArcGIS JavaScript API let me build / package my application using Dojo?

texts:
I'm currently getting to grips with the new (3.1) ArcGIS JavaScript API and how it bundles Dojo and relies on Dojo's Asynchronous Module Definition (AMD) approach.

I'm familiar with AMD and recently completed a project using Require, Backbone, and OpenLayers in combination - overall a very pleasant experience.

However I'm worried by

how tightly-coupled Dojo is with the ArcGIS JavaScript API,
that trying to use Require instead of Dojo AMD throws an exception, and
that Dojo AMD doesn't seem to have the same user-base and momentum as Require, making it difficult to research / resolve problems without hitting the forums

My main concern is that I will write an ArcGIS JavaScript API application and not be able to build / package it into a single / small number of scripts. This will leave me with an application making 100+ HTTP requests at startup for all of the modules it depends on.

I've seen this article covering 3.0 but it doesn't mention the build process and I believe 3.0 is quite different. I've also seen this piece on building / packaging an application that uses the ArcGIS JavaScript API but the comments suggest this is pre-Dojo 1.7 AMD.

Have ESRI really only half implemented the AMD approach, and in a way that will actually make my application slower? Why can I not find ESRI documentation on building / packaging a JavaScript API-based application?

Any thoughts or experience here would be much appreciated.

EDIT Based on the answers so far it seems that no, ESRI hasn't provided any information on building your Dojo application after inflating the number of scripts involved. It seems the only useful information available is from non-official sources and slightly outdated (enough to cause problems). This leads to me wonder why more people aren't vocal about the API's new improvements / deficiencies

am I being too critical / demanding in expecting some more information here?
is no one using the latest version of the API?
should I use an older version of the API that doesn't depend on AMD?


texts: Using external images on geoserver with dynamic url

texts:
I'm trying to get dynamic icon loading based on an attribute in GeoServer 2.9

My SLD:

<sld:ExternalGraphic>
    <sld:OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="icons/$(strReplace(strReplace(iconPath,'.','/',true),'/vsd','.bmp', false)"/>
    <sld:Format>image/bmp</sld:Format>
</ExternalGraphic>

iconpath attribute example:

Spot.Undefiend Spot.vsd

wanted url path:

icons/Spot/Undefiend Spot.bmp

I can't seem to get this working, the log isn't helpful either.


texts: More than one QgsPalLayerSettings for a layer

texts: Can more than one QgsPalLayerSettings object be defined for a single vector layer? For a line layer, I would like to put some text above the line, then some text below the line, not sure if this is possible or how


texts: Python Error using Clip Tool: 000732: Dataset does not exist or is not supported

texts:
I'm getting Error 000732 Dataset does not exist or is not supported.

I have tried formatting my files names as "\", r (explicit text) and forward slashes and none seem to work.  (I've also verified that the datasets do indeed exist).

Here's the code:

# Import arcpy module
import arcpy

# Set enviornment
arcpy.env.workspace = "D:\\ARCGIS\\DIR1\\DIR2\\Master.gdb"

# Script arguments
ThingToBeClipped = arcpy.GetParameterAsText(0)

# Local variables:
Clipper = r"D:\ARCGIS\DIR1\DIR2\Another_GDB.gdb\Clipper"
OutputClipped = r"D:\ARCGIS\DIR1\DIR2\Master.gdb\Output"

# Process: Clip
arcpy.Clip_analysis("ThingToBeClipped", "Clipper", "Output", "")


texts: Geoserver 2.3.1 not finding all columns from PostGIS connection

texts:
so I am not sure if I have missed something or this a particular problem with this version of Geoserver. I want to style a point layer with a SLD, based on values in a particular column. The column is an enumerated type relating to a type of activity.

i.e. type_of_activity: { camping, fishing, hunting }

But when I reach the configuration part of publishing the layer the column I base my style on is not present in the feature type details, and when previewing the layer, an exception is caused stating that "type_of_activity" does not exist.

Any ideas?


texts: Understanding the app schema for using complex features in QGIS

texts:
I'm working with complex features on the GeoServer and the app schema extension.

My understanding of the app-schema extension is that you are able to map complex features through a WFS at the end. In other words, the app-schema is the connecting element between your complex data and a GIS software which do the WFS request.

Or is the extensions only responsible to create a valid WFS response of the complex features and the visualization of them is another part of the story?

Example using QGIS and complex features
I will give you an example. Regarding to my previous question I'm working with the App Schema tutorial data

When I load the WFS Layer in QGIS the mapping is wrong. Only one layer will be added with all information about the complex features. In addition, QGIS can not interpret the geometry (no data is displayed).

The only way to display the data is to use the GML Application Schema toolbox QGIS plugin.

When I am using the plugin, my complex features are stored in three separate layers and will be displayed successfully.

  Versions: QGIS: 3.2 GeoServer: 2.12.1GML Application Schema plugin 1.2.0


texts: Why don't the GADM Admin 1 boundaries for New Zealand line up with Regional Councils

texts:
I need a dataset of admin 1 boundaries for many countries, but particularly Australia and New Zealand. Using the current 3.6 boundaries from GADM, they seem to depart from the available Regional Council boundaries significantly, and I don't understand why.

In this map:

Yellow is the Regional Council 2017 "clipped, HD" boundaries from stats.govt.nz here
Cyan is the GADM Admin 1 boundaries, 3.6.
Green dots are the Territorial Authority boundaries 2017 (same dataset as REGC).

The GADM boundaries mostly line up with the REGC boundaries...but depart significantly in places. And in some places follow the TA boundaries instead.

What's the explanation for this?


texts:
Currently I'm working with OSM. I just need to use it's POI tools/API - https://wiki.openstreetmap.org/wiki/POI_tools/API in order to receive data in json format. But I can't understand what the URL for the request to API. In the wiki there is example like: /tag/amenity/restaurant/all/ids.json?bbox= [your bbox]

Please, could anyone provide me a really working example with API url requst?

I'm just confused how all this OSM works.


texts: Weird File Path Returning from Print Statement Causing ERROR 000732

texts:
I have created a python script in ArcGIS 10.1. My first parameter type is a 'Feature Layer' set to as a multivalue input. I was running my script quite well off of data from one of my drives (my Y:drive), but then I tried use some data from another drive (my Z:drive) and am receiving an error:

  ERROR 000732: Input Features: Dataset 'Z:\DATA FOR 2009\Base.gdb\CREEKS_UTM' does not exist or is not supported

I set a print message to print out the parameters for me and this is what i got:

  Y:\2012_data\INFRASTRUCTURE.gdb\Buildings;'Z:\DATA FOR
  2009\Base.gdb\CREEKS_UTM';'Z:\DATA FOR 2009\Base.gdb\LAKES_UTM'

The only anomaly I see is that the 2 feature classes from the Z:drive is being wrapped in single quotes when it returns the value, but the Y:drive doesn't. I have no idea why this is, but I'm thinking that is the issue I am having.

My script basically just reads in the parameters and clips to the extent of a raster file I have. The reason for the conditional statement in the loop is because the user may use a layer file from ArcMap or they may navigate to a feature class/shapefile and use that as an input. If they are using the layer in the map, then it reads it in as just the layer name (i.e 'Buildings'). If they navigate, then the parameter reads the whole file path and name (i.e Y:\2012_data\INFRASTRUCTURE.gdb\Buildings), so I need to parse it to use the base file name for the output parameter in the clip tool.

The files from the Z:drive is not being satisfied in the if/else statement. When I test against os.path.isabs it ops to the else part of the statement, so it must be having issues with the quotes in the isabs test.

Any suggestions are welcome.

My script is as follows:

import arcpy, os

inLines = arcpy.GetParameterAsText(0)
inRaster = arcpy.GetParameterAsText(1)
outRaster = arcpy.GetParameterAsText(2)

pnt_array = arcpy.Array()
extent = arcpy.Raster(inRaster).extent
pnt_array.add(extent.lowerLeft)
pnt_array.add(extent.lowerRight)
pnt_array.add(extent.upperRight)
pnt_array.add(extent.upperLeft)

poly = arcpy.Polygon(pnt_array)

for shp in inLines.split(';'):
    arcpy.AddMessage(shp)
    arcpy.AddMessage(os.path.isabs(shp))
    if os.path.isabs(shp) == True:
        arcpy.AddMessage('if')
        (filename, ext) = os.path.splitext(os.path.basename(shp))

        arcpy.Clip_analysis(shp, poly, outRaster + "\\" + str(filename) + "_Clip")

    else:
        arcpy.AddMessage('else')
        arcpy.Clip_analysis(shp, poly, outRaster + "\\" + str(shp) + "_Clip")


texts: Creating labels on Pie Charts in ArcGIS for Desktop?

texts:
I am creating a Location Pie chart for my study area using Male and Female population in ArcGIS for Desktop.

The software creates for legend of charts but I want to create a label on chart itself.
How do I do this in ArcMap?


texts:
In this script I use 2 nested 'for' loops to extract a series of variables by month (month = 0 - 11) from 5 netcdf files and then mosaic together each extracted variable.  The script runs but after processing about 3 variables, I get the following error statement:

  ExecuteError: ERROR 999999: Error executing function. Failed to copy
  raster dataset Failed to execute (MosaicToNewRaster).

My suspicion is that the cache memory has been exceeded.  I tried using arcpy.Delete_management(SCRATCH) but then received the error that the scratch space no longer existed after only one variable was processed.  Maybe I am putting that statement in the wrong place?  Any other suggestions?

# Import arcpy module
import arcpy
import os

# Set Geoprocessing environments
arcpy.env.scratchWorkspace = "C:\\WORKSPACE\\Process_4"
SCRATCH = arcpy.env.scratchWorkspace

# Script arguments
ENA = arcpy.GetParameterAsText(0)
if ENA == '#' or not ENA:
    ENA = "F:\\GISdata\\Projects\\USGSClimateChange\\climateproj\\srf_ena_eh5_2030-2034_avg_trim_v4.nc"

NRM = arcpy.GetParameterAsText(1)
if NRM == '#' or not NRM:
    NRM = "F:\\GISdata\\Projects\\USGSClimateChange\\climateproj\\srf_nrm_eh5_2030-2034_avg_trim_v4.nc"

PNW = arcpy.GetParameterAsText(2)
if PNW == '#' or not PNW:
    PNW = "F:\\GISdata\\Projects\\USGSClimateChange\\climateproj\\srf_pnw_eh5_2030-2034_avg_trim_v4.nc"

PSW = arcpy.GetParameterAsText(3)
if PSW == '#' or not PSW:
    PSW = "F:\\GISdata\\Projects\\USGSClimateChange\\climateproj\\srf_psw_eh5_2030-2034_avg_trim_v4.nc"

SRM = arcpy.GetParameterAsText(4)
if SRM == '#' or not SRM:
    SRM = "F:\\GISdata\\Projects\\USGSClimateChange\\climateproj\\srf_srm_eh5_2030-2034_avg_trim_v4.nc"

Output_Location = arcpy.GetParameterAsText(5)
if Output_Location == '#' or not Output_Location:
    Output_Location = "F:\\GISdata\\Projects\\USGSClimateChange\\climateproj\\summary\\"

#Variable list
for variable in ['SNOW', 'SMR', 'SWI', 'T0',  'T33', 'TA']:

#    SCRATCH = arcpy.env.scratchWorkspace               I attempted to place SCRATCH within the loop thinking that it would be recreated.  Nope.

    #Month Iteration
    for month in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]:
        ENA_Layer = SCRATCH +"\\ENA"+variable+str(month)
        NRM_Layer = SCRATCH +"\\NRM"+variable+str(month)
        PNW_Layer = SCRATCH +"\\PNW"+variable+str(month)
        PSW_Layer = SCRATCH +"\\PSW"+variable+str(month)
        SRM_Layer = SCRATCH +"\\SRM"+variable+str(month)

        # Process: Make NetCDF Raster Layer (169)
        arcpy.MakeNetCDFRasterLayer_md(ENA, variable, "x", "y", ENA_Layer, "", "time "+ str(month), "BY_INDEX")

        # Process: Make NetCDF Raster Layer (157)
        arcpy.MakeNetCDFRasterLayer_md(NRM, variable, "x", "y", NRM_Layer, "", "time "+     str(month), "BY_INDEX")

        # Process: Make NetCDF Raster Layer (145)
        arcpy.MakeNetCDFRasterLayer_md(PNW, variable, "x", "y", PNW_Layer, "", "time "+ str(month), "BY_INDEX")

        # Process: Make NetCDF Raster Layer (133)
        arcpy.MakeNetCDFRasterLayer_md(PSW, variable, "x", "y", PSW_Layer, "", "time "+ str(month), "BY_INDEX")

        # Process: Make NetCDF Raster Layer (121)
        arcpy.MakeNetCDFRasterLayer_md(SRM, variable, "x", "y", SRM_Layer, "", "time "+ str(month), "BY_INDEX")

        # Process: Mosaic To New Raster (25)
        arcpy.MosaicToNewRaster_management("\"" + ENA_Layer +";"+ NRM_Layer +";"+ PNW_Layer +";"+ PSW_Layer +";"+ SRM_Layer +"\"", Output_Location, variable+"_"+str(month)+"2032", "PROJCS['WGS_1984_Lambert_Conformal_Conic',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['false_easting',0.0],PARAMETER['false_northing',0.0],PARAMETER['central_meridian',-102.3000030517578],PARAMETER['standard_parallel_1',30.0],PARAMETER['standard_parallel_2',60.0],PARAMETER['latitude_of_origin',52.0],UNIT['Kilometer',1000.0]]", "", "1", "1", "MEAN", "FIRST")

   arcpy.Delete_management(SCRATCH)


texts: Fill no data area over ocean in orthophoto mosaic

texts: We have recently received orthoimagery tiles for my county. The county is a series of islands and the imagery only covers the islands. Thus we have data gaps where there is only water. In past projects we've created a mosaic by filling in the gaps using a solid blue color that somewhat resembles the median color of the water in the tiles near the shorelines. It worked pretty well in the past, but with this project I'm finding that no single color is working best. Is there a method I can use to make the transition from imagery edge to a solid color more aesthetically pleasing?


texts: how to delete a row in grid attribute table of a raster?

texts:
How can I delete a row in a raster file table? The raster format is GRID
I get this error "grid attribute table is blocked from deletion".

It seems absurd that I am not able to manipulate my own file. I am on ArcGIS 10.2 and the delete rows tool only works with shapefiles.

edit: my ultimate goal is to have a raster that only contains the pixel types I want to select and keep the attribute table intact, because I will need to use this raster for other operations.


texts: Raster to vector data generation problem

texts:
I am trying to generate lee multiplier zone (see map please) from raster data using georeferencing and digitization. See this map only contains THREE layers!

Lee Multiplier
Coastal boundary
Cities

I have layer 2 and 3 in shapefile format and i want to generate shapefile(vector) format of layer 1 from raster as shown.

The problem is I can not correctly georeference the raster layer since Coastal boundary shapefile format is so much detailed and zigzag on the other hand raster layer (above) is so much generalized. I tried georeferencing city points with even third order polynomial (since reference point is more than 10) transformation but all went in vain.

Now can any one help me guide-

the right way to georeference or
share the vector data.


texts: ArcGIS 10.x Create equidistant polyline that are perpendicular to an axis

texts: I have a polyline that represents a cyclone track and I want to create equidistant polyline that are perpendicular to the cyclone track.


texts: Selection of Standard Range for LiDAR Intensity Range Correction

texts: When correcting LiDAR intensity values for the effects of range (distance from sensor to target) many methods, including the one supplied by the lidR package (https://rdrr.io/cran/lidR/man/lasrangecorrection.html), involve supplying a standard range. Is there any rationale behind choosing a standard range value? Should I supply the mean flight height? Or should I choose something simple like 1000 meters?


texts: ArcMap: Unknown Spatial Reference fix with GDAL/Python

texts:
I have a .tif file that I created with Python and when I open it in ArcMap it says it doesn't have spatial reference information. Is there a way to set the spatial reference with GDAL if I have a .prj file? I have tried running this command through Python:

gdalwarp -t_srs ESRI::file.prj tmp.tif ouput.tif

Where -t_srs is the 'target spatial reference set', but it gives me the error: "Unable to compute a transformation between pixel/line and georeferenced coordinated for tmp.tif"

Is there an easy way to set the spatial reference of a .tif file with GDAL?


texts:
Now that I have QGIS 3 running nicely on my Mac. I am having another go at building some plugins.  I have installed the plugin builder plugin and run it without problems and it has generated a source directory.

I cd into the generated source directory and type make.  First time it failed to find PyQt5, so I install that with pip3 install pyqt5-macos-built and try again.  This time I get:

macMini:gpsconnect rful011$ make
pyrcc5 -o resources.py  resources.qrc
/usr/local/bin/python3.6: No module named PyQt5.pyrcc_main
make: *** [resources.py] Error 1

The resource file contains:

macMini:gpsconnect rful011$ cat resources.qrc
<RCC>
    <qresource prefix="/plugins/gps_connect" >
        <file>icon.png</file>
    </qresource>
</RCC>

Is this what one would expect?  I can't figure out if the plugin builder is not working properly or wether the problem in in my PyQT install.


texts: Using ArcPy to display xy data gives ERROR 000212?

texts:
I have a table (.dbf table) and I need to display on map its values. In this table I have fields: Value to display, longitude(at meters), latitude (at meters).
When I right click in this layer and select display xy data, it works but I need to use Python to do this in order to use an automatically tool.

So I used make XY event layer with Arcpy:

import arcpy, sys, string, os
arcpy.env.workspace = r"path\to\work\area"
in_Table_GR = r"F:\ArcGIS\Trab\Model\Result_ot\Ge_P_R_Sub_Otim.dbf"
in_y_GR = "Latitude"
in_x_GR = "Longitude"
out_Layer_GR = "P_r_g_otim"
spref =  arcpy.SpatialReference(102164)
arcpy.MakeXYEventLayer_management(in_Table_GR, in_x_GR, in_y_GR, out_Layer_GR, spref)

And it gives me an error:

Runtime error  Traceback (most recent call last):   File "<string>", line 1280, in <module>   File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 6381, in MakeXYEventLayer     raise e ExecuteError: ERROR 000212: Cannot create XY event source Failed to execute (MakeXYEventLayer).

And if I execute function MakeXYEventLayer manually I get the same error. It only work's if I use "display xy data" when I click on this layer.

What is the problem and how can I solve this?


texts:
I have downloaded sources of Qgis 1.8. I would like to know how it accepts mif file. As I have learnt after choosing add VectorLayer. Method addVectorLayers is called. Then openvectorlayer dialog shows. Afterwards QgsVectorLayer is created. It is constructor

QgsVectorLayer::QgsVectorLayer( QString vectorLayerPath,
                                QString baseName,
                                QString providerKey,
                                bool loadDefaultStyleFlag )
    : QgsMapLayer( VectorLayer, baseName, vectorLayerPath )
    , mUpdateThreshold( 0 )     // XXX better default value?
    , mDataProvider( NULL )
    , mProviderKey( providerKey )
    , mEditable( false )
    , mReadOnly( false )
    , mModified( false )
    , mMaxUpdatedIndex( -1 )
    , mActiveCommand( NULL )
    , mRenderer( 0 )
    , mRendererV2( NULL )
    , mUsingRendererV2( false )
    , mLabel( 0 )
    , mLabelOn( false )
    , mVertexMarkerOnlyForSelection( false )
    , mFetching( false )
    , mJoinBuffer( 0 )
    , mDiagramRenderer( 0 )
    , mDiagramLayerSettings( 0 )
{
  mActions = new QgsAttributeAction( this );

  // if we're given a provider type, try to create and bind one to this layer
  if ( ! mProviderKey.isEmpty() )
  {
    setDataProvider( mProviderKey );
  }
  if ( mValid )
  {
    // Always set crs
    setCoordinateSystem();

    QSettings settings;
    //Changed to default to true as of QGIS 1.7
    //TODO: remove hack when http://hub.qgis.org/issues/5170 is fixed
#ifdef ANDROID
    bool use_symbology_ng_default = false;
#else
    bool use_symbology_ng_default = true;
#endif
    if ( settings.value( "/qgis/use_symbology_ng", use_symbology_ng_default ).toBool() && hasGeometryType() )
    {
      // using symbology-ng!
      setUsingRendererV2( true );
    }

    // check if there is a default style / propertysheet defined
    // for this layer and if so apply it
    bool defaultLoadedFlag = false;
    if ( loadDefaultStyleFlag )
    {
      loadDefaultStyle( defaultLoadedFlag );
    }

    // if the default style failed to load or was disabled use some very basic defaults
    if ( !defaultLoadedFlag && hasGeometryType() )
    {
      // add single symbol renderer
      if ( mUsingRendererV2 )
      {
        setRendererV2( QgsFeatureRendererV2::defaultRenderer( geometryType() ) );
      }
      else
      {
        QgsSingleSymbolRenderer *renderer = new QgsSingleSymbolRenderer( geometryType() );
        setRenderer( renderer );
      }
    }

    mJoinBuffer = new QgsVectorLayerJoinBuffer();

    connect( QgsMapLayerRegistry::instance(), SIGNAL( layerWillBeRemoved( QString ) ), this, SLOT( checkJoinLayerRemove( QString ) ) );
    updateFieldMap();

    // Get the update threshold from user settings. We
    // do this only on construction to avoid the penality of
    // fetching this each time the layer is drawn. If the user
    // changes the threshold from the preferences dialog, it will
    // have no effect on existing layers
    // TODO: load this setting somewhere else [MD]
    //QSettings settings;
    //mUpdateThreshold = settings.readNumEntry("Map/updateThreshold", 1000);
  }
} // QgsVectorLayer ctor

So for now I need to know where the data from .mif file is been parsed.


texts: gsconfig add WFS with shapefile via Python

texts:
I am generating a shapefile with a Python script and I want to publish it via GeoServer. The GeoServer is running on localhost 8080.

I learned from this website that the workflow would be:

Add a store
Specify the data source name
Specify the getCapabilities URL
Enter password that is the same as the server
Publish

So far I have come up with this code, but it is somehow a mess and I do not know what exactly I am doing...

from geoserver.catalog import Catalog
from random import randrange
import geoserver.util

nomen='test{}'.format(randrange(10000))
cat = Catalog("http://localhost:8080/geoserver/rest/", "admin", "geoserver")
geosolutions = cat.get_workspace("workspacename")
shapefile_plus_sidecars = geoserver.util.shapefile_and_friends('25832')
ft = cat.create_featurestore(nomen, shapefile_plus_sidecars, workspacename)
that_layer = cat.get_layer(nomen)
print(that_layer.name)

How can I sort this out?


texts: Model Builder or a python script for pulling SDE data in a single GDB file

texts:
Would like to know if Model Builder or a Python Script would be better for pulling dozens of fc from ArcSDE into a single .gdb file ?
The tool will need to be run on a regular basis.


texts: How to edit GeoTIFF file downloaded from NASA worldview?

texts:
I have download a GeoTIFF file from NASA worldview website (https://go.nasa.gov/2E8yomU), under "take a snapshot", format -> geoTIFF.

When I open it in QGIS, I can't put it in edit mode. When I go to the properties, it does not let me to select or unselect "read only". How to put this file into edit mode?


texts: Creating points in QGIS from DMS coordinate CSV - partial loss of data

texts:
I am inserting a csv with a list of coordinates (tab separated below)

y   x
8 47 7.000  -82 57 32.000
8 47 7.000  -82 57 32.000
8 47 7.000  -82 57 32.000
51 28 0.000 7 32 60.000
-35  7 0.000    138 41 60.000
-35  7 0.000    138 41 60.000
-35  7 0.000    138 41 60.000
-35  7 0.000    138 41 60.000

Can anyone explain why the top coordinates (8 47 7 etc.) and bottom coordinates (-35 7 0 etc.) are inserted fine, but the row in the middle (51 28 0 etc.) does not work? If I paste the middle coordinate into google maps it takes me to the correct location, as do the others.

Thanks.


texts: Export to CAD in ModelBuilder - Boolean stops model

texts: I have a model that runs within ArcMap where it takes the selected features from several feature classes in an ArcMap session and converts them to a dwg using the export to CAD tool. The main model consists of a nested model called VCSetup as shown in the screenshot.  VCSetup takes the selected features, uses "Get Count" to get the number of features and then "Calculate Value" is used as a boolean where if the number of selected features is greater than 0 and less than 10000, it is true and else, it is false.  Calculate Value is set as a precondition to the next step, "Copy Features". These features are then set as parameters to feed the export to CAD tool.  The issue is, if the "Calculate Value" is false (no features from a feature class are selected), the "Copy Features" does not run and therefore, the Export to CAD tool fails as it says "Error 000229: Cannot open in_memory\Water_Pipes".  The model includes every feature class in the mxd, however, there will be feature classes that have no selected records when exporting to CAD. How do we get around this where even though there are no features selected in some feature classes, the tool proceeds to export features that ARE selected?


texts:
I am attempting to find the most date for each occurrence in a given county. I am attempting to do so with a SQL expression, but every time I add a GROUP BY clause ArcGIS crashes (I am doing the work in Pro, but tested the same thing in ArcMap, and both crash immediately when attempting to run or verify an expression with GROUP BY)

SELECT * FROM [Table] WHERE is implied, so my code reads:

ALARM_DATE =
(SELECT MAX(ALARM_DATE)
FROM
CountyOccurrences_firep18_1_A_1000acres)
GROUP BY
COUNTY_NAME

Everything up to GROUP BY is valid, but of course it only returns the most recent date in the whole table. Whenever I add GROUP BY to organize by COUNTY_NAME, even if just verifying the expression, the software crashes immediately.

The data is stored in a local .gdb, and I have attempted it on the feature class as well as an exported stand-alone table.

I am looking for a workaround to achieve the objective of selecting the most recent occurrence by county.


texts: Switching from layout view to data/map view in ArcGIS Pro

texts:
I am using ArcGIS Pro 2.7
I imported a map document created in ArcGIS Desktop into Pro. It opened up in Layout view, and I don't know how to switch to the Map view, which was easy to do in ArcMap by clicking the tab below the layout frame. All I see is the option to activate the map frame, but this doesn't actually switch to the map view. Likewise, when I create a new map in ArcGIS Pro it opens in Map view, and I would like to be able to switch the layout view.
How do I do that?


texts: Cost-Distance Tool not producing logical answer

texts:
I am working on creating a cost catchment based on Tobler's equation in ArcGIS10.1.

I feel confident in my cost surface; it produces a raster where each cell equals the time in hours that it would take to cross the cell dependent on slope.

Next I used the Cost Distance tool to create a raster of the accumulated time it would take to reach each cell from a source location in the hope of then creating a contour map of 1hr hiking times from the source location.

However, my cost distance outcome values are significantly greater than they should be. A point I know should only take an hour to get to produces a cost distance value of 30.

Am I using this tool incorrectly or interperating the results incorrectly?


texts: Creating QGIS map that can be exported and used for 2-colour (spot) printing?

texts:
I can produce black and white maps from raster images, with areas blocked out with a single 'Pantone' colour. Provided I use the 'multiply' blending mode, I can overlay the black and white map layer over the coloured shading layer without affecting the colours of either. But the exported image does not retain the information required for 2-colour (spot) printing (for a book). I think part of my problem lies in the fact that QGIS does not use Pantone colours; I can mimic the required Pantone colour in CMYB or RGB, but the exported image does not have/retain the Pantone information required by the book printer. The image is full colour not 2-colour.

Any ideas?


texts: Installing all pyqgis modules without QGIS?

texts:
I am developing a desktop program with python (tkinter, csv, qgis.core modules, etc), and the idea is to be able to install it in a client's computer.

I have the pyqgis libraries because I have installed QGIS 3.4 in my computer, but I was wondering if I can install just the libraries without installing QGIS, since I want  to be able to install the bare minimum in the client's computer without unnecessary clutter. I think it doesn't look quite professional to install a desktop program and also install a bunch of foreign programs that they are not going to use but "must be there to make mine work".

Can I install just the programming libraries from QGIS (pyqgis) in a computer without installing QGIS and, if so, how?


texts:
I am trying to make a project template, and I cant seem to find any information specifically on QGIS 3.
Is it possible in this version?
The goal is to be able to set Symbology in the template and then be able to transfer that symbology to another map.


texts:
I've created a point data layer in QGIS using a .png image as a template. Of course the .png had no projection, and when creating the new shapefile I chose the WGS_84 coordinate system. Now, I need these data points to 'match up' with a (correctly projected) shapefile of Ireland in ArcMap 10.2. When adding the newly created data, I got a message stating something along the lines of the shapefile not being the same extent as the other data and that projecting the data may result in unexpected behavior. So the data points have been projected in some ocean judging by the basemap, and using the Data and Projections > Batch Project tool to change the PCS to TM65 (the Irish National Grid) has not rectified this.

Is it possible to change the coordinates of each point (there are over 100 at this stage...) to align with a shapefile of Ireland, or do I just have to start from scratch and create the points again, this time over the shapefile?
Also, would I be able to align .png files with the Ireland shapefile to prevent this predicament for the next batch of data points I am going to create?


texts: Limit radius of ST_Clusterwithin (PostGIS)

texts:
I have a set of over 800k points and I am looking to cluster them within specified circle radius. I need them to be clustered to maximise the number of points within the circle. This is to model how many signal towers are needed to cover the points.

I tried using ST_ClusterWithin in PostGIS, but this seems to merge nearby clusters to form mega-clusters, but this is not what I want.

1) Is it possible to limit the maximum radius of a cluster so that it is forced to break up and form new clusters?

2) Is it possible to force the minimum radius too to match my signal radius, so that clusters are formed to maximise the points within the circle? I.e. if there was initially two clusters of 10km radius near each other, forcing a 15km radius would position the circle between them so as to maximise the points in the cluster.

Please let me know if you need clarifications.

I have QGIS, ArcGIS if helpful.


texts: Is SpatiaLite or SQLite Spatial an Accepted Standard?

texts:
The reason why I ask this is because I have been undertaking some testing and have found that there seems to be many implementation and not all of them are interchangeable. For example:

FME can read and write SQLite Spatial (FDO) and SpatiaLite
MapInfo can read and write SQLite Spatial (FDO, I think)
QGIS can read and write SpatiaLite

But,

MapInfo wont read QGIS' SpatiaLite
FME will read and write anything (as usual)
QGIS will read output from FME in either the FDO or SpatiaLite writer, but can't edit (silent fail) and the same for MapInfo written tables.

There are probably other bits of software that read/write some variation of the above but implement it differently.

So, to ask a simple question. Is it fair to expect to work in some variation of SQLite and be interoperable?

Edit: It turns out that you can read/write spatialite from MapInfo and FME in QGIS via the 'open vector' dialog. I was trying using the 'add spatialite table' dialog. It just remains that MapInfo wont read SpatiaLite from QGIS, but this isn't all that surprising...

Edit 2: I am thinking that QGIS wont edit mapinfo and qgis SQLite Spatial layers, despite being able to view them, due to the use of the generic 'geometry' spatial type, rather than 'point' or 'polygon' etc.


texts: Agreed Upon Name for Rows in an Attribute Table

texts:
Is there an agreed upon name for the rows in an attribute table, perhaps one that would apply across different GIS software platforms?

Esri uses "records" here, for example. They also have the automatically generated field of "OBJECTID", however, that implies the use of "object".

QGIS uses "features" here and in its attribute table within the software (e.g., the "Show all features" button).


texts: Linking or joining data in MS Acess to shapefiles in QGIS

texts:
I am creating a spatial database for five buildings for a project that I am working on. I have spatial data in the form of a shapefile and attribute data in Microsoft Access(with a table and queries). There is a common field "TOTAL_AREA(m.sq)" for both spatial and attribute data.
I would like to join both attribute and spatial data in QGIS to create the spatial database. I tried to load the MS Access Database using ODBC Data sources but nothing showed.
Is there a way to do this without using ODBC?
I am using a Windows10 Operating system with QGIS 3.4, 64 bit.


texts:
If i'm not terribly mistaken, ST_Intersects does not support GeometryCollection.

ERROR:  Relate Operation called with a LWGEOMCOLLECTION type.  This is unsupported.
HINT:  Change argument 2: 'GEOMETRYCOLLECTION(POLYGON((.......

Currently i am using a wrapper that cycles through the different types in a GeometryCollection and performing a ST_Intersect on each. Needless to say, this is terribly inneficient.

There must be a better way?


texts: Printed map has different scales for raster and vector layers in QGIS?

texts:
I am trying to help a friend in another part of the country diagnose this problem.  She has a background layer from google and has a vector layer overlaid on it.  It looks fine in the composer but when printed the layers are scaled differently and don’t match.

QGIS version2.8.2 but she is going to upgrade to 3.2 now that is officially stable.

As can be seen from the screen shots the project CRS is 3857 and OTF enabled which should take care of the vector layer which is probably 2193.

Composer window

QGIS main window

Printed result


texts: Converting coordinates from shapefile using python?

texts:
I am really new to working with this kind of data.

I have been trying to work with a shapefile that I wish to convert to geojson. The source has both shapefiles and geojson downloads available, but the geojson files they have available are truncated so are unusable, but do contain enough information for me to compare my script's output to expected values.

I am using a combination of pyshp to load the shapes/records, pycrs to load the .prj file, and pyproj to preform the transformations.

The simplest check I run is something like:

sf  = shapefile.Reader(fileName)
crs = pycrs.loader.from_file(fileName + ".prj")
input_projection = Proj(crs.to_proj4()) # or init="ESRI:102718"
output_projection = Proj(init="epsg:4326")
x,y     =  sf.shapes()[0].points[0]
lo,la   =  transform(input_projection,output_projection,x,y)

I have tried both using the proj4 string, and the ESRI code (found via spatialreference.org), both seem to be producing different incorrect results.

Example: The first point of the first shape in the file has points:

(994133.507019,214848.897583)

This should, according to the truncated geojson (which does line up correctly on google maps so I believe its points are correct) produce something like:

(-73.964326872592096, 40.756389797390298)

If I use the crs.proj4 for the input projection I get:

(-73.8805457169,42.1010909572)

Exact string:

+proj=lcc +datum=NAD83 +ellps=GRS80 +a=6378137.0 +f=298.257222101 +pm=0.0  +x_0=984250.0 +y_0=0.0 +lon_0=-74.0 +lat_1=40.6666666667 +lat_2=41.0333333333 +lat_0=40.1666666667 +units=us-ft +axis=enu +no_defs

While if I use the ESRI code for the input projection I end up with:

(-65.6360519953,41.8026275179)

When I plot the whole set, the shapes end up 'above' their correct positions and several times larger than they should be, but otherwise undistorted relative to each other.

So I am clearly doing something wrong or not understanding something important, but am at a loss for where I am going so horribly wrong.

Any ideas?


texts:
I am working on a BIM/GIS project where I need to convert revit models into GIS. I used the FME export and chose the 2*3 coordinate view to export to ifc file, then in ArcScene, I use quick import to convert ifc to multipatch. As a result I get the model sorted in revit family, such as wall, column, slab, etc in multipatch form. The 3D model turn to be fine, but there are extra tables attached to each family and I found much of the data in there was lost. I wonder if this is the problem with exporting ifc in revit or the problem with exporting to multipatch in GIS. (I have pics below to specify)

As you can see in here, lots of data in the family is lost. For example in the door lining properties, there are null values.


texts:
Who knows the elegant way to extract coordinates of polygon vertices from well known text representation of DbGeometry value?

Here's my polygon for example:

 {POLYGON ((52.808019 -1.345367, 53.095124 -1.345367, 53.095124 -0.864716, 52.808019 -0.864716, 52.808019 -1.345367))}


texts: How to display proper route for OSM data using pgRouting

texts:
I am facing a problem while displaying routes using OSM data and pgRouting. I have followed the following procedure:

downloaded OSM data
made it routable using osm2pgrouting
taking point coordinates from OpenLayers JavaScript
querying to get the nearest point available in the data for source and target
querying the shortest route using those source and target points
List item
Displaying the route

Here are my queries

For source and target selection:

select w.source, w.target, ST_Distance(w.the_geom,ST_SetSRID(ST_MakePoint(%s, %s),4326)) as d
from ways as w
WHERE ST_DWithin(ST_SetSRID(ST_MakePoint(%s, %s),4326), w.the_geom, 100)
order by d

Where coordinate value go in %s

For routing query:

SELECT ST_AsGeoJSON(the_geom) AS geoj
FROM ways
JOIN (SELECT * FROM pgr_dijkstra(\'SELECT class_id AS id, source, target, length AS cost FROM ways\', %s, %s, directed:=TRUE)) AS route ON ways.gid = route.edge

The source and target obtained previously are given here in %s

The problem is that I am not getting the correct route I am getting segments fragmented and scattered here and there on the map.

How can I correct it?

the two points close to each other are the source and destination and the green fragments is the route obtained


texts: Creating polygon connecting endpoints of multiple lines using ArcPy?

texts: I'm trying to figure out how to create a polygon that connects all the endpoints of a shapefile containing a set of polyilnes with pythonscript in ArcGIS, I'm having trouble doing this as the order of the nodes in the polygon is important. I want to achieve the grey polygon in the picture from the green lines


texts: Problem creating a popup in mobile OpenLayers

texts:
I'm trying to use the mobile version of OpenLayers, unfortunately I could not use framedcloud in it, I could only create a square popup does not look very aesthetic, besides the main need is to identify from a cloud of the associated data points so the popup square is not useful and less use jQuery or another library..

The way we achieve using the square was import popup popup openlayers library, but the trick did not work with framedcloud (firebug says "OpenLayers.Popup.FramedCloud is not a constructor")

<link rel="stylesheet" href="../scripts/OpenLayers-2.13.1/theme/default/style.mobile.css" type="text/css" >
....

<script type="text/javascript" language="javascript" src="../scripts/OpenLayers-2.13.1/OpenLayers.mobile.js"></script>
<script type="text/javascript" la language="javascript" src="../Scripts/OpenLayers-2.13.1/lib/OpenLayers/Popup.js"></script>

.....

function putPopup(x, y, html,map) {
        // alert("popup1"+x+" "+y+" "+html)
        map.setCenter(new OpenLayers.LonLat(x, y));

        if (popup) {
            map.removePopup(popup);
        }
        // this.popup = new OpenLayers.Popup("chicken",
                // new OpenLayers.LonLat(x, y), null, html, null, true);

//-------------------------Fail-------------------------------------

        //popup = new OpenLayers.Popup("chicken",
//                                 new OpenLayers.LonLat(x, y),
//                                 new OpenLayers.Size(120,50),
//                                 html,
//                                 true);

//-------------------------Fail-------------------------------------
        popup = new OpenLayers.Popup.FramedCloud("Popup",
            new OpenLayers.LonLat(x, y), null,
            html, null,
            true // <-- true if we want a close (X) button, false otherwise

        );

//-------------------------Fail-------------------------------------

         //var myPopupClass = new OpenLayers.Class
//              (
//                  OpenLayers.Popup.FramedCloud,
//                  {
//                      'autoSize': true,
//                      'maxSize': new OpenLayers.Size(500,500)
//                  }
//              );
//

        // var myPopup = new myPopupClass
//                              (
//                                  "chicken",
//                                  new OpenLayers.LonLat(x, y),
//                                  null,
//                                  html,
//                                  null,
//                                  true
//                              );
//                              map.addPopup(myPopup);

        map.addPopup(popup);

    };


texts: Shape mismatch when trying to reclassify

texts:
I have a raster that what to conduct the following condition:

if pixel value <25 then pixelvalue*1.6 and if pixel value>=25 then (pixelvalue*0.9)+16.67

and I wrote this code but I get an error

import rasterio as rio
import matplotlib.pyplot as plt
import numpy as np
import copy

Ic=rio.open("/Users/pegah/Desktop/Climare_final_DATA/Cli_Index.tif").read(1)

A=1.6*Ic
B=16.67+(0.9*Ic)

Ic_reclass = copy.copy(Ic)
Ic_reclass[np.where(Ic<25)] = A
Ic_reclass[np.where(Ic>=25)] = B

def rio_arr_to_raster(dataarray, input_value_raster_path, out_raster):
    src = rio.open(input_value_raster_path)
    # context manager.
    with rio.drivers():
        profile = src.profile
        profile.update(
            dtype=rio.float32,
            count=1,
            compress='lzw')
        with rio.open(out_raster, 'w', **profile) as dst:
            dst.write(dataarray.astype(rio.float32), 1)

rio_arr_to_raster(Ic_reclass,"/Users/pegah/Desktop/Climare_final_DATA/Cli_Index.tif","/Users/pegah/Desktop/Climare_final_DATA/Corre_Cli_Index.tif")

The error is:

  ValueError: shape mismatch: value array of shape (184,460) could not
  be broadcast to indexing result of shape (70947,)

Any Idea how to solve it?


texts:
I have to update multiple feature records in ArcGIS through ArcObjects.
Below is my code.

It's running fine for first time but it's giving me error while it's going to run the queryfilter for nexttime it's giving me error "Insufficient permissions".

foreach (test toProcess in forProcess)

{
                    int OID = toProcess.R1;
                    int GISID = toProcess.R2;
                    double sLength = toProcess.R3;

                    string wherec = "OBJECTID = '" + OID + "' AND GISID = '" + GISID + "'";

                //initialize queryfilter
                queryFilter.SubFields = "*";
                queryFilter.WhereClause = wherec;

                //search through queryfilter
                IFeatureCursor featureCursor2 = featureClass.Search(queryFilter, false);
                //Get the output features
                IFeature featurenew = featureCursor2.NextFeature();

                //while (featurenew != null) (not using as at a time only 1 feature)
                //{
                    IObject pObject = featurenew;
                    int iNewTag = GISAUConstants.kiNoSequenceValue;

                    // Get a new tag value from tag sequence within workspace.
                    iNewTag = CommonFunct.GetSequenceValue(GISAUConstants.ksGISIDSequenceName, workspace);

                    if (iNewTag <= GISAUConstants.kiNoSequenceValue)
                        throw new Exception("Invalid tag value: " + iNewTag);

                    // Get the field index, by model name.
                    int fieldIndex = CommonFunct.GetFirstFieldIndexByModelName(pObject, GISAUConstants.ksMNFieldGISID);

                    // Did we get a valid field index?
                    if (fieldIndex == GISAUConstants.kiNoField)
                        throw new Exception(" does not have field with model name: " + GISAUConstants.ksMNFieldGISID);

                    // All is well... write tag value to the field.
                    featurenew.set_Value(fieldIndex, iNewTag);
                    featurenew.Store();
                    //featureselection.Clear();

                    logger.WriteLine(DateTime.Now.ToString() + " Object ID : " + OID + " Previous GISID : " + OID + " >> New GISID : " + iNewTag);

                    //featurenew = featureCursor.NextFeature(); (as I have only single feature)
                }


texts:
I have got two cost surface rasters, one for land-use and the other for slope values. For my analysis, I've been told to make a "weighted-overlay", however I don't have the SAGA plugin available on my QGIS for some reason, and I wanted to know if by using the raster calculator I can achieve the same result.

Example: ("land-use"*0.8)+("slope"*0.2)

Would this be considered a weighted-overlay?


texts: QGIS use the exact defined color for text labels and get rid of unused color when exporting as png

texts:
When I export QGIS layer as PNG images, I notice that the edges of the text labels are not clean.  There's always a zig-zag effect on the edge. And this in turn introduces a lot of unused colors that are different from the defined ones.
I wonder is there a way to get rid of this and have color-consistent text labels when exporting as PNG? I assume this should be related to the resampling configuration. It might have been set to "Linear" by default, but I want it to be "Nearest Neighbor".
I know there's the Resampling configuration for symbols, but I did not find the corresponding configuration for text labels. This question is very related to another post Exporting a raster map to PNG in QGIS keeping the exact legend colors, and they are dealing with symbols, while I'm dealing with text labels.
I have set the antialiasing to be False, but the same thing still persists.
settings = iface.mapCanvas().mapSettings()
settings.setOutputSize(QSize(1000,1000))

settings.setFlag(QgsMapSettings.DrawLabeling, True)
settings.setFlag(QgsMapSettings.Antialiasing, False)
settings.setFlag(QgsMapSettings.UseRenderingOptimization, False)
settings.setFlag(QgsMapSettings.UseAdvancedEffects, False)


texts: Converting DEM to use with Locate Outliers tool in ArcGIS?

texts:
I have a DEM and I want to analyse it using the Locate Outliers tool in ArcMap; however the tool only supports Terrain or LAS input files.

How to convert the raster DEM to a format that Locate Outliers can read?


texts: I've been trying to change the default language of geonetworks to portuguese but with no success.. Anyone know how can I add the portuguese language and then make portuguese language the default language of my geonetworks ?


texts: Merging attributes of selected features tool not working in QGIS 3

texts:
I want to combine some columns between 2 data attribute tables.
The question, which I asked a while ago:
Copying features from one attribute table to another using QGIS
leads to quote long way.
Recently I "discovered" another tool, which might be far quicker. The tool is the "Merge attributes of selected features" located in the advanced toolbar.
I found some answer, which could be helpful: Copy attributes from one feature to empty row of another feature in QGIS 3,
but it doesn't work in my case really.
I want to copy the XY coordinates from one attribute table to another.

and I was following the instructions from the thread above.
Unfortunately in my case, nothing happens. When I click OK my data attribute table remains still empty.

What am I doing wrong?


texts: In OpenLayers can I replace a kml's URL for OpenLayers.Protocol.HTTP with the actual text of the kml?

texts:
I had an OpenLayers map that reads in and displayed a kml like this:

var vector_format = new OpenLayers.Format.KML({extractAttributes: true});

    var vector_protocol = new OpenLayers.Protocol.HTTP({
        url: 'http://www.geos.ed.ac.uk/~s0825955/thomlines.kml',
        format: vector_format
    });

    var vector_strategies = [new OpenLayers.Strategy.Fixed()];
        vector_Layer = new OpenLayers.Layer.Vector('More Advanced Vector Layer',{
            protocol: vector_protocol,
            strategies: vector_strategies
        });

I am producing the with a perl file and have the kml as a variable. Can I replace the url ({
            url: 'http://www.geos.ed.ac.uk/~s0825955/thomlines.kml',) with the actual kml text as stored in my scalar variable $newkml ? and if so how?


texts: Improving ArcGIS for Desktop geocoding process?

texts:
I would like to improve my ArcGIS for Desktop geocoding process comparing the city names between  two shapefiles . First one Store_city_name (point) and the second is city_name_boundaries (polygons).

My method : After using spatial join tool in Arcgis, If the city names from store shapefile are not the same as polygon shapefile, I’m trying to improve by identifying the distance between the store location and the city XY coordinate where it should be.

Everything is working well while calculating the distance between the store location and the centroide of the right city.  But sometimes this distance is so high specially if the store was geocoded, for exemple, 20 meters outside the edge of the right city.

I would like to find the distance and the XY coordinates from the store location until the edge of the right polygon (city feature) - where the store should be.   Can anyone help me ?


texts: QGIS Layout: Putting all your maps in your layouts on one favorite location at once

texts: Currently I am making a project template that is meant to have a lot of map layouts. Potentialy this will lead to more than 30 maps that can be created (not all will be used) but they are focused on the same spot, 'Aka a favourite location' that can be set. Now I know you can do this manually each time for each load out. However this will take some time to it one by one especially if you have a lot of potential maps. To save time, my question is if there is a command where I set all my map layouts to that same location at once?


texts: I'm trying to zoom to a graphic, but nothing happens?

texts:
I'm trying to zoom to a graphic retuned from the query;

        query.OutSpatialReference = MyMap.SpatialReference;
        query.ReturnGeometry = true;

After this query I used myMap.zoomTo(graphic.Geometry) and tried to zoom to a specific extent but nothing happens.

Does anyone know why this does not work?


texts: How to select parcels in ArcPy situated in a different county than is written in the attribute table?

texts:
I have two polygon feature classes: one with parcels, the other one with counties (40 counties)

I have to identify the parcels that in the attribute table belong to county 'X', but spatially they are situated in another county.

Manually, it works with Data Reviewer extension in ArcMap: I create a BatchJob with a Geometry on Geometry Check where I write 40 expressions (because I have 40 counties!!!) like this: Feature Class1 = [PARCELS] where COUNTYID = 'X'; Feature Class2 = [COUNTIES] where COUNTYID = 'X'; SPATIAL RELATION: INTERSECT (checking the option 'Find features not in this relationship') --> and the output are the parcels that have COUNTYID = 'X', but spatially ARE NOT in the county 'X'.

Is there a way to do this automatically?
I thought about creating a list with the values of the COUNTYID field for both feature classes and then iterate through each value and select by location.
The problem is that I cannot figure it out automatically the option 'Find features not in this relationship' that DataReviewer has and SelectByLocation does not :(

Thanx a lot!


texts:
I have been using the merge tool in QGIS frequently and it had been working fine until today when the results started producing a black box around the bounding box area for where the raster tiles do not exist.(see below)

The output should just merge the raster datasets together without the black areas.

Data used

Results

Merge tool settings


texts: Unable to open topology file for vector map, grass 7, v.net

texts:
I am introducing myself to Qgis using the FOSS4Glabs  :

https://github.com/FOSS4GAcademy/GST102FOSS4GLabs/tree/master/Module%206%20Lab/QGIS%202.2

I am facing a problem during the module 6 Lab of the GST102 series. I am trying to construct a network data set using the v.net included in the GRASS Tools. I keep receiving the same error: "Unable to open topology file for vector map "

If I ignore the problem and continue the manipulation, I receive the following error message:

I tried to rebuild the topology using the v.build, but it didn't change a thing.

Does anyone have an idea about what I should investigate?


texts:
USGS has been moving towards serving data through The National Map Viewer.  They have several WMServices through their website that serve elevation data to the public (hillshade & DEM).  The problem is that geoprocessing tools in ArcToolbox won't accept these layers as inputs.

Where can I download (free) DEM gis data that I can use in analysis?  I'm specifically interested in the 1/3 arc second (~10m) or the 1 arc second (~30m) data.

Currently I'm going through the USGS NED Tile download tool, which has ~4 files per county.  My areas of interest cover about 50 counties -- I don't see myself manually downloading these files one by one.


texts: Error occured during Geodatabase compressing

texts:
When I am doing geodatabase administration in ArcSDE on an Oracle Database, the following error pops up when I run the compress tool

ORA-00604: error occurred at recursive SQL level 1 ORA-01000:
maximum open cursors exceeded.

With out compressing, our database performance is coming down.What might be the error and what should be the remedy.


texts: Merge linestrings between two nodes based on condition

texts:
I am working with dense openstreetmap road networks and I am trying to simplify the network. To simplify it, I would like to merge all the linestrings that only intersect with one other line, as shown in the figure below; coloured lines should be merged into one (and as you can see in the example, some lines do not require a merge).

I have tried the networkx deep first search (DFS) algorithms to identify paths between nodes with more than two intersections. But that doesn't seem to do the trick. See below some of the code I tried:

list_connections = {}
for node in node_three_plus.items():
    node_in = node[1]
    inb_list = []
    inb_list.append(node_in)
    for node_out in nx.dfs_postorder_nodes(sg,node_in):
        if (node_out in node_three_plus.values()):
            break
        else:
            inb_list.append(node_out)
    list_connections[node[0]] = inb_list

when using this code, I get a lot of duplicates and it seems I cannot properly access the edges (and their data) by using these output coordinates.

Is there a (simple) way of doing this linemerge?

Perhaps with Shapely and/or Fiona?


texts: could someone tell me how to add a recipe in OpenGeo Suite please. I would like to submit a Tree sub-layer in a geoexplorer map.


texts:
I need to convert netCDF files from AWS's GOES data into GeoTIFF. My end goal is to use these as raster layers in GeoServer. I have used GDAL to warp a GeoTIFF into EPSG 4326 so for now I just need to get it into a GeoTIFF. I tried using gdal_translate with the command:

gdal_translate NETCDF:"OR_ABI-L2-CMIPF-M3C02_G16_s20180640000387_e20180640011153_c20180640011226.nc":CMI test2.tif

This gives me an image, but opening it with an image viewer just shows a white background with a completely black circle. I've also tried using Python with the code:

# Required libraries
import matplotlib.pyplot as plt
from netCDF4 import Dataset
import pdb

# Path to the GOES-R simulated image file
path = '/home/brian/projects/aws_goes_testing/OR_ABI-L2-CMIPF-M3C02_G16_s20180640000387_e20180640011153_c20180640011226.nc'

# Open the file using the NetCDF4 library
nc = Dataset(path)

# Extract the Brightness Temperature values from the NetCDF
data = nc.variables['CMI'][:]

# Show data
plt.imshow(data)
plt.show()

This gives me an image I want but I'm not sure how I can save the data variable as a GeoTIFF. Obviously I can use plt.savefig() but this isn't what I want since it will include the axis and everything from the figure I don't want.


texts: Downloading road map of specific country from Planet OSM and using it in ArcGIS Desktop for analysis?

texts:
I'm working on a project where the roads system information is essential. The targeted is an African country, namely Nigeria, therefore the data source is quite scarce. The only possible source I was provided with is Planet OSM. I have only used ArcGIS and have never worked with OSM before. I've been reading the wiki and documentation on OSM, but I've been confounded and overwhelmed by the amount of information on the topic and not found a good way to proceed.

I tried to export the entire country directly from OSM, but the size is too large. And on Planet OSM, I can't seem to find files just for Nigeria.

Is there a way to do it without downloading the file for the whole planet?

Since I haven't actually figured out a way to download the data. I'm wondering if you can distinguish between land use/land cover features in an OSM file. In my case, that would be: how to get the road data/map.

And I see that the file format of OSM data is either XML or PBF.

How to convert and use them in ArcGIS then?


texts: How do I insert the string field and calculate it in Python?

texts:
Hello I am trying to insert a code that force a column Sum_Acres_ to add a comma to display like this 300,000 from 300000.456

Here is my sample I wrote from a ModelBuilder and export it to python.

    # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# Summary.py
# Created on: 2014-07-16 08:10:58.00000
#   (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy

# Load required toolboxes
arcpy.ImportToolbox("Model Functions")

# Local variables:
Final_Intersect = "E:\\FY2013_projects\\PMC_project\\USGS EarthExplorer\\2004\\Final_Intersect"
Statistics_Field_s_ = "Acres_1 SUM"
ast_l1b_00301132004175715_20101206173613_5997_ndvi_shp = "E:\\FY2013_projects\\PMC_project\\USGS EarthExplorer\\2004\\Final_Intersect\\ast_l1b_00301132004175715_20101206173613_5997_ndvi.shp"
v_name__dbf = "E:\\FY2013_projects\\PMC_project\\USGS EarthExplorer\\2004\\Final_Summarize\\%name%.dbf"
Name = "ast_l1b_00301132004175715_20101206173613_5997_ndvi"

# Process: Iterate Feature Classes
arcpy.IterateFeatureClasses_mb(Final_Intersect, "A*", "", "RECURSIVE")

# Process: Summary Statistics
arcpy.Statistics_analysis(ast_l1b_00301132004175715_20101206173613_5997_ndvi_shp, v_name__dbf, Statistics_Field_s_, "Crops")

# Process: Parse Path
arcpy.ParsePath_mb(Name, "FILE")

How or where should I insert this code ({:,}'.format(!SUM_Acres_!)) above ?

Actually I have 10 of them in separate modelbuilder and it is the same thing but just a different dictionary and it would save me a lot of my time to do this by copy python and then just simply change the path names to different For example, C:\2004\final , C:\2005\final, C:\2006\final  so on...


texts: How to set Google Maps pegman position programmatically?

texts:
I've this sample code that use Google Maps anb Google Street View ....

    <meta charset="utf-8">
    <title>Set Pegman position programmatically</title>

      <form id="form" onsubmit="return false;">
          Lat: <input id="lat" type="text" />
          Lon: <input id="lon" type="text" />
          <input type="submit" onclick="getLatLon();" />
      </form>

(NOTE: if you'd like to execute it you've to put you Google API Key at the bottom of the code ....)

I'd like to slightly modify the lat / lon coordinates values in the two specific input values (this code is a simulation of my real needs ... ), and to see that the pegman moves on the Google Map and the Stret View image udpate itself.

Suggetions / examples?


texts: Native QGIS Dissolve tool not compatible with SAGA Split Lines at Points tool

texts:
I am trying to use the SAGA "Split lines at points" tool within QGIS. I first had a polyline layer with line segments/features of arbitrary length. I then did the following:

Dissolve using the native QGIS dissolve tool.
Created points at equal length intervals along the dissolved layer using the native QGIS "Points along lines tool"
Tried to split the polyline layer using the "Split lines at points tool".

The resulting polyline layer is strange. While it does split the polyline layer at the point locations, it also retrieves the segmentations which were existing before in the original polyline layer. Here's an image where one of these "rogue" segments is selected and where I show what I mean:

Before dissolving and splitting the line layer this is what the segment looked like:

Why does the old segmentation come back? It seems like "Dissolve" doesn't dissolve the underlying geometry sufficiently so that SAGA knows to ignore the old segments...


texts: How to add a new field and overwrite existing feature class by using FME 2021

texts: What I am trying is to add a new field to an existing feature class in file GDB, overwrite this feature class and continue with processing. So far I tried to read that feature class connect to AttributeManager to add new field and FeatureWriter to overwrite it, but for some reason it doesnt update my current feature class. How this can be done in FME 2021?


texts: I am experienced on Esri gis desktop and engine development.But i want to learn about the web side.Where should i start ? There is noone to teach me where to start.Is it as difficult as desktop and engine development.(p.s. i am using C#)


texts: Is it possible to create 3D dxf with OGR?

texts:
Does anyone know if it's possible to create a 3D dxf with OGR?  I would like to assign the contour lines a Z value and then export them to dxf for some cad work.

PS. I know FME can do this, however I would like to try and find a free solution, and if possible do it in QGIS.


texts: How does Watson solve Geography problems?

texts:
In spite of losing to humans on the geography question, Watson still won Jeopardy.

The explanations regarding this incorrect answer seem a bit lame to me (at 3:40 in the video).

With a logo like this, I would expect Watson to perform better at finding a city based on airport attributes.
Does anyone have any links describing how Watson performs geospatial reasoning?


texts:
I have a set of GPS-coordinates in a database, which I want to compare to a coordinate supplied by the html5 location API.

My coordinates look like this:

            <WGS84Coordinates>
                <Longitude>180325E</Longitude>
                <Latitude>591947N</Latitude>
            </WGS84Coordinates>

This is from Stockholm Central Station.
If I enter these coordinates into google maps, I end up southwest of Stockholm in Google Maps.
If I enter coordinates supplied by the html5 location API, I end up right next to Stockholm Central Station in Google Maps (which is my correct location).

The same pattern applies to all the coordinates I supply form my GPS-coordinate-database.

What is going on here? I've read that Google Maps uses WGS84, as does the coordinates from my database. I've also read that the html5 position API uses WGS84. Also, I've read something about Google Maps using Mercator Projection. I am unsure which projection the coordinates from the database has.

Ideally, I'd want a converter to convert between the two formats.

Any ideas?


texts: Creating heatmap for spatial overlap of features (or buffers of features) across different layers using ArcGIS Desktop?

texts:
I have several layers of features.  For example:

Layer1 -> set of polygon features
Layer2 -> set of point features (with buffer around each feature)
Layer3 -> set of polyline features (with buffer on both sides of lines)

Each layers has a level of importance:

Layer1 -> importance level of 3
Layer2 -> importance level of 5
Layer3 -> importance level of 1

I need to generate a heatmap in which the spatial overlap of features across the layers would signify a higher importance.  For example, the polygon created by the overlap/intersection of FeatureA in Layer1 and FeatureB in Layer2 would have a summed importance level of 3+5=8.

So the heatmap should show the spatial importance of all the polygons created by the overlaps of the layers.  What tools might make this possible, and what steps could I use to create this heatmap in ArcMap?


texts: Cleanly recreate 10.3 enterprise geodatabase in Oracle 12c

texts:
Recently I created an enterprise geodatabase on a virgin Oracle 12c instance, using ArcCatalog. I eventually dropped the SDE schema and attempted to recreate the enterprise geodatabase. Now I get the following error:

Failed to insert a value to the geodatabase system table.GDB_ItemTypes

According to the log, the underlying Oracle exception is:

ORA-00001: unique constraint (SDE.R6_SDE_ROWID_UK) violated

I have a feeling that SDE is leaving behind bits and pieces elsewhere in my Oracle instance. Is there a reliable way to cleanly remove all traces? Or is something else going on?

Edit: I am also now seeing a lot of messages like this in sdedc_Oracle.log:

[Mon Oct 24 13:10:49 2016] [50049085] [XPLWS02] db_execute_sql OCI Execute Error (4043).
[Mon Oct 24 13:10:49 2016] [50049085] [XPLWS02] db_execute_sql OCI Execute Error (942).
[Mon Oct 24 13:10:49 2016] [50049085] [XPLWS02] db_execute_sql OCI Execute Error (2289).

Each of the OCI error codes maps to one of the Oracle "not found" error codes (e.g., https://www.techonthenet.com/oracle/errors/ora00942.php).


texts: QGIS: use geometry from different layer in symbology expression

texts:
I have a project with multiple layers.
The purple dots are from a pointfile with the symbology-expression:
z($geometry)> '14.5'. (so it only displays a purple dot when the Z-value is more than 14.5m).

I have a second layer with polygons, visible as the partly-transparent arc-area in red.

The next step i want to make in my project is to:
have the purple dots appear only if:
z($geometry)>'14.5' AND
the x-y of that spot is within the geographical extent of the polygon from the second layer

What step do i have to take to get this done.


texts:
I am using QGIS 3.2.

I am trying and trying to get a line from my points to my labels! I have not moved the labels manually, but they are offset using the "offset from point" choice for placement.
There seems to be a new field in the attribute table called "auxiliary_storage_labeling_offsetquad". I activated the little data defined box and chose the aux storage for the Field Type for everything relevant - see below (maybe more than needed?)

I am trying to use the Geometry Generator and have tried many slight variations in the formula. I tried creating new fields of x and y in my table and defining the labels with those, as suggested in some tutorials (i think for older versions). Heres my latest attempt as an example

I don't know what I'm doing wrong and don't know what else to try.


texts: How to get easting & northing of cell in raster using ArcPy?

texts: How I can get easting and northing of a single cell raster using ArcPy as this value is used for in further steps.


texts: Extract elevation data from Landsat / MODIS imagery?

texts:
Just curious, have anyone tried to extract elevation data from LANDSAT or MODIS imagery? So far, I came across one journal by Toutin who did so using adjacent LANDSAT 7 imageries. Results seem pretty decent.

Anyone have any ideas???


texts: ArcGIS DLL is either not designed to run on Windows or it contains error?

texts:
I have ArcGIS 10.3 running on Windows 7... and I have recently come across an error that I have not encountered before. After starting ArcMap, I receive an error stating:

  C:\Program Files (x86)\ArcGIS\Desktop10.3\bin\GxRaster.dll is either
  not designed to run on Windows or it contains an error. Try installing
  the program again using the original installation media, or contact
  your system administrator

Has anyone come across this before?

ArcMap continues to open but I cannot even do anything as basic as adding data before the program shuts down. The closest I've found via Google is:

http://support.esri.com/en/knowledgebase/techarticles/detail/28065

but it covers a different set of circumstances.


texts: How to create a QGIS map of unprojected data?

texts: I am attempting to display data generated by Ubisense technology. The data contains non-geographic x y coordinates. I would like to load this data into a QGIS project to perform analysis. Is it possible to load and analyze unprojected data into a QGIS project with no CRS? I have found some solutions to doing this with Leaflet but need to employ some QGIS tools to fully explore the data.


texts: Apply a function to geometry coordinates

texts:
I am experimenting with cloud shadow masking approaches. My workflow so far looks like this:

var maskClouds = function (..) {
...
};
var mask = maskClouds (image);
var cloud_polygons = mask.reduceToVectors();
var cloudCoords = cloud_polygons.geometry().transform(crs).coordinates()

Now I want to iterate over each polygon's vertex and apply an equation to it to obtain cloud's shadow coordinates. The equation that I want to apply is different for X and Y so I can't just flatten and map over everything. The issue is that cloudCoords is a multiple nested list as seen on image below.

I have been banging my head against my keyboard for few days now and can't figure out how to do this. My approach at the moment is multiple nested ee.List.map() utilizing get and a reducer. I can convert it to a function that sort of does the job, but it's messy and not very clear. Especially line 46 is ridiculous, but I couldn't get it to work any other way. Is there a more elegant way to do this? Why does EE even require me to constantly cast the arguments into ee.List()??


texts: Need to connect to MySQL or MariaDB databases in QGIS 3.4+

texts:
I need to connect to MySQL/MariaDB database tables where my geographic data is stored. I used to be able to do this in earlier versions of QGIS, but that option disappeared ~ QGIS 2.14. Are there any plans to include this option in QGIS 3.4+ or is there a way of connecting now which I am missing?

I've tried to use the plugin which seems to allow importing MySQL data, but I get an error during installation and the help provided is not useful.


texts: Programmatically determining if layer supports query capability via ArcGIS Server REST API?

texts:
I am using ArcGIS Server 9.3.1 SP 1. I want to be able to determine the capabilities of each published layer, specifically I am looking for all layers with query capabilities.

Being familiar with ArcGIS Server 10 I thought I could programmatically inspect the capabilities list on the layer response page. For example, Average US Household Size has MAP, QUERY, and DATA capabilities.

However it appears that ArcGIS Server 9.3.1 does not publish layer capabilities through the REST API. I think that I could get this information by scraping the HTML for the layer resource and looking for the list of supported operations in the HTML.

Query

But this seems like brittle code.

How would you programmatically determine if a layer supports the query capability via the ArcGIS Server 9.3.1 REST API?


texts:
I need to create Thiessen Polygon from a point collection and then intercept them with other polygons.

I need to do this from a java program.

I'm using the Geotools library. I was able to load the points from a .shp file.

I found this https://github.com/mapplus/spatial_statistics_for_geotools_udig
but I can't find any documentation on how to use the ThiessenPolygonProcess class

How can I create thisen polygons?


texts:
So I needed to create a script in Python that allows me to calculate distance from one point to another using coordinates. The first point had fixed coordinates and the coordinates to the second point should be through user input. I managed to create that script. The last thing I have to do is to create a statement that allows me to intercept incorrect entries (e.g., letters instead of numbers, nonsensical Degree inputs) using e.g. try...except. So I'm having a bit trouble here since I'm only getting started with Python. Here's my code:

lat1= 47.79
lon1=13.00
name= "Entfernung "
typ= "Km"
userEingabe= input("Geben sie lat2 ein:")
userEingabe2= input("Geben sie lon2 ein:")
lat2 = float(userEingabe)
lon2 = float(userEingabe2)
import math
distanz= 6370*math.acos(math.sin(math.radians(lat1))*math.sin(math.radians(lat2))+math.cos(math.radians(lat1))*math.cos(math.radians(lat2))*math.cos(math.radians(lon2)-math.radians(lon1)))
print(name+str(distanz)+typ)
input("Press return to close this window...")

How can I do this?


texts:
Every time I download QGIS on my MacBook Air and try to open the application I receive a message that reads, "QGIS can't be opened because Apple cannot check it for malicious software," along with a sub-message that complains about the software needing to be updated.  This does not make sense considering I downloaded the newest version.
Has anyone else experienced this, and if so, how did you combat it?


texts: Hunting map for personal use (or to publish)

texts: Okay, I do not know anything about GIS. I just downloaded it today to try to get a jump start on my GIS experience for a class next semester. I want to start off by making something useful so I want to make a map of hunting spots that I use. Can someone tell me where I would begin?


texts: How to refer to another layer in the field calculator?

texts:
Is there a way to select an attribute from a polygon layer and insert the value into a virtual field of a point layer using "within" in the field calculator?

CASE
 WHEN within($geometry, geometry_polygon) THEN attribute_polygon
END


texts: Computing pairwise intersection of corresponding polygons in QGIS

texts:
I have two polygon layers - call them Layer 1 and Layer 2. Conceptually speaking, they represent two different versions of the same dataset.
I want to perform pairwise Boolean operations on corresponding polygons in each layer. That is, I want a single layer which contains the union/intersection/difference/... of every pair of polygons with the same value of an attribute.
In the following example, I have Layer 1 and Layer 2 and I want to generate the two features in the pairwise intersection layer:

Conceptually, the pairwise intersection shows me the areas of land that have remained in polygons A and B between the two versions of the dataset. (In reality my layers have many more than 3 polygons.)
I have written an R script to solve this problem, but I am wondering if there is a way to do it entirely using the QGIS user interface.
In recent versions, QGIS has a feature that allows you to iterate over every feature of a layer, but I can't see how this can be applied in this situation. What's more, the QGIS Graphical Modeler doesn't seem to support loops.


texts:
I have many aerial photos. I created a tile_index with gdaltindex. Now I would like to display the aerial photos of the tile_index in qgis-web-client.

How can I do that?


texts: Checking if Lng and Lat fall inside polygons from ESRI Shapefile

texts:
I have two input files.

First: CSV file with a list of points each defined with Lng, Lat, Name

Second: ESRI Shapefile defining a number of polygons

I would like to determine for each point I have (from the CSV file) which polygon does it fall inside (if any)?

I will be using R.

I know that this might be a straightforward task but I am totally a newbie to GIS.

I have done some searching, and I have found that I can use "MapTools" package in R to load the ESRI shapefile, but I don't know how to move after that.

I managed to read the shapefile using readShapePoly function in the MapTools package and now I can plot the polygons and iterate through them in R. I also loaded the points from the CSV file into a data frame with two columns (lng, lat).  Now I need to check for each point which polygon does it fall inside (if any)...

I managed to do this using the function over from package sp in the way explained here, however I am getting NA result for all points which is unexpected. I think it is due to different projections for the points and polygons.. Examining the polygons loaded from the shapefile using summary function gives me
Is projected: NA, proj4string : [NA]

Any tips ?

Any advice, good tutorial or code sample showing how to do that would be highly appreciated.


texts: What generation of the MrSID format is supported by ArcGIS 9.3?

texts:
This is probably old news to some, but I just learned that MrSID (.sid) files have different 'generations' of file formats - so there are MrSID Generation 2, Generation 3, and Generation 4 files.  Does anyone know what generation of .sid is supported in ArcGIS 9.3?

Thanks!


texts:
Running  "mapbox-gl": "^0.53.1"

I want to update the color of a layer "type": "fill-extrusion"
This is not just one feature that I select, but it might be a multitude of features that are altered (otherwise this highlight feature with click in mapbox gl solution might work). but adding a new layer is therefore not an option. This is what I tried - it obviously does not work.

this.map.on('click', 'grid-test', function (e) {
      e.features[0].properties["color"] = "#ff00ff";
});

I have not found propper update methods that I can call to tell a layer to rerender. The other solution I see is to reset all the data - but I am still a bit reluctant to that solution. Coming from an OL background, I expect certain basic functions to exist.


texts: Geometric functions in field calculator in QGIS

texts:
I had a look in the manual of QGIS and I also browsed the Internet to find some useful information about the geometric functions of the field calculator.

I've found How to use the Intersects function in the Field Calculator of QGIS? but I'm still confused.

Does anyone have some practical examples to add?

I think all these functions could be very useful, but at the moment, their usability is quite difficult for a 'normal' user.


texts: In print composer, I would like to syncronize the scale of the map with the Grid scale. For example, in print composer I am making a map in 1/1000 scale, so I go to grid,and insert "map units" x=100 y=100. I am copying this map layout and in the second map the scale that fits is 1/200, so I go to grid,and insert "map units" x=20 y=20... Is there an expresion to write, so it can understand the map scale and autochange the grid scale? In grid decoration that happens automaticaly with zoom in-out, can I do the same in print composer?


texts: I need to create a 32.1869 km (20 miles) buffer around my attributes, but the problem is the CRS needs to stay in NAD83. Is there a work around so I will be able to create buffers in km but still have the CRS with the units in degrees?


texts: Adding features dynamically to an ArcGIS Javascript FeatureLayer with applyEdits()

texts:
When attempting to add features to a featureLayer with applyEdits, the features do not get added to the layer.

    var featureCollection = JSON.parse(mapdata);
    var features = JSON.parse(mapdata).featureSet.features;
    featureCollection.featureSet.features = [];
    var pointFeatures = [];
    var featureLayer = new esri.layers.FeatureLayer(featureCollection, {
       id: 'HourlyDataLayer'
    });

    for (var i = 0; i < features.length; i++) {
       if (features[i].attributes[selectedField] > maxValue) {
          maxValue = features[i].attributes[selectedField];
       }
       if (features[i].attributes[selectedField] < minValue) {
          minValue = features[i].attributes[selectedField];
       }
    }

    for (var i = 0; i < features.length; i++) {
       var feature = features[i];
       var size = (feature.attributes[selectedField] - minValue) * ((150 - 5) / (maxValue - minValue)) + 5
       var symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE, size,
           new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
           new dojo.Color([255, 0, 0]), 1), new dojo.Color([0, 255, 0, 0.25]));
       var attr = feature.attributes;
       var latlong = LatLonToWebMercator(feature.geometry.x, feature.geometry.y);
       var geometry = new esri.geometry.Point(latlong[0], latlong[1], spatialReference);
       var graphic = new esri.Graphic(geometry, symbol);
       graphic.setInfoTemplate(infoTemplate);
       graphic.setAttributes(attr);
       pointFeatures.push(graphic);
   }

   featureLayer.setEditable(true);
   featureLayer.applyEdits(pointFeatures, null, null);

   map.addLayers([featureLayer]);


texts: How to trim cell values in an attribute field

texts:
I am working in ArcMap 10.4.1 and need to trim cell values in the NAME field of a feature class. Everything starting from double underscores needs to be deleted. This is my attempt in Field Calculator... [Name]LTrim("__"). This results in the Field Calculator telling me

  "There was a failure during processing, check the Geoprocessing Results window for details."

the Geoprocessing Results window says,

  "General error executing calculator", "ERROR 999999: Error executing function", "Type mismatch: 'esri__1LTrim'", "Failed to execute (CalculateField)"

The field is a String and I get the same error message regardless of whether I put the underscores in double quotes, single quotes or no quotes. But if I use no quotes, it says "Invalid character" instead of "Type mismatch..." in the Results.


texts: Is it possible to change dynamically the map spatial reference?

texts:
I have a map that uses ArcGIS Online in the small scales. So my map needs to be in Web Mercator in small scales.
In the big scales, my web client Flex application uses some feature and map services to do some area and distance calculations.
So my map needs absolutely to be in Lambert93, in the big scales, because geometric calculations in Web Mercator are not accurate at all.

=> I need to change the map spatial reference when I move from big/small scales to small/big scales. Is there a way to change the spatial reference of a map?

Regards.


texts:
I'm trying  to create a PyQGIS standalone script in windows 10 but I have some errors.

First I have read this post and I follow comment of Mr. @caiohamamura but I have semi-success I think, and I don't why happen this error.

first :

Your PYTHONHOME should be:

C:\OSGeo4W64\apps\Python27

Your PATH should include (in the beggining):

C:\OSGeo4W64\bin; C:\OSGeo4W64\apps\qgis-ltr-dev\bin

PYTHONPATH should have:

C:\OSGeo4W64\apps\qgis-ltr-dev\python
C:\OSGeo4W64\apps\qgis-ltr-dev\python\plugins
C:\OSGeo4W64\bin\python27.zip
C:\OSGeo4W64\apps\Python27\DLLs
C:\OSGeo4W64\apps\Python27
C:\OSGeo4W64\apps\Python27\lib
C:\OSGeo4W64\apps\Python27\lib\site-packages

and finally the test.

Python in cmd prompt:

Python in OSGeo shell :

Why in OSGeo shell I take this error :

ImportError: DLL load failed: ─ίΊ ▐ΪάΊ ϊΫΊάΪⁿ Ίά ίΊΪΎΏώ≤Ϊί▀ ύ ΆάϋΎ±ώ≤Ή▌Ίύ ΈίώΪ.

What am I doing wrong? What is the difference?


texts: What is an anisotropic cost-of-passage map called in ArcGIS 10.1

texts:
I am trying to make sense of a few sources of information.
In Geographic Information Systems in Archaeology Conolly and Lake (2006: 214-224)
provide a sort of "step-by-step" procedure for creating accurate LCP models.  However they do not advocate using ArcGIS, which is what I am stuck with.

They say: cost-passage-map > accumulated cost surface > LCP algorithm.
That is all well and good but these terms are different in ArcGIS 10.1 and I am not sure which I should be using.
For example, in ArcGIS the Path Distance function provides a 'spreading function' over a cost surface map, but according to Conolly and Lake a cost surface IS the spreading function.  Any clarity would be helpful!


texts:
I am working on ArcGIS GeoEvent Server 10.7  on Windows Server 2016.
ArcGIS GeoEvent Service is working fine, sometimes  it stops suddenly and currently its very limited data added on it. For troubleshoot purpose we checked its logs, installation details, Java Process but its seems normal.
My purpose is to track its service status (whether its started or not). Can we write custom batch script as mentioned here ?