Filling a ofMesh in openframeworks

Hello all :),

I have a project for school and i’m using a github project to use GeoJSON files and convert them to cartesian points. (thx to Moxuse https://github.com/moxuse/ofxGeoJSON )

It works quite well since i’m able to draw countries’s boundaries in red.

The problem is, I dont know how to fill the inside of the countries with color. Here is the code i’m using to color the boundaries:

vector< ofPtr > japan = geojson.getFeature(“Japan”);

for (int i = 0; i<japan.size(); i++) {
int size = japan[i].get()->getNumColors();
for (int j = 0; j < size; j++) {
japan[i].get()->setColor(j, ofColor(255.0, 0.0, 0.0));
}
};

Can you please help me? Thx

just put all the vertices of every contour in an ofPath then you can specify the outline and fill color for each path

Thank you for your answer, i will try that tomorow and let you know!