texts: Why does arcpy.sa.Sample give TypeError: Sample() takes at least 3 arguments (3 given)?

texts:
I'm building a script where I'm taking a standardized CSV that one of our data processing packages consistently exports and turns it into a z-aware shp after running through Sample as well.  Along the way, I'm hitting a few roadblocks and could use any help I could get.  I've also included where I think I'll need to go afterwards in pseudocode.

#import modules
import arcpy
from arcpy import env
from arcpy.sa import *
import os
arcpy.env.overwriteOutput = True

For testing I've been hardcoding these to place on disk.  They'll vary between projects though that I'm building into the tool.

#set in/out parameters
incsv = arcpy.GetParameterAsText(0)
indem = arcpy.GetParameterAsText(1)
outshp = arcpy.GetParameterAsText(3)
spatialref = arcpy.GetParameterAsText(4)
ftworkspacefldr = arcpy.GetParameterAsText(5)

#import xy events layer
arcpy.MakeXYEventLayer_management(table=incsv,in_x_field="ClickX",in_y_field="ClickY",out_layer="xylyr",spatial_reference=spatialref,in_z_field="#")

#maxe xy shp
outfc = ftworkspacefldr + "/XYContacts.shp"
arcpy.CopyFeatures_management(in_features="xylyr",out_feature_class=outfc,config_keyword="#",spatial_grid_1="0",spatial_grid_2="0",spatial_grid_3="0")

#run sa.sample on shp
outxyztbl = ftworkspacefldr + "/FinalXYZContactsTable"
arcpy.sa.Sample(in_rasters=indem, in_location_data=outfc, resampling_type='NEAREST')

As I need to preserve the 50 other columns in the csv, I have to then join the output and copy over elevation.  The sample result only yields (OID,inputpointFID,x,y,sampled raster value)

##join output table to water depth field
#inzfield = str(indem)
#arcpy.AddField_management(outfc,"Elev_in_m","Double")
#arcpy.JoinField_management(outfc,"FID",outxyztbl,inzfield)

##copy sample z- result to new field in fc
#arcpy.CalculateField_management(outfc,"Elev_in_m",inzfield)

##make output table eventslayer (z-aware) and export to final shp
#arcpy.MakeXYEventLayer_management(outxyztbl,in_x_field="ClickX",in_y_field="ClickY",out_layer=xyzlayer,spatial_reference=spatialref,in_z_field=inz)

My big current error is this (I'm not sure how sample doesn't work with all 3 arguments present?):

Traceback (most recent call last):
  File "C:\Python27\ArcGIS10.2\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript
exec codeObject in __main__.__dict__
  File "C:\01_Data\_ArcGISTools\Python Toolbox\Development     Workspace\swCSVtoshp.py", line 35, in <module>
arcpy.sa.Sample(in_rasters=indem, in_location_data=outfc, resampling_type='NEAREST')
TypeError: Sample() takes at least 3 arguments (3 given)


texts: Smooth, not simplify, lines features in PostGIS

texts:
I'm trying to automatically generate paths to place labels on that follow the shape of rivers, 4wd tracks and other very windy lines. At first I thought the st_simplify() function was the answer, but it basically has exactly the opposite goal. Here's a result of st_simplify(way,300):

st_simplify() is trying to preserve the maximum amount of information from the underlying geometry, resulting in a very spiky line. What I'm looking for is a rough approximation of the line - something that would kind of pass down the center, without actually hitting any of the corner points.

The ultimate goal is to get more labels rendered in TileMill, without having to increase the text-max-char-angle-delta setting, which looks pretty bad.

Is there a way to achieve this? I'm looking for a script or function to call - not just an algorithm to attempt to implement.

(OpenStreetMap data in PostGIS, rendered using TileMill. Happy to pre-process - performance is not a big concern.)

Also, note the difference from this question - I don't want "a smoother line of roughly the same significance to a human interpreter", I want "a smoother line roughly in the centre of the old line".


texts: I create getfeatureinfo with popup but it dosn't work (error 404)

texts:
This is my code for my page (index.html)

            info = new OpenLayers.Control.WMSGetFeatureInfo({
            url: 'http://localhost:8080/geoserver/wms',
            title: 'get feature info',
            queryVisible: true,
            eventListeners: {
                getfeatureinfo: function (event) {
                    map.addPopup(new OpenLayers.Popup.FramedCloud(
                        "chicken",
                        map.getLonLatFromPixel(event.xy),
                        null,
                        event.text,
                        null,
                        true
                    ));
                }
            }
        });

        map.addControl(info);
        info.activate();

and it's proxy code :  OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";

But I see a 404 error. Can someone please help?


texts: GeoDjango Admin: Adding PointField latitude and longitude to other fields

texts:
I've been redesigning my application to allow users to set markers more easily. One thing I need to include for backwards compatibility purposes is that the new model must have a latitude and longitude field in the database.

Is it possible to modify the GeoDjango admin so that the latitude/longitude fields automatically populate after I select a point on the map?

Here's a screenshot of how my admin is currently:


texts: How can I upload an image into the non-header part of the infowindow in #Cartodb?

texts: There are instructions on uploading image into the infowindow header in CartoDB, however, I would like to upload image into the sub categories under CartoDB and encountered problems. Could you kindly advise on the procedure to do so?


texts:
How can I set DPI (or reduce quality in some other way) in QGIS 3.12 when exporting Atlas as PDF? My output is 300 MB for 89 A4 pages and the quality/resolution is unnecessarily high.

I can't find the composition tab as mentioned in Adjusting QGIS Print Composer output resolution? (qgis 2).


texts: Changing polygon circles to hexagons using QGIS

texts:
I received an answer to Changing Points into Polygons using QGIS, which enabled me to change the point to polygons using the Rectangles, Ovals, Diamonds Tool, which I used circles.
My client wants the shape to be a hexagon based on the width field in the data. The data field has a metre amount as in 5 for 5 metres.
Is there any way to make the circle a hexagon?


texts: Leaflet with GeoJSON Tiles and a Partitioned Datastore

texts:
I'm looking at displaying a frequently updated (potentially thousands of points per second) global dataset of locations on a tiled slippy map. Functionally I'm just going to be putting a marker down to show the presence of an event as opposed to necessarily providing an indicator as to the number of events a given marker represents.

This level of write throughput basically indicates using a partitioned datastore (Cassandra or initially Azure Table) where one partition corresponds to a single quadtile on the standard web mapping projection. Given the number of points I believe I'll need to load the data by tile, presumptively using https://github.com/glenrobertson/leaflet-tilelayer-geojson/ on a Leaflet map, while to support lower zooms I'll have to coarsen the resolution of the points to reduce the total number.

I'm only going to be able to pull the entire tile represented by a partition because the ability to do a range query (normally used for retrieving subtiles) is instead used for time ranges. This means in order to support ~Z1 to ~Z15 I would need either one set of data per zoom level, or to have 'native' data available for a smaller number of zoom levels with some combination of under zooming (is there a term for that?) and over zooming.

So to achieve this my thought was to have data available in partition per tile at Z3 ~10 mile resolution (Z1-Z5), Z8 ~500 meter resolution (Z6-Z10), Z13 ~20 meter resolution (Z11-Z15). Then add this data as 3 data layers, doing underzoom on the server side (ie at Z6 loading 16 Z8 tiles worth of data on the server side), and mark MaxNativeZoom to get 2 levels of client size over zoom.

Is this a reasonable approach to displaying this data, or is there a likely better approach?

For example, would it be better to just use three layers with MaxNativeZoom for each set to the maximum intended server side underzoom (downside is extra data on scrolling, upside no loads for the same data)? Is another tradeoff on amount of data vs zoom level more sensible? Is there a good way (and reason) to expose this as one layer as in this question?
Would Polymaps work better since it's dynamic data (despite the project not getting any updates in 2 years)? etc.


texts: Coloring of features in ArcMap 10.1 changes randomly while zooming

texts:
I am using the sovereign states shapefile (ne_110m_admin_0_countries.zip) from http://www.naturalearthdata.com/ and joined the attributes with a spreadsheet file that codes many (but not all) country codes into 0,1,2, and 3. I would like to color each of these four codes with a different color using the Symbology->Unique Values tab, but the coloring is not correct. Furthermore, it seems to change randomly if I zoom in and out. The difference between the two screenshots is just the zoom level and you can see how the colors change.

I had this problem several times already after joining tables, but I could never figure out the source of the problem.


texts: Problems Joining CSV to Shpfile arcgis 9.3

texts:
So I have been trying to get this to work all day and have had no success. I am attempting to join a CSV file with a Shapefile. The CSV is from the Hud's location affordability portal (http://www.locationaffordability.info/lai.aspx?url=download.php) and the shapefile is coming from tiger.

I have tried moving the file into microsoft access and converting it to a dbf it tells me that I "cannot define field more than once" and when I do a find replace to in excel it changes the number to scientific notation. I have tried changing the format of the column and leaving it alone in hopes that it would not be effected, but that is not the case.

any thoughts?


texts:
I would like to custumize the openlayer3 viewer integrated in the Geoserver (2.13) to have more zoom levels (by default there are 28 zoom levels with a zoom factor of 2). In other words, I would like to have more available scale and not just 1:2, 1:4,...1:34K, 1:68K, 1:136K,...,1:558K.

I am not sure I have the good approach but maybe modifyting this file could be the solution : http://localhost:8080/geoserver/openlayers3/ol.js

Indeed, there are some parameters that could be modified :

g=void 0!==a.minZoom?a.minZoom:0;d=void 0!==a.maxZoom?a.maxZoom:28;var h=void 0!==a.zoomFactor?a.zoomFactor:2;

The problem is that I can't find this ol.js file in my geoserver.

Is the approach good?


texts: Publishing PostGIS layer where PostgreSQL in Amazon RDS

texts:
I am trying to publish a PostGIS layer in GeoServer from my local machine. PostgreSQL is in AWS RDSs server. I am unable to see any features in layer preview. AWS RDS is SSL-enabled. it is worknig fine if SSL connection is disabled.

How can I fix this while SSL-enabled?

GeoServer is in my local machine and PostgreSQL in AWS RDS.


texts: Leaflet Sidebar - How to get data based on the GeoJSON you clicked?

texts:
I am having trouble getting my GeoJSON data to appear on my sidebar when I click on a marker?

As right now, I am able to click on a marker and make the sidebar appear, but without any information.

Below is the line of code I am using:

var aLayer = L.geoJson(GeoJSON, {
    });

aLayer.on('click', function () {
        sidebar.toggle();
        $('Name').innerHTML = "Name: " + feature.properties.name;
    });

My real issue is that I can't figure out how to call the GeoJSON properties when I click on the marker. I am keeping getting this error when I check the console log: feature is not defined. I tried using the code that is provided in this page,Leaflet Sidebar - set content depending on clicked GeoJSON feature, but I can't get it to work.


texts: QGIS imports two excel double vectors: one as double, the other as QString! Why?

