QGIS split feature tool is giving me an error - qgis

I'd like to split a feature into two features. This seems like it should be simple > I selected the feature > Used the split feature tool > selected outside the polygon on one side, and outside the polygon on the other side > Right clicked. Then it gave me this error.
"No features were split: If there are selected features, the split tool only applies to those. I you would like to split all features under the split line, clear the selection."
If I de-select the feature, I get the following error message.
"No feature split done: The geometry is invalid. Please repair before trying to split it.

The question is generic, you do not specify the source of the geometries (shapefile, postgis, spatialite...), wether exists a spatial index (a corrupt spatial index may cause a similar issue)...
According to the error message you are receiving, though, the geometry you are trying to split seems to be invalid.
Try the "Check validity" plugin or "Fix geometry" process (save a copy of your data before to apply them). If QGis is unable to automatically correct the geometry, search for autointersection ("butterfly" shape) or duplicate nodes.
You may refer to: https://postgis.net/docs/using_postgis_dbmanagement.html#OGC_Validity
for a definition of what a valid geometry is.

Related

Extrapolate Coordinates form Leaflet map

I'm planning a climbing trip and I wanted to retrieve the climbing locations from a leaflet map.
I thought I could use chromedriver and selenium to get the information I wanted but I'm having difficulty scanning through all markers since I can't understand where all the informations are stored.
Could someone guide me through how I could get the information? (also without using selenium)
The map in question is: https://www.climbingsardinia.com/topos/maps/
Thank you in advance.
in that page you will see a global variable called cttm_markers, it contains all markers informations and relative coordinates.
For example, cttm_markers[0][[0].additionalData.title evaluates "M.te Arci – Trebina Longa".Further, cttm_markers[0][[0]._latlng is an object {lat,lng} that contains coordinates.
Try to open console and paste this: JSON.stringify(cttm_markers[0].map(c=>({title:c.additionalData.title,latlng:c._latlng}))), it will print a json.
One way to do it is to get some information on one of the markers and use this to search the request reponses made by the page (you can do this in the debug tools, usually opened with F12). One of the markers for example reveals the location "Grighini". The base request redirects to (in my case) https://www.climbingsardinia.com/topos/maps/?doing_wp_cron=1651158093.0027918815612792968750
Searching the response, reveals that in line 1908 there's the string "Grighini". This line contains a serialized JSON array, containing the markers.

MONAILABEL Slicer plugin | pelvis segmentation in MRI

I want to segment pelvic in MRI from the SMIR dataset using the MONAILABEL plugin. I have read relatively a lot about this plugin. However, I can’t perform the segmentation well enough yet.
These are the steps I take to do so:
connecting the server using the anaconda prompt
enabling the plugin in Slicer and loading one image
labeling the pelvis manually using the paint button in the scribbles part and the updating
click “submit label”
and then repeating the process for some other images while the network is being trained.
After the training process, I actually could not see anything when opening the mask files.
I also encounter these two errors:
" AssertionError: Not a valid Label "
" TypeError: object of type ‘NoneType’ has no len() "
Is it the correct way of using MONAI or am I missing something?
Which aspects should I take into account before starting the process?
I would appreciate your help and suggestions.
Thank you

When shrink litedb files then app cannot find index on <collection>._id. How could i fix it?

I use 3.xx version of litedb and want to shrink the file since it always grows its size.
I shrunk it using LiteDbExplorer's "shrink" button, but now app cannot use this db file.
But still it seems good when using viewer litedbexplorer, litedbviewer, litedbstudio.
I can see data well on these viewers.
but when run application then
it shows
message like "LiteDB.LiteException: Index not found on '<collection_name>._id',
at LiteDB.Query.Run(CollectionPage col, indexService indexer)
at
LiteDB.LiteEngine.<>c__displayClass14_0.b__0(Collectionpage col) ~~~..."
Did I make it broken?
but Index on _id(primary key) and other indexes still exist well.
I check it using "db.collectionname.indexes".
anybody help me through?
It was because of collections' name restriction.
If collection's name is not fit then it cannot manipulate itself, not only its documents.
And also LiteDBExplorer's shrinking function might have some problem.
It does not work always, but LiteDBshell works.
Please use "db.shrink" at shell.
I guess messages like "Invalid format: Collection" at shell can be fixed by changing collection's name.

How can I create in Gehpi directed tree graph instead of sphererical

I want to make a network graph which shows the distribution of our documents in our folder structure.
I have the nodefile, edgefile and gephi graph file in this location:
https://1drv.ms/f/s!AuVfRBdVHkO7hgs5K9r9f7jBBAUH
What I do is:
Run the algorithm ForceAtlas2 with scaling 10-20, dissuade hub marked and prevent overlap marked, all other standard setting.
What I get is a graph with groups radial/spherical distributed. However, what I want is a tree directed network graph.
Anyone know how I can adjust Gephi to make this?
Thanks!
I just found a solution.
I tested the file format as shown on the Yed site "import excel file" page
http://yed.yworks.com/support/manual/import_excel.html
This gave me the Yed import dialog (took a life time to figure out that it's a pop up menu and not selectable through the standard menu)
Anyway, it worked and I've adjusted the test files with the data prepared for the Gehpi. This was pretty easy, I could used the source target ID's etc. Just copy paste.
I load it into Yed and used some directed and radial clustering algorithms on it. Works fine!
Below you can find the excel node/edge file used to import in Yed and the graph file you can open with Yed to see the final radial result.
https://1drv.ms/f/s!AuVfRBdVHkO7hg6DExK_eVkm5_mR
Only thing to figure out is how to combine the weight (which represents the number of documents) with the node size.
Unfortunately, as of version 0.9.0, Gephi no longer supports hierarchical graphs. Maybe try using a previous version?
Other alternatives involve more complex software, such as Graphviz, but you need a .dot file instead of your .csv. I looked all over, but could not find an easy-to-use csv to dot converter.
You could try looking at d3-hierarchy, a node.js program, but then again you need to use the not-so-user-friendly npm. If you look at the link, it looks like it can produce the kind of diagram you're looking for.

What does the parameter "cvid" in Bing search engine stands for?

As I searching something with Bing and I open the Chrome development tools. Here is the request url:
http://cn.bing.com/search?q=%e4%b9%a0%e8%bf%91%e5%b9%b3&go=%e6%8f%90%e4%ba%a4&qs=n&pq=%e4%b9%a0%e8%bf%91%e5%b9%b3&sc=6-6&sp=-1&sk=&cvid=AF49B4165317411D8AFEF30F13BCD108&first=10&FORM=PERE
So, what does the parameter "cvid" stands for? It seems if i don't set a cvid,i can't get the complete result html in my program.
By the way, the cvid is calculated by the browser automaticlly, so how to calculate?
In the Bing search context, cvid represents the JavaScript parameter ConversationId. Bing uses this key to identify your search result collection as its reply to your query, q. Similarly, pq is PartialQuery. These and other parameters may also apply to different kinds of searches, such as image or video searches.
Next, qs is your query's SuggestionType, sc shows your SuggestionCount, and from the suggestion list (dropped down, if enabled), sp shows the SuggestionPosition you chose. In your case, you did not select a suggestion, so &sp=-1. Toward the end of your string, sk is the SkipValue, because you might skip through your result pages, first tells the issuer how many results belong on the first page, and I'll let you figure out what FORM means. ;)
TRY:
Navigate to Bing, conduct a search, choose some options, change your displays, and change some search types. Next, open file explorer and navigate to your Windows OS equivalent of the following path.
C:\Users\{user}\AppData\Local\Microsoft\Windows
Next, you may need to adjust your View temporarily to "Show hidden files, folders, and drives." View tab > Options > Change... > View tab again, and click the bullet to "Show...".
In File Explorer's Search pane at the upper right, enter *.js to find all JavaScript files. It may point you several subfolders deeper, and the folder names may be hashed. Choose a JavaScript file you find interesting, right-click the file, and open it with Notepad, your favorite IDE, or some similar editor. You should see something akin to this (truncated; may not run independently):
var AutoSuggest,__extends,Bing,sa_inst;(function(n){var t;(function(n){var t,i,r,u,f,e;(function(n){n.User="SRCHHPGUSR"})(t=n.CookieNames||(n.CookieNames={})),function(n){n.AutoSuggest="AS"}(i=n.CrumbNames||(n.CrumbNames={})),function(n){n.CursorPosition="cp";n.ConversationId="cvid";n.SuggestionCount="sc";n.PartialQuery="pq";n.SuggestionPosition="sp";n.SuggestionType="qs";n.PreviewPaneSuggestionType="qsc";n.SkipValue="sk";n.PreviewPaneSkipValue="skc";n.Ghosting="ghc";n.Css="css";n.Count="count";n.DataSet="ds";n.SessionId="sid";n.TimeStamp="qt";n.Query="q";n.ImpressionGuid="ig";n.QFQuery="qry";n.BaseQuery="bq";n.FormCode="form";n.HashedMuid="nclid";n.RequestElToken="elvr";n.ElTokenValue="elv";n.AppId="appid";n.History="history";n.NoHistory="nohs";n.ApiTextDecoration="textdecorations";n.ClientId="clientid";n.Market="mkt";n.Scope="scope";n.CountryCode="cc";n.HomeGeographicRegion="hgr";n.SetLang="setlang";n.ZeroInputSerp="zis"}(r=n.QueryParams||(n.QueryParams={}))
I hope that helps someone! :D
I'm also trying to find out what this is :)
I'm pretty sure it's an encryption mechanism for bing a la public key cryptography, though I could be wildly wrong. There is another field called pq - and p's and q's are used a lot in crypto theory.
The field is 32 nibbles (e.g. 8D0E519A91024A08B075654D006C0A14) which equals 128 bits. This number results in some arithmetic operation with the binary value of your search and bing's private key - thus making url generation quite difficult.