Posts

Rendering huge GeoJSON data using leaflet

Image
  Huge GeoJSON data may cause browser to crash, this is because of its limitations.  Let's say you have a 100+ MB file, displaying it on the map without map server will cause a lag or unresponsive browser. In order to address this issue, you can reduce the GeoJSON file size by simplifying its vertices using mapshaper (or using QGIS or any desktop GIS software) and converting it in TopoJSON . TopoJSON is an extension of GeoJSON that encodes topology. Rather than representing geometries discretely, geometries in TopoJSON files are stitched together from shared line segments called arcs . This technique is similar to Matt Bloch’s MapShaper and the Arc/Info Export format, .e00 . This will significantly reduce the file size, I have tried a 100+ MB file it reduces to 30+ MB. After the conversion, we'll be using a parser and rendering plugin for leaflet. Let's use leaflet-omnivore from mapbox in parsing TopoJSON and convert it to GeoJSON, then use Leaflet.VectorGrid . Here...

1st Wedding Anniversary

Image

I Am Getting Married!

Image
I proposed to her just few days after our 2nd anniversary, the idea is to surprise her and I think I did. 😂 The Engagement Ring I also bought the ring on the same day, funny things happened but I won't share it here. (HAHA) I have prepared a simple note stating my intentions to her. As I am a man with few words, that was just maybe four sentences. The Note I ask the question, and (hoooorayyy) she answered "Yes" after a minute or two. My fiancée wearing the ring. Fast forward to the day that I (with my family) formally asked to marry her, I was nervous but way more excited. US holding the cake I am more than happy and excited to what's coming ahead for us.

A Short Letter For You

Image
For the second time in a row, I'll be celebrating Valentine's Day with you in my life. Just two words for today. BLESSED AND LOVED. That's how my life has been since I had you again . You brought a different kind of happiness. You brought a new perspective to my life. You brought sunshine in my gloomy days. You brought lots of good things by just being yourself. And for the million times, I'll keep on saying this. "I love you for that." With no definite reason, I love you. With all the good reasons or even worse, I'll be staying with you. Don't ever forget that no matter what happens  in the future, that's ahead of us. We can make it. Why? Because... We share the same love, and that will always be enough. Happy Valentines my chikading !!! 💗💓💑💘 I have loved you and I will love you.

My Choice

Image
From Just My Thoughts I choose you. Everyday I wake up, I choose to love you. I will continue to choose you everyday 'til forever. I choose to love you, cherish you, adore you, take care of you and spoil you. I choose to be loyal to you, to be honest with you, to fight for you. You are deserving of all these things and more. I have loved you, but haven't shown it well. But I will try everyday to do better, because you make me a better person. I never knew love, never knew understanding, before I met you. Until forever. From My Thinking Cap: 😊😍 when it is hard to love you, I will love you more. when I feel like you're pushing me away, i will hold you tight. you are who you are, and I love you for that. although it puzzles me. the change in mood, the way you talk to me. out of concern, maybe. i get it. you need to grow. you are afraid of the future. uncertain things. actually, uncertainty excites me as long as we're together. keep in ...

Updating Features in Openlayers 4.x

Image
Let's say you have this following set-up: var jsonObj = {         "type": "FeatureCollection",         "features": [             {                 "geometry": {                     "type": "Point",                     "coordinates": [124.112122, 8.112132]                 },                 "type": "Feature",                 "properties": {        ...

Deploying Django Apps in Heroku

Image
Heroku is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud. If you have a simple Django app that doesn't require huge storage or database, Heroku is the best choice . Their free service will suffice your need. Your app will be available almost 24/7 (~23 days up time in a month). You are given 550 hours per month and if you have a credit card, an additional of 450 hours will be rewarded. Enough to make your app to be available always. The server also sleeps  after 30 mins of inactivity. This enables you to save uptime hours. In deploying Django in Heroku you just need to have this ff. files: .gitignore runtime.txt requirements.txt Procfile Django App  All file must reside in the project directory as shown below:   .gitignore is a text file containing the type of files within the directories that wont be included in the deployment of app runtime.txt is a text file containing the version o...