texts:
I work in QGIS 2.8.3 and import an excel file (xlsx version 2013) containing 5 vectors: string, string, double, int, double. All vectors have a heading. However, QGIS tells me that the last double vector is imported as a QString. I also tried to use rounded values and import them as ints, copy everything as value into a brand new file, but to no avail.

I know that you can force QGIS to import vectors from CSV-files as predefined variable types, but I don't want to use CSV-files, and I particularly want to know why it does import one double as double and another double as QString. Is it a bug? If so, when does it occur?


texts:
I try the ArcSDEQuerier transformer but it doesn't work when i specified the attribut :
name ='TEST'
for the search (Where).
How does this transformer work ?
An idea ?
Thanks
Julien


texts:
I have field called PIN in my parcels shapefile. Formatting looks like this: xx-yy-zzzzz, just much longer.  I want to split the first two sections on one line and the third (the z's) on the next.  I figured I could do this with an expression in 'Label Expression', but do not know how to parse every record in a field.

So basically I want this to do something like this:

PIN[:5] + "\n" + PIN[6:]

What is the correct syntax?


texts: set infoTemplate for various graphics in graphics layer in loop

texts:
I am successful at getting an info window pop up on the event click of a marker on a map. Now, what I'm having trouble with is passing unique information for each graphic in the loop to the individual info window.

Here's my loop

for(i=0;i<coords.length;i++){
            xcoord=coords[i][1];
            ycoord=coords[i][2];
            type=SimpleMarkerSymbol.STYLE_SQUARE;
            if(coords[i][3]=='stream'){
                var point = new Point(xcoord, ycoord);
            }
            var graphic = new Graphic(point, new SimpleMarkerSymbol(type).setSize(10).setColor(usgscolor));
            //these next four lines are where I'm having confusion
            var infoTemplate = new InfoTemplate();
            infoTemplate.setTitle("title");
            infoTemplate.setContent("content");
            graphic.setInfoTemplate(infoTemplate.setTitle("title"));
            glayer.add(graphic);
        }

Then I add each graphics layer at the end and an event listener for the pop up

map.addLayer(glayer);//add all the individual grahics in the graphics layer to the map

    glayer.on('click', function(evt) {
        map.infoWindow.setTitle(graphic.getTitle(infoTemplate));
        map.infoWindow.setContent(graphic.getContent(infoTemplate));
        map.infoWindow.show(evt.screenPoint,map.getInfoWindowAnchor(evt.screenPoint));
    });

These various topics on the arcgis developer site is what I'm using for reference but I still can't seem to put the pieces together

https://developers.arcgis.com/javascript/jshelp/intro_formatinfowindow.html

https://developers.arcgis.com/javascript/jsapi/graphic-amd.html

https://developers.arcgis.com/javascript/jsapi/infotemplate-amd.html

https://developers.arcgis.com/javascript/jsapi/infowindow-amd.html


texts:
I am looking for help to write a loop a arcpy.CalculateField_maagement process where the User is asked with the 'raw_input', prior to the tool running "Do you need to change a field value(yes/no):",

if he types 'yes' into the input he is then prompted to enter a VB expression to replace a specific field like so "Replace([Column],"Value","newvalue"),

and the calculate field tool runs,if he types 'no' the script skips the Calculate field process and continues on to the next tool,

if the tool has run he is then asked, "Are there anymore fields you wish to update(Yes/no):" if he types 'yes' he is asked to enter another VB expression to replace a field value,

if he types 'no' the script skips the Calculate field process and continues on to the next tool.

I just need help writing the loop I have a giant python application that works but is not flexible in terms of allowing the user to edit data, and this will provide a lot of flexibility by allowing the user to choose if he wishes to edit a value or not.

here is a snippet of where I would like the Loop, I am currently also working on a way to Loop it and will edit the question with any progress I have made.

YesNo = raw_input(Do you need to change a field value(yes/no): ) #Ask User if there is a field value he wants to change, if his answer is yes then he is prompted to enter a SQL query that will run in the the Calculate Field Process, if he says no, the code skips the Calculate Field Process

VBexp = raw_input("Enter VB Expression to Update Field Names : ") #Enters a replace for his desired field expression
arcpy.CalculateField_management("featureclass", "Column", VBexp , "VB", "")

Again = raw_input("Are there anymore fields you wish to update(Yes/no): ") #If the user specifies Yes he will be prompted to enter a new VB expression to change a different field & and if he says no the script will continue running


texts:
SetGeoReference it is not working with this code. (I think that I should need some more explanation on how this works...)

"""

Retrieve Georef & Projection from a reference image

"""

ReferenceTif = gdal.Open(img_path_tif)
GeoRef = ReferenceTif.GetGeoTransform() #I take the geo ref of the ref image
projRef = ReferenceTif.GetProjection()  #I take the proj as of the ref image

print(GeoRef)
(654000.0, 0.3, 0.0, 4203000.0, 0.0, -0.3)

"""

Set the Georef & Projection of a image

"""

test = gdal.Open('test.tif')            #Open a new image
test.SetProjection(proj)                #Set the projection like the ref image
test.SetGeoTransform(GeoRef)            #Set the GeoRef like the ref image

"""

Check if the work is done

"""

result = test.GetGeoTransform()         #Get the GeoRef of the test image
print(result==GeoRef)                   #Check if the work is done correctly
print(result)

False (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)

Any ideas ?


texts: Prevent QGIS from loading WMS services when opening project

texts:
I have a QGIS project with several hundred WMS and ArcGIS MapServer layers. Every time I open the project it starts loading them one by one, which my take quite a while.

Is there a way to prevent them from being loaded automatically?

I checked the Network Options menu, but besides setting connection timeouts, there is no option in regards to loading on startup.


texts: How to move WMS layers independently using OpenLayers 3 (with GeoServer)

texts:
I have two GeoServer WMS layers on OpenLayers 3 map. What I need to do is to make a button that will move one layer, let's say 10m to the East. Other layers should not move. Moved layer should keep 10m offset when zooming and panning.

I looked through OpenLayers documentation and examples, but I found nothing.


texts: Why are the labels not showing when I load a .qml file in a standalone pyqgis script?

texts:
The first image is the final output that I have when I run my standalone script. The second Image shows the grid that I made and the sample labels that I want to put on my final output. I saved the style in .qml format but the only style that the script outputs is the color and transparency. not the label.

What am I missing?
I am using QGIS 2.18 and Ubuntu 16.04

The code below is what I use in loading .qml files

uri = '/home/francis/Documents/mapfile/SHP/Grid.qml'
grdLayer.loadNamedStyle(uri)
grdLayer.triggerRepaint()


texts: Counting attribute value based on location using ArcGIS Pro?

texts:
I have a school district polygon divided up by neighborhood, and I am trying to determine the number of students from each grade per neighborhood. The student point file contains an attribute with grades 1-12. I would like the output to be the neighborhood polygons with 12 added columns containing the count of each grade. I am looking to do this with model builder or a script because their are over 200 neighborhoods.

Thus far my research points me to intersect the neighborhood ID numbers to the points, join the students to the neighborhoods, and then use the field calculator to populate a field for each grade.

Is there a simpler way to automate this in ArcGIS Pro, or am I on the right track?

I would rather create a model that counts the attribute 'grade 5'for all points located in each neighborhood and creates a new column or adds it to an attribute column in the neighborhood shapefile, but my brain is frozen at the ModelBuilder.

I have AcrGIS Pro 2.3 with the basic license.


texts:
I'm using QGIS 2.18 (Las Palmas)
I received Data from a client in citygml-Format. The only Programm I have is QGIS and i have tried everything to open it. It only shows me 13 of 72 Objects of the layer.

I would like to correctly see all the buildings in this layer.


texts: Opening Web AppBuilder for ArcGIS Developer Edition - [yourmachinename]?

texts:
I'm attempting to run WAP Developer Edition for the first time. The instructions are to:

"On Windows, double-click the startup.bat file in the unzipped folder. The batch file starts the Node.js server in the Command Prompt window and Web AppBuilder in your default browser with http://[yourmachinename]:3344/webappbuilder. If the browser is closed, you can reopen Web AppBuilder in the same—or a different—browser as long as Node.js is running in the Command Prompt window."

The browser does not open automatically for me so I need to type in the URL.

How can I determine what [yourmachinename] is for my computer?


texts:
I'm using ol3, ol3-cesium for creating 2D map & 3D globe.
These things are getting used at backend

1) tinyows
 2) map server
  3) postgis

Now I want load 3D models on my map and globe. Lots of things are available, but i don't know which one to use.

Any guidance would be helpful.


texts: How to Have Geocoding Service Return Results from Partial Street Name Input?

texts:
Currently we have an address geocoding service published to ArcGIS Server that is being utilized by an ArcGIS Viewer for Flex application.  The service works just fine, but the end users would like for it to be more suggestive when they type in an address query.  The main issue is that the geocoder does not return any search results until the entire road name has been entered.  Our end users would like for it to return results even if only part of the road name is entered.  I am having a hard time figuring out how to accomplish this because our reference data does not separate the road name components into individual fields like base name and suffix.  All the street name information is contained in one field.  I have adjusted the values for minimum match score, minimum candidate score, and spelling sensitivity, but these changes do not have the result that we are looking for.

Is returning search results based on a partial street entry something that can even be accomplished with the geocoding service, or does that type of functionality have to come from the application itself? I have seen java script applications that provide suggestive address searches, but I am not familiar with Flex at all and am unsure if that can be done.


texts:
I am trying to execute service tool that written in python with arcpy.
When I am executing the service I got submitted...
Executing...
Failed.
I looked the logs, and I got there:
Failed to execute(script_name)
Error executing tool.

I tested that, and I realized that the script not even start to run.
I tried to remove and publish several times with differences, and got nothing.

Details:
Windows server 2012 R2
Arcgis server 10.3

After a lot of tests, I realized that this one line of code makes it fails.

arcpy.CreateFileGDB_management(out_folder_path, out_name)

