Skip to main content
Solved

FME Shapefile not Valid in PostGIS


nielsgerrits
VIP
Forum|alt.badge.img+54
Dear FME experts,

 

 

 

I’m getting quite desperate about a problem I still can’t solve.

 

 

 

The input format is shape which contains areas.

 

 

 

We use FME desktop (2013 SP1) to correct a great number of these geometries. The workbench contains AreaOnAreaOverlayers / Dissolvers etc. At the end we check the geometries with the GeometryValidator where we test all issues. 4 geometries are repaired.

 

 

 

The output is shape again. Until here everything is fine.

 

 

 

After this we use SPIT to load the shapes in PostGIS. Running isValid in PostGIS returns a lot of errors. Self intersections.

 

 

 

Our workaround is to repair geometry in ArcGIS which solves the self intersections. (a lot of them!)

 

 

 

Then we load the shape again in FME, run the feautures through the GeometryValidator with all checks. 16 geometries are getting repaired.

 

 

 

Now we can successfully load the shapes in PostGIS. The isValid function returns nothing now.

 

 

 

I would love to skip the repair geometry cycle in ArcGIS.

 

 

 

My latest guess is it should have to do something with the precision of shape vs the precision of FFS & precision of PostGIS. Using the attributerounder (x, y, z parameter = 4) before testing the GeometryValidator didn’t solve the problem.

 

 

 

Pretty stuck now, any suggestions?

Best answer by sigtill

Hi Niels!

 

 

After the GeometryValidator. Have you tried to add a second GeomtetryValidator - with the PASSED and REPAIRED from the first GeometryValidator as input?
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

david_r
Celebrity
  • March 22, 2013
Hi,

 

 

does your process include a SelfIntersector? Also, why not write the geometries directly to PostGIS with FME?

 

 

Generally, these issues can be hard to debug without intimate knowledge about both the input and output data, as well as your process...

 

 

David

sigtill
Supporter
Forum|alt.badge.img+24
  • Supporter
  • Best Answer
  • March 22, 2013
Hi Niels!

 

 

After the GeometryValidator. Have you tried to add a second GeomtetryValidator - with the PASSED and REPAIRED from the first GeometryValidator as input?

nielsgerrits
VIP
Forum|alt.badge.img+54
Heya David,

 

 

the GeometryValidator checks for self intersections and Attempt Repair = yes. So the SelfIntersecter is included.

 

 

We need the data in another application as well which can't get data from a PostGIS source... so thats why we use the Shape route.

 

 

Of course I understand how hard debugging is without data & workbench... I'm just not allowed to put it on the internet.

 

 

I hope it is a known problem which someone smarter than me already solved.

 

 

Thanks for the input!

david_r
Celebrity
  • March 22, 2013
Hi Niels,

 

 

in that case, try the excellent suggestion from SigTill.

 

 

Also be aware that the order of the operations inside the GeometryValidator can matter. You can switch around the order of the checks using the small up/down buttons on the upper right of the list of issues to check for. They can be hard to spot unless you're actively looking for them...

 

 

David

nielsgerrits
VIP
Forum|alt.badge.img+54
Hooray!

 

 

Sigbjørn thanks a lot for the solution.

 

 

We didn't test the shape route yet but writing directly to PostGIS without the extra GeometryValidator didn't solve the problem.

 

 

Adding the extra GeometryValidator did the trick! It crossed my mind but I never actually tested it.

 

 

David, thanks for pointing out the order of checks / arrows. Indeed I had not spotted them myself.

 

 

Problem solved, case closed.

fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • March 25, 2013
Hi NielsG

 

If you have a best answer among these (looks like it's SigTill) would you mind voting it best answer.

 

Thanks

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings