Reputation
8,156
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
2 23 48
Newest
 Enlightened
Impact
~367k people reached

Aug
26
awarded  Enlightened
Aug
26
awarded  Nice Answer
Aug
18
comment How to classify a raster using QGIS Plugin interacting with PostGIS?
If you are developing a plugin, then all you really need to pass to PostgreSQL is the query string, which is text. The reclassarg is simply a portion of that string. You can build the reclassarg expression as a python function taking the interval as input and calculating it for as high a number of values as you want to go.
Aug
18
comment How to classify a raster using QGIS Plugin interacting with PostGIS?
Ah, that is a different story. It might help to update your questions with more detail about what you are actually doing, including the qgis plugin, etc. and not just the postgresql query. Also, perhaps add a tag for qgis-plugin. You may get better response. Also more detail about the types of classifications you desire is warranted. Can someone enter any number they want, or are there specific numbers they can enter that will return specific classification patterns, or for ex. numbers 1-20: pattern 1, 30: pattern 2. How variable or specific does this need to be?
Aug
18
comment How to classify a raster using QGIS Plugin interacting with PostGIS?
Sorry, just realized the notation that you are using for the reclass arg answered my initial question. Since you are interested in the midpoint of 0-9, then you should round down and add 5. Just need to figure out how to set that up and convert to text string for the reclass function.
Aug
18
comment How to classify a raster using QGIS Plugin interacting with PostGIS?
Okay, I immediately see a problem with my reasoning. Something even simpler is to only look at the first digit. If it is 1-9, then replace with 5. If the first digit is 0, then subtract 5 from the entire value. Operationally, the simplest way to accomplish this may be to simply round up to the nearest 10 multiple and subtract 5 regardless of the values.
Aug
18
comment How to classify a raster using QGIS Plugin interacting with PostGIS?
Perhaps a little more information might help. In your example classification, you have your ranges overlapping, which may cause a problem. Do you actually need, for example: 201-210: 205; 211-220: 215, and so on? Will this be consistent in that you simply want the midpoint of each 10 digit range? If so, you may want to simplify what you are looking at, instead of caring about the entire number, you only want the tens and ones digits. If they are 1-5, then 5, if they are 6-10, then 5. A case statement may work, if this is what you are looking for.
Aug
18
awarded  Good Answer
Aug
17
comment Cannot save as ESRI FileGDB in QGIS 2.8/2.10
It depends on what driver you are using as to whether you can read or write to a FGDB. This answer may shed some light: File Geodatabase (*.gdb) support in QGIS
Aug
3
reviewed Close migrating from arcgis server to open source technologies --> what mapserver and tileserver should i use?
Aug
3
reviewed Approve arcgis-javascript-api-v4 tag wiki excerpt
Aug
3
reviewed Close How to calculate Areas of NDVI with Qgis?
Aug
3
reviewed Close Google map did not update new geolocation when I moved the marker to new position
Aug
3
comment How can I do a subquery inside a subquery in PostGIS?
Which part are you asking about? Error message is a matter of copying from message window if using PGAdmin III into your question. The rest of it is sort of moot since you solved your issue, unless you want to limit the fields you are returning.
Aug
3
comment How can I do a subquery inside a subquery in PostGIS?
It might help to paste the text of the error message into your question. Have you tried adding that as a wrapper to your initial query instead of as a subquery? Since you are including all fields anyway, it would essentially accomplish the same thing. From a performance standpoint, it might make sense to limit the number of fields that are being queried each time.
Jul
30
comment Why does the resolution decrease with increasing incidence angle in the Sentinel-1 SAR sattelite
There are two parts to the idea of resolution and angle. The first is the sensor, as @Kersten mentioned. The second part is that this is radar, and you are trying to capture reflections of an emitted signal. The closer you are to directly above something, the more waves fall on a given area and are reflected straight back at you, increasing the odds that they will be picked up by the sensor. With a larger angle, the waves encounter a larger surface area on the ground, and the potential for scatter, or waves reflected in different directions, increases. Both factors reduce resolution.
Jul
29
comment How can I rename all feature classes in a file geodatabase?
Python is pretty easy with mashing types together. I've done similar before with no problems.
Jul
29
revised How can I rename all feature classes in a file geodatabase?
Improve formatting, code highlighting
Jul
29
answered How can I rename all feature classes in a file geodatabase?
Jul
29
comment How can I rename all feature classes in a file geodatabase?
Since you are only dealing with 8 geodatabases, and thus, 8 feature classes, it almost seems like this is making it more complicated than it needs to be. I don't mean that to be condescending because I get caught in the same trap. I try to automate something, when the reality is that simply doing it by hand is just as fast. In this case, I mean going in through ArcCatalog, right-clicking each feature class and renaming it. If there is a reason this won't work, definitely please modify your question to add some more detail.