The thing is, I executed it on my computer and it working(that's why I published it successfully)
Only at the server it's not working.

The main problem is the createFileGDB_management function. Somebody knows why it doesn't work in the when executing Arcgis service tool in the Arcgis server?


texts: QGIS: Error code showed up after Landsat 8 TOA and crashed the program (SCP plugin)

texts:
Trying to get all bands corrected but it failed every single time in version 3.10 or 3.16.
Error codes showed as below:


texts:
I want to use JPEG2000 images in R on a Mac. The problem is if I use custom rgdal downloaded from CRAN, the function raster does not recognize JPEG2000 images.
Therefore Jakob described a workaround (Link to the old question: https://gis.stackexchange.com/a/260487/163399) which worked for me last year:

install.packages("rgdal", type = "source", configure.args="--with-gdal-config=/Library/Frameworks/GDAL.framework/unix/bin/gdal-config --with-proj-include=/Library/Frameworks/PROJ.framework/unix/include --with-proj-lib=/Library/Frameworks/PROJ.framework/unix/lib --with-proj-share=/Library/Frameworks/PROJ.framework/unix/share/proj --with-proj-data=/Library/Frameworks/PROJ.framework/unix/share/proj --with-data-copy=yes")

But when I try it nowadays on a new Mac with a new R-setup (RStudio: Version 1.2.5033, R: R 3.6.3) it does not work anymore. I installed GDAL using KyngChaos packages (GDAL 2.4.2) but when I execute the command Jakob mentioned, there are the following error messages:

* installing *source* package ‘rgdal’ ...
** Paket ‘rgdal’ erfolgreich entpackt und MD5 Summen überprüft
** using staged installation
configure: R_HOME: /Library/Frameworks/R.framework/Resources
configure: CC: clang
configure: CXX: clang++ -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.4-7
checking for /usr/bin/svnversion... yes
configure: svn revision: 845
configure: gdal-config set to /Library/Frameworks/GDAL.framework/unix/bin/gdal-config
checking gdal-config exists... yes
checking gdal-config executable... yes
checking gdal-config usability... yes
configure: GDAL: 2.4.2
checking C++11 support for GDAL >= 2.3.0... yes
checking GDAL version >= 1.11.4... yes
checking GDAL version <= 2.5 or >= 3.0... yes
checking gdal: linking with --libs only... yes
checking GDAL: gdal-config data directory readable... yes
checking GDAL: /Library/Frameworks/GDAL.framework/Versions/2.4/Resources/gdal/pcs.csv readable... yes
./configure: line 2107: pkg-config: command not found
configure: pkg-config proj not available
set PKG_CONFIG_PATH to the directory containing proj.pc
configure: PROJ version not determined using pkg-config proj
configure: proj CPP flags:  -I/Library/Frameworks/GDAL.framework/Versions/2.4/Headers -I/Library/Frameworks/PROJ.framework/unix/include
configure: PROJ LIBS: -L/Library/Frameworks/PROJ.framework/unix/lib
checking PROJ header API:... proj_api.h
checking proj_api.h presence and usability... yes
checking PROJ version >= 4.8.0... yes
configure: PROJ_LIB: /Library/Frameworks/PROJ.framework/unix/share/proj
./configure: line 2350: test: =: unary operator expected
checking PROJ: proj.db found and readable... no
Error: proj/proj.db not found
Either install missing proj support files, set PROJ_LIB to the correct path, and if need be use the --with-proj-share= configure argument.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status

I controlled the corresponding files in the directories and everything seems to be correctly installed. Do you have an idea or solution?


texts: Free tool to simplify parcel shapefiles?

texts: Is there any tool available which let's me run millions of parcel shapefiles and simplify them?


texts: how to make a deployable launch shortcut for GE viewers that can be used on iOS

texts:
How can I make launch shortcuts for GE viewers that can be used on mobile devices, specifically on iOS? I want to launch GE through the mobile device management software, so the users can feel like they are opening an app and we can manage who has access better.

I searched around but could not find any examples online or help articles directly related to this.


texts: EXIF: Can you calculate latitude from longitude value and true north value?

texts:
I have an iPhone image that contains the GPS longitude and a bearing relative to True North. Is it possible to calculate the latitude from these two values?
EXIF metadata in question:

GPS Longitude Ref:E
GPS Longitude: 153.079117 degrees E
GPS Altitude Ref: Unknown (Sea level)
GPS Altitude: 14.1651 m
GPS Date Time: 04:02:17.00
GPS Speed Ref: km/h
GPS Speed: 0
GPS Img Direction Ref: True North
GPS Img Direction: 284.7391
GPS Dest Bearing Ref: True North
GPS Dest Bearing: 284.7391
GPS Date Stamp: 2020:05:25

I also know roughly where the photograph was taken, as in the capital city, state and country.


texts: Calculating length of polyline next to polygons using ArcGIS for Desktop?

texts:
I searched a long time for the solution of my problem occurring during my diploma thesis. Maybe I am missing the right keywords for the correct search, but I need your help. I am using ArcMap 10.3.

I have a road network as lines and land use information as polygon layer.
Sometimes the polygon overlays the line and sometimes its close it.

I need the length of the section of each line, where a polygon is overalying or next to the line (including a buffer distance of approx. 30m).

My aproaches where Buffering the lines -> then Clipping the Buffer Polygon and Landuse polygon. But additionally I need the length of the polyline within the polygon and next to the polygon.

The problem compared to the solved "normal" How do I calculate line segment lengths within a polygon? is that not all polygons overlay the polylines.
The upside is that there is a specific ID with correctly works for a Join of tables.

Here I tried to specify my question. The red lines represent the length of the road going by specific land use.


texts: String of coordinates into Openlayers-3 Linestring on Vector Layer


texts: Accounting for intersecting features with spatial join?

texts:
I am looking to analyse the effects of the designation Marine Conservation Zones (MCZs) on fishing effort. I have a shapefile for fishing effort which is gridded, each pixel has information about fishing effort, and a shapefile containing the MCZs (see picture below)

The issue is as follows. I want to create a layer which has rows with each of the MCZs then columns with the total effort, total number of vessels etc. I have managed to do this by using spatial join, with the MCZs as the target feature and Fishing effort as the join feature and intersect as the match option. However when a pixel is partly in and partly not in the MCZ then the pixel is not accounted for in the output. So for example the output after spatial join for the MCZ at the top registers zero fishing effort, as no pixels are fully within it.

Is there a way to add effort to the MCZ relative to the proportion of a pixel that is within it?

So, using the MCZ at the top again, say that 20% of the pixel lies in the MCZ and the pixel has an effort of 10 units. Ideally I would want the output to display 2 units of effort for this particular MCZ.


texts: GeoJSON single feature Polygons changed to MultiPolygon by QGIS and how to convert

texts:
I have been rastering maps in QGIS 3.10.2 to provide GeoJSON files and layers in QGIS even though these are created in QGIS as a new shape  with the 'Polygon' choice selected and then exported to GeoJSON the files and layer end up as MultiPolygon with a single feature in each. I have around 620 of these single feature MultiPolygon layers in QGIS and cannot understand how they have been created with only one feature in them? MMQGIS refuses to merge these giving an error Merged layers must all be same type of geometry (MultiPolygon != polygon).

I presume these must have Polygon geometry to allow them to be merged in MMQGIS. Is there a simple way to convert these in bulk to the correct geometry for MMQGIS to merge them? I understand there is software that can do this but would like a step by step solution if possible using existing software.

Hi thanks for the answers on how to create these GeoJSON that was not what I required since changing these manually to polygon they have returned to there original state  of both Polygon and Multi Polygon. when QGIS has recognised them after the change to Polygon and gave some other unknown reason for failing to merge.

I should add 3.12 lists the item with there CRS /SRS so its easy to pin  down a geometry that is wrong nice addition.

3.12 is slightly different with its vector merge  it gives a response "files are not supported as an outputs for this algorithm" I don't know how to get around this other than someone said to use GRASS

This is now becoming urgent as QGIS  3.12.1 constantly tries to index every layer for some reason driving us mad.


texts: ArcMap Image Difference: Help interpreting/utilizing results

texts:
I'm working for the first time with ArcMap's relatively new image analysis window, and am using the "image difference" function to calculate change between two images which I have performed a supervised classification on.

Each of the two images have only two types of land cover, forest  and pasture; however, when I conduct the "image difference" analysis, I receive a raster with a ramp of 1 to -1. My question is how to interpret it? I.e. I'm looking to be able to symbolize where forest remains forest, forest changes to pasture, pasture remains pasture, and pasture changes to forest. I know this should be easy, and is so in ERDAS, but can't figure it out in ArcMap.
Thanks in advance for any suggestions,
David


texts: Using relationship class to model multiple people buried in same grave for online cemetery application?

texts:
I have to create an online application for a cemetery, just like this one:

http://www.arcgis.com/home/item.html?id=5676017d60ac44729e9cedf66709ff5e

Like in the example, in my case some tombs (only 3!) have more than one people burried, so there is an one-to-many relationship between the tombs and the occupants. So I’ve attached to the 400 polygons representing the tombs, the excel table containing all the people burried (403) using Make Query Table. And now I have 403 polygons, one for each occupant. I’ve exported the table into a shapefile because I had to save the table.

But is this the right way? If I put all these polygons into the online application, I guess that when I click on a tomb with two occupants, it will show me only one name, depending which one is above. And I won’t be happy with that.

Is creating a relationship class between the two tables more effective? I have’n done so far any online application or online map.


texts: .net arcobjects retrieve user value from layer data source

texts:
I have a need to get the user value from a layer properties.

The value is from: Layer Properties -> Source -> user in Data Source (sorry not enough score to attach the picture).

I tried to check the ILayerProperties, but haven't found the method related to the user value.

Anybody has the experience?


texts: How can I mosaic list of osgeo.gdal.Datasets and add overlapping grid cells?

texts: I have a list of osgeo.gdal.Datasets that I created from a list of numpy arrays containing geo-referenced ice velocity values for a glacier. I would like to merge these all into a single mosaic and sum the values in any grid cells that overlap. Is there a straightforward way to do this in python using gdal?


texts:
How do you create a new feature class from the select by location tool in python?
This is my script that works but I just don't know what the next step is.

arcpy.SelectLayerByLocation_management("Buildings", "WITHIN_A_DISTANCE", "Hydrography", "50 feet", "NEW_SELECTION","NOT_INVERT")


texts: Dividing the values of one rasters on a cell-by-cell basis

texts:
I have been trying to divide an ArcGIS (ver 10.5) generated raster layer by a constant and continue to receive errors (Error - 000539).

My first attempt was to simply divide the raster by my constant (3020) - error

My second attempt was to create a copy of the "kernel" grid and reclassify it giving each cell a value of 3020 which failed too.  Same error 000539

Lastly out of frustration I exported the grid and performed the operation in R. Which worked fine.  Anyone have any idea what I may be doing wrong within Raster Calculator.


texts: Phantom artifacts after converting to Robinson projection

texts:
I'm using ggplot to create a map using the Robinson projection. Ultimately, I'll be plotting individual countries, but I need to provide continent boundaries as a background layer (since some countries will not be plotted). I can successfully plot the two layers of my data (continents + countries) with one of mapproj's built-in projections:

However, when I convert the shapefile's CRS to Robinson, I get strange artifacts in the continents. Here's a minimal working example:

library(dplyr)
library(ggplot2)
library(rgdal)

# Get Natural Earth shapefiles
download.file(url="http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip", "ne_110m_admin_0_countries.zip", "auto")
unzip("ne_110m_admin_0_countries.zip")
file.remove("ne_110m_admin_0_countries.zip")

# Load and fortify regular data
world <- readOGR(".", "ne_110m_admin_0_countries")
continents.regular <- fortify(world, region="continent")

# Convert to Robinson and fortify
world.robinson <- spTransform(world, CRS("+proj=robin"))
continents.robinson <- fortify(world.robinson, region="continent")

# Continents to plot
all.continents <- data_frame(id = unique(as.character(continents.regular$id)))

# This works
map.regular <- ggplot(data=all.continents, aes(map_id=id)) +
  geom_map(map=continents.regular, colour="grey50", fill="white", size=0.4) +
  expand_limits(x=continents.regular$long, y=continents.regular$lat) +
  coord_equal()
map.regular

# This has weird artifacts
map.robinson <- ggplot(data=all.continents, aes(map_id=id)) +
  geom_map(map=continents.robinson, colour="grey50", fill="white", size=0.4) +
  expand_limits(x=continents.robinson$long, y=continents.robinson$lat) +
  coord_equal()
map.robinson

What's the best way to convert these shapefiles to a Robinson projection without getting all the strange artifacts?

UPDATE: Following iant♦'s suggestion to use the Natural Earth land shapefiles, everything works nicely now. I think I was trying to make the political data do too much work.

# Get Natural Earth *land* shapefiles
download.file(url="http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_land.zip", "ne_110m_land.zip", "auto")
unzip("ne_110m_land.zip")
file.remove("ne_110m_land.zip")

# Load and fortify regular data
world.land <- readOGR(".", "ne_110m_land")
land.robinson <- spTransform(world.land, CRS("+proj=robin"))
continents.simple <- fortify(land.robinson)

# Continents to plot
all.continents <- data_frame(id = unique(as.character(continents.simple$id)))

# Everything works now
map.fixed <- ggplot(data=all.continents, aes(map_id=id)) +
  geom_map(map=continents.simple, colour="grey50", fill="white", size=0.4) +
  expand_limits(x=continents.simple$long, y=continents.simple$lat) +
  coord_equal()
map.fixed


texts: Why are the layer ids of my map service changing when I refresh the map service endpoint in the browser?

texts:
I go to the endpoint for my cached map service and view the layers and their IDs that are in the service:

T201510cm (93)
  Boundary (94)
  Footprint (95)
  Image (96)
T201520cm (0)
  Boundary (97)
  Footprint (98)
  Image (99)

When I refresh the service, the IDs of the layers change:

T201510cm (93)
  Boundary (94)
  Footprint (95)
  Image (96)
T201520cm (1852394799)
  Boundary (1852394800)
  Footprint (1852394801)
  Image (1852394802)

and:

T201510cm (97)
  Boundary (94)
  Footprint (95)
  Image (96)
T201520cm (93)
  Boundary (98)
  Footprint (99)
  Image (100)

It seems that there are three unique sets of IDs that are being applied.

The service is assigned to a cluster with 2 machines. I thought maybe the machines in the cluster got out of sync or something and the web adapter is bouncing back and forth to the 2 different actual machines with different IDs on each of those, but the fact that there are two machines and three unique combinations of IDs might point against that.

Why are my IDs getting juggled around?

I can not provide the endpoint, but here are (redacted) screenshots of the endpoint from the browser:


texts: I'm working on a TileMill project essentially displaying freight routes. The original shapefile contains a origin city and a destination city (and a path between both cities). When I apply a marker-type:arrow; /marker-placement:line; code in CartoCSS, I just don't quite understand the logic of how arrow direction actually gets assigned in this case. Ideally obviously I would like the arrows to point in the origin city to destination city direction.


texts:
Let's say I have a dataset with one column being GeoJSONs encoded as string.

AWS Athena supports ESRI and hence geo queries on geometries: https://docs.aws.amazon.com/athena/latest/ug/geospatial-functions-list.html

However, this works only for WKT/WKB objects.

Is there a way to import and query GeoJSONs in AWS Athena?
Or does one have to convert GeoJSONs into WKT/WKB?


texts:
Unable to import an ESRI generated shapefile (just a simple polygon layer) into the Android app.  MapIT does not recognize the file(s) in the upload screen, I can not select nor view it.  I have uploaded a folder and .zip file both the same name as the .shp and support files.  I also have modified a different point shapefile originally generated by MapIT with ArcMap then attempted to import the modified shapefile, no luck there either.

Problem solved by simply loading files onto device or dropbox.


texts: I am using the QuickMapServices plugin for basemap imagery and was wondering if I can add a QGIS legend that includes default copyright information? I know this can be done in ArcMap...!


texts:
I have a OL3 map with one tile and one vector layer. Since the features on the vector layer don't stand out enough against the tile layer in the background, I want to desaturate the tile layer.

I'm aware of the Hue/Saturation Example, but this approach works only with WebGL. WebGL in turn does not support vector layers.

How can I desaturate an OpenLayers 3 tile layer when using the canvas renderer?

NOTE: I cannot desaturate the tiles on the server, because I don't control the server that hosts the tiles.


texts: JPEG compressed Geotiff files convert to JPEG without loss

texts:
I am new to GIS application and had just started working with Geotiff files.

Background:

Currently, I am provided with big Geotiff files around 200 MB - 500 MB each as raw data from my vendors.

Are JPEG-IN-TIFF files the same as the full Geotiff files but with the RGB image compressed?


texts: How to use L.singleTile plugin in Leaflet

texts:
I am using Leaflet (leaflet-0.7.3) to publish a WMS layergroup from GeoServer.

My code is:

var basemap2 = L.tileLayer.wms('http://localhost:8080/geoserver/ows?version=1.3.0&', {
            layers: 'Tinos_2017:Basemap_Tinos',
            format: 'image/png',
            uppercase: true,
            transparent: true,
            continuousWorld : true,
            opacity: 1.0,
          tileSize: 3000
        });
basemap2.addTo(map);

But the map is really slow. I tried including this plugin L.singleTile.js
and change my code:

var basemap2 = L.singleTile('http://localhost:8080/geoserver/ows?version=1.3.0&'', { layers: 'Tinos_2017:Basemap_Tinos',
                    format: 'image/png',
                    transparent: true,
                    opacity: 1.0,
                });
basemap2.addTo(map);

But the basemap doesn't appear after that.

Is something wrong with my code or the way I am using the plugin?


texts: Where can I find the official data of all cities in the United States?

texts:
I would like to see a list of all U.S. cities and have them categorized by states.

Is there any authority web link I can follow?

I searched on Google but the list is limited. I want to have a full one.


texts: Adding Buffer Wizard function in ModelBuilder?

texts:
I am trying to clip a series of raster grids to include into a mosaic.

Presently I have made a model that initially reclassifies a grid into one class and then converts raster to polygon to get a boundary file for that particular raster.  I have used Buffer Wizard to generate an internal buffer setting the buffer width to 25m.  I can then use this output to erase against the original boundary feature class, which I will use to clip/mask the raster.

I cannot however utilise the Buffer Wizard tool directly in ModelBuilder. I have seen in other posts that you could potentially use an iterate but I am not familiar with them and cannot seem to get it to work.

I have approx ~550 images to process like this so do not want to do it manually if I can help it.

So the thumbnails graphically displays the process with the clipped raster being what I wanted, and the process in ModelBuilder in the schematic with the Buffer Wizard performed in the data view interface of ArcMap


texts: Geometric Network trace in ArcGIS: trace downstream with loops included

texts:
I am looking for a way to make a “trace downstream” in a geometric network in ArcGIS where loops are included too. With the trace-operation “trace downstream”, the loops are not included.  I know there is a trace-operation “find loops” but this returns all loops which are connected (therefore e.g. also the loops upstream the flag). I only want to receive the loops that are downstream my flag. The result should be a selection with the result of the trace downstream + just the loops which are downstream the flag. Would you know a way to achieve that in ArcGIS or would you know a good workaround?

Edit: manual removing selections is not possible in my case, an automated solution has to be found!

Edit2: an ArcGIS-only solution would be preferred.


texts:
I have a .tif which I want to have polygonized. I take the Raster/Conversion/Raster to Polygon. QGIS 3.12 starts the process but never ends (once I waited half an hour). I maybe don't see a mistake.
White has the value 1 and black the value 0. I also tried with ArcMap where it is the same: The process starts but it never ends.


texts: Translate manual operations to GRASS commands

texts:
I am new in GRASS GIS and i wanted to know how i could translate GRASS manual operations to GRASS commands in the console.

I imported a raster and i was able to see the command

r.import input=XXXXX\XXXXX\...\XXX.grd output=XXXX

However, i then added some maps to the GIS Map display but i did not see any code in the command line, does anyone know how can i get the commands of each operation i do in GRASS?


texts: Custom implementation of ArcGIS function

texts: I would like to find out what it takes to create a custom implementation of an ArcGIS function. In particular, I would like to implement GeoAnalyst.ISurfaceOp2.Visibility() in order to get it to run faster. Right now, it is taking ~3 seconds per call to Visibility(). From my limited understanding, the bottleneck is the writing of temporary rasters to the file system. If this could be done in-memory, I suspect the processing time would decrease significantly. I am doing this in a .NET project, but solutions in any language are welcome.


texts: how to get correct geo reference system for a VMap

texts:
I am new to GIS, trying to read the GeoRef System for VMap by using the following code:

    OGRSpatialReference *ref = layer->GetSpatialRef();

    if( ref )
    {
        QString georefSystem = ref->GetAttrValue( "GEOGCS" );
    }

its reading and returning as NAD83 for the map which is WGS84.
I confirmed the map is WGS84 by opening it in global mapper.

please let me know what I am missing here to get the correct Geo reference system.

My work  environment is C++ in Windows 7.

Thanks,
Prady


texts: Water diving and depth measuring equipment

texts:
We go to villages and forest to deepwell rig for water. Can anyone help in identifying a GPS and water depth measurement devices please?

we do 4-6" deepwell rigging for ground water in mozambique with rigs mounted on trucks


texts: QGIS 2.18 - how to plot a new point a certain distance and az from another point

texts:
I'm trying to figure out a way to plot a new point (or series of points) along a given az and a fixed interval. Essentially, I'm trying to build a grid for soil sampling.
ty


texts: Do Tile Servers typically store every tile for every zoom level?

texts:
As I understand, a basic tile server provides raster image tiles for different zoom levels. To cover the world, it requires 1 tile at zoom level 0, 4 at zoom level 1, 4n for zoom level n. These are billions and billions of images that need to be stored in total for zoom levels 0 to 19.

My question is: Do tile servers typically in fact store all of these images? If not, how do they cover the whole world at every zoom level with tiles?


texts:
In QGIS 2.18.11, I am using the Print Composer to generate a TIF file, which I am subsequently using as input to generate a Georeferenced TIF with the Raster Conversion Translate facility to get my output. My goal is to have a georeferenced map that I can load into Avenza maps. It loads and georeferences, but the location of my map shows it as being 216 miles away, rather than the 11 miles that it actually is.

Does anyone know what I'm doing wrong?

I've looked up a CRS for my area (EPSG:2264) and used the same CRS that I use in my base main QGIS window and the translator. When I try to use EPSG:3857, the Geo TIF doesn't show up as georeferenced. I've had the same difficulty of being approximately 200 miles off with other CRS for my area as well.


texts: Failed to convert multilinestring to linestring


texts: code for finding gaps between polygon parcels

texts:
i am trying to write code for finding gaps between polygons, the idea is to convert polygons to polylines and checking the attribute table, each selected segment that shows two records in the tables represent  adjacent  edge between polygons, if the segment shows only one record,it then can be considered as part of gap contour.
hope someone can help me to convert this procedure to VBA code.


texts: Downloading and saving plugins for QGIS 3.4

texts:
I have downloaded a plugin from QGIS website, and save it on me desktop as a ZIP file. Then, I uploaded it with the Plugin "Install from ZIP" function.
Then, I uploaded it with the Plugin "Install from ZIP" function.

Can I delete the ZIP folder from me desktop or should I save it in the QGIS folder?


texts: Negative pixel values after Dark Object Subtraction

texts: I am trying to make an atmospheric correction to my image in ENVI for which I am using Dark Object Subtraction tool. However, it gives negative pixel values in the resulting image. What does it imply?


texts: Georeference raster file (TIFF) with known CRS and with world file available

texts:
I have the following components:

Unreferenced raster file (TIFF) (e.g. myraster.tiff) with desired coordinate reference system (CRS) added to the properties of the raster file within QGIS
World file (e.g. myraster.wld) as plain text containing georeferencing information for the raster file
QGIS-project (e.g. myproject.qgz) prepared with desired CRS

Adding the raster file to the QGIS-project does place the raster file as a non-georeferenced layer, i.e. the georeferencing information in the world file is neglected. Is it feasible to get the raster file georeferenced with the information provided?

I am using QGIS-Version 3.10.0 in Windows 10.


texts:
I've got a layer with all the states of the country, and layer with 1 states regions.  When enabling the labels I don't want the states region to be displayed for the state where the regions are displayed.

Is there anyway to hide a label if another is on top of it?


texts:
I´m trying to create a map that can be loaded into the program CityEngine as a shapefile.

To create this map I have an excel spreadsheet that includes locations, in longitude and Lattitude, and some information regarding the building at that location. I have been able to make the points appear in the right location in Qgis, when they are imported in the CRS (EPSG:4326, WGS84). I then save the points as a shapefile.

After that I have exported the DWG file as a DXF file by using AutoCAD and imported it into Qgis using a custom CRS which I read would keep the scale and avoid the DXF to be "bend" around the world.

+proj=tmerc +lat_0=0 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs

After placing the DXF I export it as a shapefile with the CRS (EPSG:4326, WGS84),  and open a new project and place both the points, and the lines. The problem is that I have to move the lines very long to be located in the right location compared to the points. The building footprints are not located precisely under the points. I have to move the points by hand, which in my understanding is not a good thing, it makes me think that somewhere something is no longer the right dimensions. I made some measurements of the polygons and they seem to be the right dimensions, but the shape should fit under the points. When turning on the open street map from the OpenLayers plugin everything gets even more wrong.

I'm having problems understanding if this is the right way or anybody has any advice on how to transfer the information from the excel ark onto the polygons and then export it as a shapefile.


texts: QGIS vector edition corrupts SpatiaLite attribute table

texts:
I have a problem with edit SpatiaLite Layer on QGIS.

When I make a this set of editions: cut line, delete a part, insert a new line and save it, the attribute table is corrupted.

I was thought that the trouble is within PK, but I have made new tests and now think the trouble is about value NULL in the numeric attributes of new features inserted. If I fill the atributes with any value when insert the trouble not occurs.

I tested it with a PK_UID attribute defined as INTEGER PRIMARY KEY AUTOINCREMENT and an spatial index on the geometry (type linestring). I also tested without PK.

I've tested on QGIS 2.2 and 2.4 (Windows 32).


texts: After installation of gdal (to enable PostGIS tools) on Windows, sf gives warnings about dependencies?

texts:
To get a PostgreSQL/PostGIS setup working on my Windows 10 machine I had to manually install GDAL using these instructions:

https://sandbox.idre.ucla.edu/sandbox/tutorials/installing-gdal-for-windows

After that, when I load the sf library I get this warning message:

> library(sf)
Linking to GEOS 3.6.1, GDAL 2.2.3, PROJ 4.9.3
Warning messages:
1: In CPL_gdal_init() :
  GDAL Error 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\ogr_MSSQLSpatial.dll
126: The specified module could not be found.

2: In CPL_gdal_init() :
  GDAL Error 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\ogr_MSSQLSpatial.dll
126: The specified module could not be found.

3: In CPL_gdal_init() :
  GDAL Error 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\ogr_MSSQLSpatial.dll
126: The specified module could not be found.

4: In CPL_gdal_init() :
  GDAL Error 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\ogr_MSSQLSpatial.dll
126: The specified module could not be found.

Can anyone recommend a way to remove these warnings or explain what I happened to do to create this conflict?


texts: How can I use feature templates on layers with joins?

texts:
I find this particular feature of the ArcMap 10 framework quite annoying:

When I define a join on any layer, templates cannot be added to the create features window.

I have to remove all joins from the layer, then add the template, then modify/edit/add features and again define the join(s).

In fact, when I use the Organize Feature Templates window to add the template on a layer with a join, it does not add it to the list and no errors are raised. However, if i remove joins from the layer the templates I've added while the layer had a join suddenly appear in the Create Features templates list.

Without having to do this programatically, Is there a way to use add templates on layers with joins? (Assuming entering attributes that satisfy the join would somehow have to be enforced)

When editing older maps I often forget that a layer has a join and it takes me a while to figure out I have to first remove it before I can use the templates to edit the features.
Even a message would be nice, i.e. "You have to remove joins to use templates." or something like that but I suspect that this is not possible using a default tweak.

Any ideas?


texts: How to create density scatter plot from dataset for pairgrid in Python


texts: I have pipeline network by shapefile, I want to get junctions and it must have link with pipes to run Epanet (id's junctions must have in node1 and node2 of pipeline). I know that we can extract point from line, but these point seems don't link with line. Is there way to get it? By Python, or tool?


texts:
I am already having a multi polygon layer of plantations in QGIS 3.8. Now I want to see popup images of the plantations when the mouse rolls over or clicks the polygon shapefile.

I have until now taken the following steps:

created a new attribute field - "image" for the file path.
set Widget type - "Attachment"

Storage Mode - "File path"
Integrated Document Viewer - Type - "Image", Width- "Auto"/ Height - "Auto"

I had entered the exact file path also, but when I click the polygon using the "Actions" feature or simply click the "Show Image" link in Attributes table, I am getting an error message as below.


texts: Remove 3D geometry in shapefile using OGR

texts: I have a series of shapefiles, that have 3D geometries (ie: points ZM). I would like to remove the 3D geometry so that the files are 2D. Is there a way to remove 3D geometry from a shapefile using OGR?


texts: Calculating between today's date and date field in attribute table ofArcGIS Desktop?

texts:
I am trying to use DateDiff to calculate the difference between today's date and the initiated date of various projects. I created a new field called "Duration of Day" and I tried the calculation: DateDiff("d", [INITATIEDATE], Now()) , this however keeps coming up as an error and will not work.

How do I make this calculation work in ArcGIS Desktop 10.4.1?


texts: I need to know if i can get GPS coordinates from a .tab file with node js

texts:
I have .tab file which contain  Definition Table and metadata with "\MapInfo\TableID"
I am working on a project and they told me that I have to use that file to get the map coordinates. But i couldn't find documentation to help me for that .
is that really possible?

this is the example of the tab i file i have


texts:
I am having some trouble adding a geolocation marker to my map. I am able to call to the geolocation and center the map on it but I can't get a marker to drop at that location. It should be noted I am new to all of this.

Here is what I have:

var geolocation = new ol.Geolocation({
  tracking: true
});
geolocation.bindTo('projection', map.getView());

and there is some jQuery for a button like so:

$( "#geolocate" ).click(function() {
    map.getView().setCenter(geolocation.getPosition()); });

This function will center the view on the location. What I would then like to do is add a marker there.

I have looked at both geolocation examples in the samples page and I still can't figure out how to add a marker or layer onto the map. The end goal would be a button that when pushed would move to that location and add a marker onto the map.


texts:
I have a Land Cover raster that has its legend in a layer-file (.lyr), and a shapefile delineating watersheds. I have access to QGIS 2.8.1 and to ArcGIS 10.1.

I want an Atlas of the land cover within each of the watersheds.

Since I only know how to open a Layer-file (.lyr) in ArcGIS, and I only know how to make an Atlas in QGIS, How can I make an Atlas of the land cover within each of the watersheds?


texts: Python and ArcGIS Metadata Parsing Script

texts:
Currently building a GDB with 100+ feature classes which will need metadata elements for certain fields to be used in an online tool popup. I am working on a Python script to update these elements, instead of using ArcCatalog for the management part. I am able to update about 20-25 elements just fine, but there's a couple where I am having issues with either in calling it in the script, or having the element actually update:

1) Publication Date: issue is that it's not being recognized; getting error: "KeyError: 'publication_date'"

publication_date = metadata.publication_date
metadata.publication_date = "20100101"

I am able to do this through the arcpy_metadata library. In it there is a script called Elements.py which I am customizing if I encounter an element I want that's not in there. Publication Data (#1 above) isn't in there, so my attempt at adding it looks like:

"publication_date": {
        "path": "dataIdInfo/idCitation/date/pubDate",
        "type": "dateTime"},

I've tried various formats for the time imputation, but I think the source of the problem is the "publication_date" class that I have in the library, specifically the source of the element and the actual tags that I need to call it out.

Code that's being passed in ArcMap:

import arcpy_metadata as md
metadata = md.MetadataEditor(path to fc)

title = metadata.title
metadata.title = "There are many variations of passages"

#PUBLICATION DATE
publication_date = metadata.publication_date
metadata.publication_date = "20100101"

metadata.rm_gp_history()
metadata.finish(True)


texts: Selecting by month in date/time field using ArcGIS Desktop?

texts:
I would like to select by a specific month from my date/time field in ArcGIS, and just can't seem to find a statement that will work.

I have multiple years and multiple days, but want to filter those out and only choose the records from the month of May.


texts: Joining attributes by field value not working

texts:
I cannot figure out why this join is failing when using the Join attribute be field value tool in QGIS 3.6.

Please see my image below which highlights the two layers attribute table and the criteria used in the tool:

I then get this error saying all features have failed to join:

Some background

The Autoincrimental layer had the PopID field created using the "Add autoincremental field" tool.
Both PopID fields are integers.
The PopID attribute values for the RF layer do not all have a value of zero. I have just ordered them from smallest to largest.

Please see below for the datasets

Dropbox link for test data


texts: ArcGis 10.0 SP5 - Drag & drop support vs tool parameter types

texts:
I got a custom Python-tool, and one of the parameters is a (multivalue) "File" type parameter, filtered on a given set of extensions.

Also, I got users requesting drag and drop; dragging files from Catalog folders into the tool.

1) When trying to drag/drop files from Catalog folders, I get "Invalid drop item" - "One or more dropped items were invalid and will not be added to the control"

2) When adding the same file using the controls file browser, it works fine.

If I change the type to "Raster Dataset", I get full drag & drop. Unfortunately I can't use this parameter type.

Is there any way to get around this ? (can't find any documentation on this)


texts: Longest Common Subsequence for trajectory matching in Python

texts: Is there any fast implementation of the Longest Common Subsequence algorithm for trajectory matching in Python? Ideally it would work with trajectories of different length in 2d spaces.


texts: How to fix crashes after update to Ubuntu 12.04?

texts:
Some weeks ago I had updated Ubuntu at the 11.10 version, but I had started having problems with QGIS 1.8: I installed the program and launched it, but it didn't open and crashed continuously.

I decided to update the operating system again, to the 12.04 version, but this hasn't solved the problems. So I've removed QGIS and all its related packages, in order to re-install it with the PPA from the website (for Precise):

deb http://qgis.org/debian precise main
deb-src http://qgis.org/debian precise main

To add the the qgis.org repository public key to your apt keyring, type:

gpg --keyserver keyserver.ubuntu.com --recv 997D3880
gpg --export --armor 997D3880 | sudo apt-key add -

So the program is installed and it starts, but it creates an unstable window and often crashes: where is the problem?

I have two options: A) my laptop is over and unable to cope with GIS requirements B) there's something disturbing the GIS that lasts across the OS updatings.


