Recently we get enormous amount of spam registration. We have closed the registration for new members, sorry...
0 votes
4k views
by
edited
I am running the RiverGIS tool and am receiving this error when I try to calculate bank stations.

Calculating cross-sections banks stations...

InternalError("line_locate_point: 2st arg isn't a point\n",)

Process aborted!

Do you know what is causing this.

Thanks,

JamesB

I am running PostGreSQL x64 9.6, qGIS 2.14.1, PostGIS Bundle 2.3 for PostGreSQL x64 9.6
by
After some investigation the problem appears to be related to the way the bank and XS were input into qGIS.   In this case I copied both the bank lines and XS from a .dxf prepared in CAD and pasted these into the relevant .shp files in qGIS.   It was this process that RiverGIS appeared not to like as if I digitised them directly into the .shp files then the bank station seemed to be picked out correctly.   One thing I also noticed is that if XS are added and then deleted from the layer it seems in spme cases this leads to a phantom row entry in the attribute table that does not relate to a XS.  This phantom entry also causes and error during geometry processing.

1 Answer

0 votes
by (280 points)
Hi James,

have you check that there is only one unique intersection of the bank lines and the cross section cut lines for each side and cross section?

Antoine
by
You're right!
Lot of thanks
by
When you're totally mystified where the problem might be, run this SQL query:

SELECT
    xs."XsecID" AS "XsecID",
    xs."ReachID" AS "ReachID",
    xs."Station" AS "Station",
    xs."RiverCode" AS "RiverCode",
    xs."ReachCode" AS "ReachCode",
    ST_Intersection(xs.geom, riv.geom) AS "Fraction"
FROM
    "<your project name>"."BankLines" AS riv,
    "<your project name>"."XSCutLines" AS xs
WHERE
    ST_Intersects(xs.geom, riv.geom)
ORDER BY xs."ReachID" ASC, xs."Station" DESC

Obviously replace "<your project name>" with the QGIS project name.

You'll get a listing with shorter geometry strings for good cross sections and double-length strings for bad ones. Probably need to widen your display column a lot to see this.

Works for me in pgAdmn4, or in QGIS -> Database -> DB Manager -> (click the wrench icon). You could select only bad lines, but I find the background info helpful.
by
Hi LorenAmelang

I've had the same error and tried running your code and got this error:

relation "<Arnold Dam Break>.BankLines" does not exist
LINE 9:     "<Arnold Dam Break>"."BankLines" AS riv,
            ^

I put "Arnold Dam Break" as that is the name of my QGIS project. Does it need to be full path, or does it need to be the schema name instead in rivergis@localhost?

Many thanks
Cameron
by
Ooops...  I guess my convention of putting an example entry in <> is not universally clear! Here are my actual entries:

    "MendoFEMA"."StreamCenterlines" AS riv,
    "MendoFEMA"."XSCutLines" AS xs

The <> were to distinguish the example project name, not to be literally entered. Sorry!

BTW, I have since discovered the amazing capabilities of RAS Mapper in the free HEC-RAS 5.05 release. They are still "Beta" and occasionally fail, but they have powerful abilities to recover project sanity. I accomplished more in a week with RAS Mapper than in two months of QGIS/RiverGIS...  Maybe that's just me, but it is good to know there are free alternatives.
by
Awesome that worked really well. Just FYI it's the schema name not the QGIS project name.

The results highlighted two cross sections where the BankLines intersected with the XS more than 2 times (bank lines doubled back and were imported from surveyor's digitisation of the water line). I deleted a segment of the bank lines to remove the doubling back and reduce the intersection down to 2 instances and now RiverGIS calculated the bank stations correctly.

Many thanks for your help!
by
Hi, I  tried your query and it found me two erroneous XSections,  I fixed them. But I am still getting this error:
InternalError("line_locate_point: 2st arg isn't a point\n",)
Any clue.
Thanks.
             ^
Welcome to RiverGIS Q&A, where you can ask questions and receive answers from other members of the community.

Visit rivergis.com for documentation and general info about the QGIS plugin.

Categories

...