Solved

Reverse OpenCage Geocoder doesn't create polygons


Badge

Hi,

I am using the Geocoder for the first time and I get lot of warnings that feature must have at least 4 coordinates and then my output file has no coordinates.

I start with a shp file that has postal codes and centroid for each of the postal code and then I am doing reverse look up using the OpenCage API. I set up inside x and y as my Lat and long and and entered my API Key. Those are the only set ups I did in the Transformer.

Am I missing something? Can someone please help me?

icon

Best answer by danilo_fme 20 April 2018, 14:05

View original

19 replies

Userlevel 4
Badge +30

Hi @jitkam,

Could you share us a picture or your Workspace to understand better the configurations that you did?

Thanks,

Danilo

Badge

Geocoder settings

 

 

Badge

Workspace with the warnings sample
Badge

Hi @jitkam,

Could you share us a picture or your Workspace to understand better the configurations that you did?

Thanks,

Danilo

 

Hi Danilo, just did

 

 

Thx

 

Jitka
Userlevel 4
Badge +30

 

Hi Danilo, just did

 

 

Thx

 

Jitka
Thanks @jitkam

 

I created here a Workspace: Read polygons from Shapefile -> Transformer CenterPointExtractor -> Geocoder .

 

 

 

Results in FME Data Inspector:

 

 

 

Thanks,

 

Danilo

 

 

Badge

@danilo,

I have the same Geocoder settings. Do you think the problem is with my source file?

Userlevel 4
Badge +30

@danilo,

I have the same Geocoder settings. Do you think the problem is with my source file?

@jitkam

 

 

Cloud you send me some polygons to test?

 

Badge

@danilo_fme, here is the sample

Thank you

Jitka

archive.zip

Badge

@danilo_fme

here is the sample,

thank you

Jitka

archive.zip

Userlevel 4
Badge +30

@danilo_fme

here is the sample,

thank you

Jitka

archive.zip

Hi @jitkam

 

 

Thanks your source data. I used it in my Workspace - reading the shape file.

 

 

After the transformer CenterPointExtractor was used to extract the coordinates X and Y.

 

 

And the results was returned after the geocode process:

 

 

 

Your Writer is a point geometry, correct?

 

 

Thanks,

 

Danilo

 

Badge
Hi @jitkam

 

 

Thanks your source data. I used it in my Workspace - reading the shape file.

 

 

After the transformer CenterPointExtractor was used to extract the coordinates X and Y.

 

 

And the results was returned after the geocode process:

 

 

 

Your Writer is a point geometry, correct?

 

 

Thanks,

 

Danilo

 

Hi Danilo,

 

actually, should be polygons. I did exact the same setting as you show above and used the sample I sent you and still I get the errors and no output file.

 

 

Userlevel 4
Badge +30
Hi Danilo,

 

actually, should be polygons. I did exact the same setting as you show above and used the sample I sent you and still I get the errors and no output file.

 

 

Its possible that your writer file is set like polygon geometry. Could you share your Writer file? I believe you are try to write point in polygon Writer.

 

 

Userlevel 4
Badge +30

Hi @jitkam,

Did you change the format of geometry in your Writer?

Thanks,

Danilo

Badge
Its possible that your writer file is set like polygon geometry. Could you share your Writer file? I believe you are try to write point in polygon Writer.

 

 

Hi @danilo_fme I've uploaded the output file and screenshot of my settings.

 

I was originally using FME2018, but now tried in 2017, having the same problem.

 

Thx!

 

archive-2.zip

 

screen-shot-2018-04-19-at-111605-am.png

 

Badge
Its possible that your writer file is set like polygon geometry. Could you share your Writer file? I believe you are try to write point in polygon Writer.

 

 

This is one of the messages I receive in warning.

 

p, li { white-space: pre-wrap; } Polygon feature must have at least 4 coordinates...rejecting

 

REJECTING BELOW FEATURE:

 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

Feature Type: `CP_15Mex_v3_sample_15_2017'

 

Attribute(encoded: utf-8) : `_address' has value `Emilio Portes Gil, San Felipe del Progreso, Mexico'

 

Attribute(64 bit real) : `_inside_x' has value `-99.919066897024351'

 

Attribute(64 bit real) : `_inside_y' has value `19.646801735532826'

 

Attribute(64 bit real) : `_latitude' has value `19.6449664'

 

Attribute(64 bit real) : `_longitude' has value `-99.9192053'

 

Attribute(encoded: utf-8) : `d_cp' has value `50680'

 

Attribute(string) : `fme_feature_type' has value `CP_15Mex_v3_sample_15'

 

Attribute(string) : `fme_geometry' has value `fme_point'

 

Attribute(entangled: string): `fme_type' has value `fme_point'

 

entangled to [SHAPE_GEOMETRY]

 

Attribute(string) : `multi_writer_id' has value `0'

 

Coordinate System: `LL84'

 

Geometry Type: IFMEPoint

 

Coordinate Dimension: 2

 

(-99.9192053,19.6449664)

 

 

 

Userlevel 4
Badge +30

Hi @jitkam,

 

I solved you problem now using a transformer FeatureMerger.

This transformer is responsible to merger informations between points geometry ( results from transformer Geocoder ) and Polygons ( source data ) respecting a unique attribute d_cp.

Your Writer is a polygon geometry with all attributes.

Attached the Workspace - workspace-geocoder.fmwt

Thanks,

Danilo

 

Badge

Hi @jitkam,

 

I solved you problem now using a transformer FeatureMerger.

This transformer is responsible to merger informations between points geometry ( results from transformer Geocoder ) and Polygons ( source data ) respecting a unique attribute d_cp.

Your Writer is a polygon geometry with all attributes.

Attached the Workspace - workspace-geocoder.fmwt

Thanks,

Danilo

 

Thank you @danilo_fme,

 

does the FeatureMerger also needs Supplier? Should I use the Geocoder as such?

 

 

Thx

 

Jitka
Userlevel 4
Badge +30

Hi @jitkam,

Please, see the image below:

You can use the Workspace that I created - workspace-geocoder.fmwt

Thanks,

Danilo

Badge

Hi @jitkam,

Please, see the image below:

You can use the Workspace that I created - workspace-geocoder.fmwt

Thanks,

Danilo

Thank you @danilo_fme,

 

it works!!!

 

Reply