texts: Georeferencer - GDAL is missing on the QGIS 3

texts:
OS - ArchLinux 64bits

SPECS - i3-3220 - 6gb ram

QGIS 3.0.3 installed as follow.

$ sudo pacman -S qgis gdal python-gdal python-psycopg2 python-owslib python-yaml python-pygments

$ yaourt -S python-jinja-time

On the section ALL - do not appear.

On the INSTALLED - do not appear.

As you can see, georeferencer is missing.


texts:
Continusly to Convert jpg raster format to tif format, i try to convert tif file to jpg:

import arcpy, os , glob

outworkspace = r"C:\Project\out\OtherFormat"
listOfFiles = glob.glob( r"C:\Project\out\*.tif")
arcpy.RasterToOtherFormat_conversion(listOfFiles , outworkspace ,"JPEG")
print 'converted'

the result is:

>>>
converted
>>>

and the tif file isn't converted. I work with arcview 10.3 and when i run the convert tool i get this message and cannot run the tool:


texts: How to get polyline out of multipart feature using ArcObjects C#

texts:
I've got a polyline feature class and I've identified the first feature that is a multipart feature. I now want to find out which of the paths of this multipart feature intersects with a point.
Up till now I managed to fill a geometry collection with the parts (paths) of the polyline. My method to check for the intersection requires a polyline input. And this is where I'm stuck.
How can I convert/cast/? one of the two paths in the geometry collection to a polyline?

Here is some code, but pPolylineCSPart is null:

//right polyline into geometry collection
IGeometryCollection pGeometryCollection = new PolylineClass();
pGeometryCollection = pRightPolyline as IGeometryCollection;
//loop through geometry collection
for (int intPartCount = 0; intPartCount < pGeometryCollection.GeometryCount; intPartCount++)
{
    IPolyline pPolylineCSPart = new PolylineClass();
    //cast polyline part to polyline
    pPolylineCSPart = pGeometryCollection.get_Geometry(intPartCount) as IPolyline;
    //check if part intersects river
    bMultipartIntersectRiver = PolylineIntersectioCheck.Are2PolylinesIntersecting(pPoint, pPolylineCSPart);
    if (bMultipartIntersectRiver)
    {
        pSplitFeat.Shape = pPolylineCSPart;
        SplitCSFClass.CopyAttributes(pTransectSplit, pSplitFeat);
        pSplitFeat.Store();
    }
}

Many Thanks!


texts: Configuring GeoServer layer for WMS-T and loop data in client display?

texts:
I'm using GeoServer 2.10.1 to create an ImageMosaic layer from geotiffs of GOES east satellite imagery from NOAAPORT for the purpose of providing loops on the client side. My client side is currently using leaflet, and I've unsuccessfully tested my layer with the Leaflet.TimeDimension plugin, WMS animator, and Qgis with time manager plugin.

It was a struggle, but I seem to have successfully created the ImageMosaic layer with postGIS index storage.  The layer is currently configured to present time as a list, default value "use the domain value nearest to the reference value", reference value "CURRENT".  I have tried many configuration configurations for the time dimension.  I can't seem to request images over a given time domain.  I can manually request a specific image time.

When I try it in the leaflet plugin, I either get no image with a time in the loop control or "time not available".  The animator doesn't give anything but a blank image, though I'm not sure I'm using the aparam and avalues correctly.  Qgis gives me errors about time formatting when using various accuracy/resolution (no 'Z') and "could not find a suitable time format for value" when adding 'Z'.

The layer's info from GetCapabilities:

<Layer queryable="1" opaque="0">
  <Name>local:econus-vis</Name>
  <Title>NOAAPORT EastCONUS VIS in EPSG:3857</Title>
  <Abstract/>
  <KeywordList></KeywordList>
  <CRS>EPSG:3857</CRS>
  <CRS>CRS:84</CRS>
  <EX_GeographicBoundingBox>
    <westBoundLongitude>-122.97668636167079</westBoundLongitude>
    <eastBoundLongitude>-49.48743670443121</eastBoundLongitude>
    <southBoundLatitude>14.287148240841406</southBoundLatitude>
    <northBoundLatitude>61.3126546641372</northBoundLatitude>
  </EX_GeographicBoundingBox>
  <BoundingBox CRS="CRS:84" minx="-122.97668636167079" miny="14.287148240841406" maxx="-49.48743670443121" maxy="61.3126546641372"/>
  <BoundingBox CRS="EPSG:3857" minx="-1.36897021052253E7" miny="1607181.05254824" maxx="-5508916.25460164" maxy="8697969.41913261"/>
  <Dimension name="time" default="current" units="ISO8601">2017-02-02T13:45:19.000Z,2017-02-02T14:00:18.000Z,2017-02-02T14:45:19.000Z,2017-02-02T15:00:18.000Z,2017-02-02T15:15:20.000Z,2017-02-02T15:30:19.000Z</Dimension>
  <Style>...</Style>
</Layer>


texts: Use SLD to conditionally display points or polygons based on zoom level?

texts:
This is not a duplicate of: how to display polygons as points until certain zoom level?

I want to do this with Geoserver v2.5.5 if possible (not openlayers).

Basically - I have a layer of polygons, which look great when zoomed in, but are nigh on impossible to see when zoomed out to a reasonable level.

I've tried using SLD to add a heavier stroke weight to the poly's, but it just looks rubbish (I get these weird looking triangles that are in no way representative of the poly). So I've come the conclusion that I'll need to display points instead when user is zoomed out.

I understand that I could just publish two layers and handle the conditional zoom logic client side - but, c'mon! Surely Geoserver should do the heavy lifting for me ;)

So bottom line - is it possible to publish a layer in Geoserver that will display points at one zoom level, and poly's at another?

EDIT:

Just to clarify: I don't need an actual point geometry, I just need to style polygon geometries to display like points at certain zoom levels.


texts:
I searched through previous questions & didn't find an answer to this one. At first glance it might look like a straightforward math question & off-topic, but it is  related to a fleet management system and has a definite GIS flavo(u)r, so I hope that I can get some advice here.

My GPS device will give me Lat/Long, timestamp and current speed. I can query once a second if I want, although that seems like overkill.

The point is that it only gives me current speed and I want average speed. From two consecutive readings I can compute the distance travelled and the time taken, so I know the average speed for that segment, but what if I want the average speed for one hour?

do I just total the averages and average them?
I am unsure whether to include readings of zero speed in the count of the number of measurements (which shows how bad my math is). What if I only take 2 readings per hour & both times the vehicle is tationary at traffic lights, but otherwise it moves rather quickly?

I am not sure of what is a good sample frequency. I  guess it might have to do with the anticipated average speed (e.g might differ between tracking combine harvesters & jet fighter planes)

I am concerned that oversampling might reduce accuracy

Is there a 'standard' algorithm for this sort of thing?

[Update]
It might help if you can tell us what you want to use the average speed for. That will drive answers to "what do I do for zero speed events?" –  BradHards

A good point. It's really just a feature for the end user, but different users might have different requirements. I will Google & see if I can find how other Fleet Management s/w does it.

What GPS device is it? most have current and average speed based from a location/waypoint. –  Mapperz

This one does not, which is why I post the question. I have even asked the manufacturer who confirm their published API & indicate that they have no plans to introduce such a feature.


texts: Reading subset of GeoTIFF file without having to read whole file first?

texts:
I have a set of GeoTIFF files which I have generated from the MODIS LST Product and have used the coordinate information present within the file to work out the index of my 'pixel of interest'/study site. My aim is to extract the data value at this index and so far have been using this code within python:

myfile = band.ReadAsArray(0, 0, cols, rows)
value = myfile[y_index, x_index]

which works just fine. This generates the result I want but I am having to read in the whole data file first, before obtaining the result I require. Is it possible to read just my 'pixel of interest' or a subset of the data without having to read the whole file into memory beforehand?

I am using Python and the gdal module within it.


texts: Clip tool output does not follow the shape of the output extent and raster values are simplified

texts:
I am trying to clip the raster shown below (blue to red color scheme; inset shows zoomed out extent) to the polygon outlined in brown:

I want the clipped raster to match the exact shape of the polygon (i.e. to maintain the clipping extent). When I use the "Clip" tool, however, I have three problems (shown in the zoomed-in figure below): (1) the new raster does not maintain the clipping extent, or rather the individual grid cells maintain the box shape on the edges rather than clipping to the exact shape of the output extent, (2) the raster values are simplified to two values (red and blue), and (3) rather than clipping the edges, it appears that these raster were assigned a negative value.

I tried all combinations of the different “Clip” tool options, including checking and unchecking the two boxes, “Use Input Features for Clipping Geometry” and “Maintain Clipping Extent”. I tried a Google search but could not find a solution. I also checked that the input raster and the output extent are in the same spatial reference (both GCS_WGS_1984 with no projection). I also added the output extent as the "mask" option in "Geoprocessing > Environments > Raster Analysis".

Does anyone have any clues to why this may be and how to clip the input raster to the output extent (1) with the clipping extent boundaries maintained, (2) preserving the full spectrum of raster values, and (3) actually clipping the edges.


texts: Are there EPSG codes for solving China GPS shift problem?

texts:
I am currently using PyProj for a project, and would like to transform from WGS-84 (or other systems) to the China-specific datums for writing into kml files. I have seen other packages specifically for fixing the China projection problem, but would rather use PyProj if possible.

Are there an EPSG codes for the BD-09 or GCJ-02 datums? I was unable to find any. Alternately, is there any other way to transform WGS-84 to GCJ-02 or BD-09 using PyProj?


texts: Creating a ValueTable with a column that has dependency

texts:
I am creating a python tool which looks like the figure below.

Input feature: It asks for a input feature class.
Valuetable(Lookup tables): It has two columns - one for look up tables and another for fields.

The fields in value table should have dependency on Input feature. is this possible ? How ?

Code:

 def getParameterInfo(self):
    param1 = arcpy.Parameter(
        displayName = "Input Feature",
        name = "in_features",
        datatype = "DEFeatureClass",
        parameterType = "Required",
        direction= "Input")
    param1.filter.list = ["Polyline"]

    param2 = arcpy.Parameter(
        displayName='Lookup tables',
        name='lookup',
        datatype='GPValueTable',
        parameterType='Required',
        direction='Input')

    param2.columns = [ ['DETable', 'LookupTable'], ['Field', 'Fields']]

    param2.filters[1].type="ValueList"
    desc = arcpy.Describe(param1)
    fields = desc.fields
    l=[]
    for f in fields:
        l.append(f.name)
    param2.filters[1].list = l

    param3 = arcpy.Parameter(
        displayName='Output',
        name='excel',
        datatype='DEFile',
        parameterType='Required',
        direction='Output')
    param3.filter.list = ['xls', 'xlsx']

    params = [param1, param2, param3]
    return params


texts:
I have a postgis table with a point geometry for lat/long but i want to run a query that inserts a new row with lat, long values separately instead of concatenating them into a geometry.

so is there a way to insert the X and Y values separately ?


texts:
I would like to know if I can set the filters to only show the current feature the map is focused on and hide the other features around it?

I currently have a layer of points which the atlas centers on. If there is another point close to this, I would like to hide it so it doesn't show on the atlas created image. Is this possible please?


texts: carto /cartocss : is there a function for "contains"?

texts:
I know how to set a specific color for a specific value (here specific_string) of a specific field (here field1)

#mydataset[field1="specific_string"] {
   marker-fill: #000000;

But what if I want to set this color for all the elements where field1 CONTAINS a specific string?

#mydataset[field1 ??CONTAINS?? "specific_string"] {
   marker-fill: #000000;

How do I write that please?


texts: Why is shapefile not drawing in expected location after (or before) using Define Projection tool?

texts:
I have downloaded this zipped shapefile of bus routes from the City of Houston data portal.

I then performed these steps in ArcGIS Desktop 9.3.1:

Extracted the shapefile from the *.zip
Added this shapefile as a layer to a data frame which has data in a coordinate system of NAD_1983_UTM_Zone_15N and noticed that it did not draw where I expected it to
Used ArcToolbox>Data Management Tools>Projections and Transformations>Define Project to change its coordinate system to NAD_1983_UTM_Zone_15N and observed that it still did not draw where I expected it to

Can you explain why this shapefile may not be drawing in the expected location?

As background the properties of a shapefile that is drawing in the expected location is:

Data Type:  Shapefile Feature Class
Shapefile:  D:\Cloud Apps\Google Drive\...\tgr48201trt00.shp
Geometry Type:  Polygon

Projected Coordinate System:    NAD_1983_UTM_Zone_15N
Projection: Transverse_Mercator
False_Easting:  500000.00000000
False_Northing: 0.00000000
Central_Meridian:   -93.00000000
Scale_Factor:   0.99960000
Latitude_Of_Origin: 0.00000000
Linear Unit:    Meter

Geographic Coordinate System:   GCS_North_American_1983
Datum:  D_North_American_1983
Prime Meridian:     Greenwich
Angular Unit:   Degree


texts: How to creat multiple rings between two circular buffers?

texts:
I am working with mathematical-ecological modeling and I am also a new user of QGIS Software. First I am creating 3 circular buffers with same center (shape center) covering a region with roads (shape roads), so I have initialy two shapes and after I create 3 circular buffers. All mathematical work I use R software to produce the number of intermediary rings and distances with each these intermediary rings that will be between the pair of main circular buffers.

My firsts questions are: How could I create automated the process of rings or buffers between the main circulars buffers? Are there scripts or other solution for this?

My second and last: I have roads crossing the buffers and in case of creation of rings (or intermediary buffers) how could I calculate the length of the roads between the two intermediary rings?

UPDATE

The problem is the rings made with a non automate process and also made in atribute table. So I wish make together the automate process with the calculation of the roads that cross the pair of rings. Using R like you said it is possible, but I would like to know the both process because it will be better to know how will be more easy for me. it is my first work with QGIS.


texts: Installation extension functions to pgRouting

texts:
I'm trying to find sql source of functions routing_dd.sql
and routing_dd_wrappers.sql

I'm working on Windows 7 32bit.
The only one link to that wrote by Underdark is empty:

Both are available through the project repository at Github. Get them and execute them in your pgRouting-enabled database. Now, you should be ready.

I need to create these functions in Postgres 9.2, Postgis 2.0 and pgRouting.

When I use drivingDistance in pgRouting layer plugin in QGIS 2.0 - that mark all nodes on map only, without visible errors.

Thanks for answer. Tom


texts: Select shapefile by their coordinates behaviour

texts:
I want to filter shapefiles by their latitude behaviour:
If the latitudes of edges A and B are constantly decreasing or increasing then this class marked as correct, otherwise are incorrect.
For example, the red polygon should be marked as incorrect! (Because it starts increasing at the point C.)

This code works but selects also some correct shapefiles (because I set an absolute value for checking the latitude. This behaviour appears in north and south).

Does someone know how can I detect this kind of shapefile?

Code

import shapefile
import numpy as np

sf = shapefile.Reader(r"shapefiles/shapefiles.shp")
of = r"_temp/error.txt"

shapes = sf.shapeRecords()
ids = np.zeros(len(shapes))

output = open(of, 'w')
output.close()
output = open(of, 'a')
for shp in shapes:
    lats = np.zeros(len(shp.shape.points))
    lons = np.zeros(len(shp.shape.points))
    for i in range(0, len(shp.shape.points)):
        point = shp.shape.points[i]
        lats[i] = (point[1])
        lons[i] = (point[0])
    if max(lats)>86.5:
        #print shp.record[0]
        continue
    if min(lats)<-79.2:
        #print shp.record[0]
        continue

    # identification of shapefiles crossing dateline - not needed here
    #if max(lons)>179.9: continue
    #if min(lons)<-179.9: continue
    output.write(shp.record[0]+'\n')
output.close()


texts: Exporting a layer with one-to-many non-spatial relationships into GeoJSON

texts:
I have a ShapeFile (postcode areas) with a one-to-many relationship with a list of attributes (customers who fall within that postcode).

Is it possible in QGIS to export the ShapeFile to GeoJSON to include these relationships or will I need to directly manipulate the GeoJSON and add the data separately?


texts: Manipulate (group, transpose, etc.) a shapefile's table with PyQGIS/Python and export as CSV?

texts:
I'm making a QGIS processing plugin that copies ArcMap's Tabulate Area tool which basically calculates, in my case, how much (in sqm) of each land cover classification are there in each municipality.
The goal is to add a code in my existing plugin script (below) that manipulates the output shapefile's table (group cells with same values, transpose column values as column headers, etc.) just like with Pandas. I've checked the PyQGIS API and can't find any classes that do this.
Right now, the result is a shapefile that has a table like this. Both the class (DESCRIPT) and zone (NAME_2) are ungrouped.

This is how I want the csv/spreadsheet output file to look like. This was made by a separate stand-alone GeoPandas script.

Current QGIS processing plugin script
from qgis.core import QgsProcessing
from qgis.core import QgsProcessingAlgorithm
from qgis.core import QgsProcessingMultiStepFeedback
from qgis.core import QgsProcessingParameterVectorLayer
from qgis.core import QgsProcessingParameterField
from qgis.core import QgsProcessingParameterFeatureSink
import processing

class Tblt1(QgsProcessingAlgorithm):

    def initAlgorithm(self, config=None):
        self.addParameter(QgsProcessingParameterVectorLayer('class', 'Class', types=[QgsProcessing.TypeVectorAnyGeometry], defaultValue=None))
        self.addParameter(QgsProcessingParameterField('classfield', 'Class field', type=QgsProcessingParameterField.Any, parentLayerParameterName='class', allowMultiple=False, defaultValue=None))
        self.addParameter(QgsProcessingParameterVectorLayer('zone', 'Zone', types=[QgsProcessing.TypeVector], defaultValue=None))
        self.addParameter(QgsProcessingParameterField('zonefield', 'Zone field', type=QgsProcessingParameterField.Any, parentLayerParameterName='zone', allowMultiple=False, defaultValue=None))
        self.addParameter(QgsProcessingParameterFeatureSink('Result', 'Result', type=QgsProcessing.TypeVectorAnyGeometry, createByDefault=True, defaultValue=None))

    def processAlgorithm(self, parameters, context, model_feedback):
        # Use a multi-step feedback, so that individual child algorithm progress reports are adjusted for the
        # overall progress through the model
        feedback = QgsProcessingMultiStepFeedback(2, model_feedback)
        results = {}
        outputs = {}

        # Intersection
        alg_params = {
            'INPUT': parameters['class'],
            'INPUT_FIELDS': parameters['classfield'],
            'OVERLAY': parameters['zone'],
            'OVERLAY_FIELDS': parameters['zonefield'],
            'OVERLAY_FIELDS_PREFIX': '',
            'OUTPUT': QgsProcessing.TEMPORARY_OUTPUT
        }
        outputs['Intersection'] = processing.run('native:intersection', alg_params, context=context, feedback=feedback, is_child_algorithm=True)

        feedback.setCurrentStep(1)
        if feedback.isCanceled():
            return {}

        # Add geometry attributes
        alg_params = {
            'CALC_METHOD': 0,
            'INPUT': outputs['Intersection']['OUTPUT'],
            'OUTPUT': parameters['Result']
        }
        outputs['AddGeometryAttributes'] = processing.run('qgis:exportaddgeometrycolumns', alg_params, context=context, feedback=feedback, is_child_algorithm=True)
        results['Result'] = outputs['AddGeometryAttributes']['OUTPUT']
        return results

    def name(self):
        return 'Tabulate Area v1'

    def displayName(self):
        return 'Tabulate Area v1'

    def createInstance(self):
        return Tblt1()


texts:
QGIS has a "Move Features" tool where points can be moved. Is it possible to move features from within R?

If not, is it possible to open R spatial objects in QGIS, move points in QGIS then import the spatial object back in R?


texts: How are ground control points collected that aren't in WGS84?

texts:
I understand that if you collect GCPs using an RTK GPS they are in WGS84 / EPSG:4326 - and you could then convert them to another EPSG. But I'm wondering how GCPs are collected in other coordinate systems like for example EPSG:2274 or NAD83.

Are they being collected with another type of device that doesn't use GPS, or are they collected with a GPS and then converted.


texts:
I try to create a QGIS project with a fix scale of 1:50.000. I set the scale in the status bar on the value and save the project. But if I open the project on another PC the scale 1:48699.
I tried the lock function, but it has the same results.

Is there another parameter which I can use?
I use the QGIS Version 3.4.8 LTR


texts: Sorting previously concatenated fields in FME

texts:
In FME, I am wondering what would be the best way to, within a field, sort a list of previously concatenated attributes?

I have two fields of previously concatenated values that I want to dissolve and then aggregate into a single polygon.

For instance:

DOG; CAT; FLOWER    |    ANIMAL; ANIMAL; PLANT

CAT; DOG; FLOWER    |    ANIMAL; ANIMAL; PLANT

The above setup will result in two polygons even though they should actually be one entity.

Is there an easy way to do this in FME? The tricky part is that I have two fields which can't be sorted independently of each other.


texts: QGIS standalone application for map rendering: bad extent

texts:
I made a simple standalone QGIS app for rendering a set of layers and export it as a PDF file.

When i use iface.mapCanvas().mapRenderer() (inside QGIS console) for rendering, my output is OK.
If i want to create my own QgsMapRenderer (inside standalone app), the extent is displaced like on the picture:

Here is my code:

from qgis.core import *
from qgis.gui import *
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import config

app = QgsApplication([], True)
QgsApplication.setPrefixPath(config.qgis_path, True)
QgsApplication.initQgis()

mlr = QgsMapLayerRegistry.instance()
crs = QgsCoordinateReferenceSystem(3857)

# creating a single layer
layer = QgsVectorLayer(config.data_dir + 'ZASRO.shp', 'ZASRO', 'ogr')
if not layer.isValid():
    print "layer failed to load !"
layer.setCrs(crs)
mlr.addMapLayer(layer)

layerSet = [layer.id()]

# map renderer
renderer = QgsMapRenderer()
renderer.setDestinationCrs(crs)
renderer.setLayerSet(layerSet)
renderer.setExtent(layer.extent())

# composition
comp = QgsComposition(renderer)
comp.setPlotStyle(QgsComposition.Print)
comp.setPaperSize(420.0, 297.0)
comp.setPrintResolution(300)

# composer map
composerMap = QgsComposerMap(comp, 0, 0, 420.0, 297.0)
composerMap.setNewExtent(renderer.fullExtent())
comp.addComposerMap(composerMap)

# pdf rendering
comp.exportAsPDF(config.out_dir + "out.pdf")

QgsApplication.exitQgis()

This i due to the fullExtent() function returning some bad values.
I guess my QgsMapRenderer is not valid for some reason ?


texts:
I have attached some pdf files in some features by using QGIS 3.8.
After exporting the .qgs to webmap I am not able to access the hyperlink of the pdf files. It is shown there just as a text.

PS" I tried to use relative path and to put a subfolder within the webmap folder, but it is the same situation.

Is anyone who has experienced something similar?


texts: Merge Advanced View Positioning and View Animation functions

texts:
I'm trying to merge two functions that are displayed as OL's samples, the Advanced View Positioning and the View Animation. I can successfully change the view with the animation method, but I can't fix the zoom as in the Advanced View Postitioning method. I'm using these methods to change the view of some rasters loaded in OL. My problem is related only with the zoom level, how can I make it fit to the raster that I'm using? I believe that I need to get the raster extent (already did it) and somehow calculate and link to the zoom section in the flyTo() function.

OL version: 5.3

Function I'm using for the animation:

//This is one of the locations I using with the View Animation method
var randomLocation = transform(getCenter([565280.904542, 6924581.621580, 565319.267400, 6924554.342636]), 'EPSG:31982', 'EPSG:3857');

function flyTo(location, done) {
  var duration = 3000;
  var zoom = view.getZoom();
  var parts = 2;
  var called = false;
  function callback(complete) {
    --parts;
    if (called) {
      return;
    }
    if (parts === 0 || !complete) {
      called = true;
      done(complete);
    }
  }
  view.animate({
    center: location,
    duration: duration
  }, callback);
  view.animate({
    zoom: zoom - 2,
    duration: duration / 2
  }, {
    zoom: zoom,
    duration: duration / 2
  }, callback);
}

Some links that are related but did not help me (most of them use the fit(extent) function. I tried to use it but it cancels the animate() function):

Open Layers 4 fit to extent zoom too much out
https://stackoverflow.com/questions/49746970/openlayers-4-fit-to-extent-of-selected-features
OpenLayers-3 setting zoom so layers fit in map window
https://stackoverflow.com/questions/42369647/openlayers-animate-getview-fit
https://stackoverflow.com/questions/49361669/openlayers-map-jitters-on-dynamic-centering-of-feature-movement-animation
OpenLayers - Setting View Correctly Extent GEOJSon
https://stackoverflow.com/questions/44763661/openlayers-fit-extent-with-bounce
https://stackoverflow.com/questions/41190146/view-fit-using-view-animate-in-openlayers-3-20
https://stackoverflow.com/questions/38291471/openlayers-3-zoom-map-to-coordinates-in-array
View Animation of OpenLayers


texts:
I have extracted way data for Railways over one country with [out:json], now how can I use this data to get all ways on google earth or QGIS? I am very new to this.

( area["ISO3166-1:alpha2"="PK"];) ->.a;
        way["railway"]
          (area.a);
         (._;>;);
 out body;


texts: QGIS spatial query - points within certian elevation contour intervals

texts:
I'm struggling to find a way to identify all the points within certain contour intervals. I have a raster dataset that I generated a contour map from. Within the region of interest, I have a specific area where I have circular contours that are enclosed (no dangling ends). I created a new polyline shapefile from the selected contours I am interested in, and converted that new polyline shapefile into a polygon shapefile.

I created the polygon shapefile because I couldn't query points within a polyline shapefile. Because these are circular contours centered around a certain high elevation point, these contours sit inside each other and form a sort of bullseye pattern.

When I try to do a spatial query, I select the largest contour polygon and try to query which points are within this contour, but I also want my query to ignore all the points that are within the other successive contours, but the spatial query highlights all points within that contour interval as well as all the other points in the contours above it. I figure that the QGIS "line to polygon" tool treated the circular contours as circular areas rather than a "doughnut" style polygon, where the next contour interval line would act as the inside boarder.

When I look at the options within the spatial query, I can not find a way to indicate that I want points "WITHIN" a polygon "AND" points "OUTSIDE/WITHOUT" another polygon. Does anyone have any ideas on how I might be able to perform this spatial query?

I apologize if this question was asked previously.


texts: pyqgis 3 Union multiple layers using temporary layers

texts:
I would like to use the tool "Union" to union 3 different layers. This tool unfortunately can union only 2 layers so I have to run it twice.
First I run it to union the layers "Layer1" and "Layer2"
param_union = {
    'INPUT' : QgsProcessingFeatureSourceDefinition('X:/HoWGK.gpkg|layername=Layer1', selectedFeaturesOnly=False, featureLimit=-1, flags=QgsProcessingFeatureSourceDefinition.FlagOverrideDefaultGeometryCheck, geometryCheck=QgsFeatureRequest.GeometrySkipInvalid),
    'OUTPUT' : "memory:myUnionLayer1",
    'OVERLAY' : QgsProcessingFeatureSourceDefinition('X:/HoWGK.gpkg|layername=Layer2', selectedFeaturesOnly=False, featureLimit=-1, flags=QgsProcessingFeatureSourceDefinition.FlagOverrideDefaultGeometryCheck, geometryCheck=QgsFeatureRequest.GeometrySkipInvalid),
    'OVERLAY_FIELDS_PREFIX' : '' }

union_1 = processing.run("qgis:union", param_union)

Then, I'd like to take the output layer created as temporary/memory layer to union it with a 3rd layer "Layer3"
param_union = {
    'INPUT' : QgsProcessingFeatureSourceDefinition("memory:myUnionLayer1", selectedFeaturesOnly=False, featureLimit=-1, flags=QgsProcessingFeatureSourceDefinition.FlagOverrideDefaultGeometryCheck, geometryCheck=QgsFeatureRequest.GeometrySkipInvalid),
    'OUTPUT' : "memory:myUnionLayer2",
    'OVERLAY' : QgsProcessingFeatureSourceDefinition('X:/HoWGK.gpkg|layername=Layer3', selectedFeaturesOnly=False, featureLimit=-1, flags=QgsProcessingFeatureSourceDefinition.FlagOverrideDefaultGeometryCheck, geometryCheck=QgsFeatureRequest.GeometrySkipInvalid),
    'OVERLAY_FIELDS_PREFIX' : '' }

union_2 = processing.run("qgis:union", param_union)

But I got the error message: "Could not load source layer for INPUT: memory:myUnionLayer1 not found"
How can I access my temporary layer to use it in the algorithm?


texts: How do I implement a custom IFeatureDatasetExtension?

texts:
How can I implement IFeatureDatasetExtension and register it so that ArcGIS discovers and initializes it?

In arcobjects, I see that Esri has a number of coclasses that implement IFeatureDatasetExtension2.  Using Categories.exe, I see there is a COM category called "Esri Workspace Dataset Extensions".

I don't see anything on the FeatureDataset coclass that would let me register extensions, the closest thing is IFeatureDatasetExtensionContainer, but it only lets me access extensions that are already defined.  There is no Add method.


texts: Sharing a Geoprocessing Service Hangs on Publishing service

texts:
When I tried publishing a geoprocessing service as part of a tutorial from ESRI, the Service Editor in ArcCatalog hung on the following screen:

That being said, the service seems to act OK. I can browse to its page via ArcGIS Server without any trouble.

What should I do to properly publish the service?


texts: What is the relationship between layer attributes and fields in QGIS

texts:
I have just spent several frustrating hours because I was searching the api docs for stuff on attributes when I should have been looking for fields.

Can someone please explain what the difference or relationship is?


texts: ArcGIS 10.2 Copy attributes between polygon layers

texts:
I have two polygons layers (countries). One contains attributes. The second one was created from lines so does not have attributes, and is not exactly similar to the first one (some countries outlines have been updated).

How do I transfer the attributes from my old countries layer to the new one?


texts:
I try to add my custom icon via mapIcon attr but doesn't work:

<div class="fc_addressint_map_canvas has_fc_google_maps_map" data-maplatlon="{lat: 43.650621, lng: 1.64613}" data-mapzoom="16" data-mapaddr="Zone Intercommunale de Piossane, 4 Rue de la Plaine" data-maptype="google.maps.MapTypeId.ROADMAP" data-mapcontent="&quot;
Zone Intercommunale de Piossane, 4 Rue de la Plaine, 31590 Verfeil, France<\/div>
Obtenez la Direction<\/a><\/div>&quot;" data-mapicon="https://mairie-verfeil31-fr.mon.world//images/icons-map/cruce.png" id="map_canvas_etablissment-adresse_0_202" style="min-width: 300px; min-height: 300px; position: relative; overflow: hidden;">


texts: Label Expression creates an extra line on top (VBScript)

texts:
Here is the VBScript I use in Arcmap Label Expression to generate my labels:

Function FindLabel ( [label1] , [label2] , [label3] , [label4] , [label5] , [label6] , [label7] , [label8], [label9], [label10], [label11], [label12], [label13], [label14])
Dim s
Dim value
Dim join
Dim label

label = [label1] &[label2] & [label3] & [label4] & [label5]  & [label6] & [label7] & [label8] & [label9] & [label10] & [label11] & [label12] & [label13] & [label14]

s = SPLIT(label ,"|")

label = " "
For Each value in s
    label= label  & vbNewLine & value
Next

FindLabel = trim(label)

End Function

The results are great except I am left with an extra "new line" on top, from which I have to go back to manually delete (attached pic)

How could I edit the code so it does not create that extra "newline" on top?